[Y-devel] Some patches for Re: Compile Problems on BSD
JP Dinger jpd at dsb.tudelft.nl
Sat Feb 21 14:04:44 GMT 2004
On Fri, Feb 20, 2004 at 11:11:53AM -0600, Augie Fackler wrote:
> Basically, BSD is missing some standard header files.
[snip]
I don't really know whether or not those header files are really standard
or `just' linuxisms, one'd have to look up them posix and/or single-unix
specifications to find out. However, most of what's supposedly in those
files is solvable right away:
$ cat Y-0.2/stdint.h
/* [jpd] don't have stdint.h. let's see if this shuts up the compiler */
#ifndef __STDINT_H
#define __STDINT_H 1
#include <inttypes.h>
#endif
$ cat Y-0.2/endian.h
/* [jpd] don't have endian.h. let's see if this shuts up the compiler */
$
And lo and behold, it _does_ shut up the compiler. Yes, the second one
is essentially empty.
I don't know what system you're using but I ran into a few more problems
with 0.1 (like the debug include thingy) that I'm now integrating into
0.2.
There are a number of gnu-vs-world issues, one is that the GNU sed supports
extended regexpen where the BSD one, in my case, does not:
***
--- Y-0.2-config/Y/Makefile Sat Feb 21 14:54:27 2004
+++ Y-0.2/Y/Makefile Sat Feb 21 11:45:22 2004
@@ -397,7 +397,7 @@
util/yutil.c util/list.c
Y_LDFLAGS = -Wl,-export-dynamic
-Y_LDADD = $(FREETYPE_LIBS) -ldl
+Y_LDADD = $(FREETYPE_LIBS) -liconv
pkginclude_HEADERS = \
const.h
@@ -2259,13 +2259,13 @@
@echo "#include <Y/object/class.h>" >> $@
@echo >> $@
@find $(top_srcdir)/Y -iname '*.c' | xargs grep CLASSDEF \
- | sed s/'^.*struct Class \([a-zA-Z]\+\).*'/'extern struct Class \1;'/ >> $@
+ | sed s/'^.*struct Class \([a-zA-Z][a-zA-Z]*\).*'/'extern struct Class \1;'/ >> $@
@echo >> $@
@echo "void" >> $@
@echo "yRegisterDefaultClasses ()" >> $@
@echo "{" >> $@
@find $(top_srcdir)/Y -iname '*.c' | xargs grep CLASSDEF \
- | sed s/'^.*struct Class \([a-zA-Z]\+\).*'/' classRegister (\&\1);'/ >> $@
+ | sed s/'^.*struct Class \([a-zA-Z][a-zA-Z]*\).*'/' classRegister (\&\1);'/ >> $@
@echo "}" >> $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
***
As you can see, there's also a -ldl that doesn't exist here, and from 0.1
I remember needing libiconv so I put that in preventively.
I'll leave it to someone else to integrate this into the pre-auto*-tools
makefiles. Also, IIRC there are a few more +-vs-* issues but I haven't
run into them yet. Read on.
The next thing is another header problem that you need this patch for:
***
--- Y-0.2-dist/libY/Y/select.c Sat Feb 21 02:45:10 2004
+++ Y-0.2/libY/Y/select.c Sat Feb 21 11:52:05 2004
@@ -2,10 +2,9 @@
#include "libY.h"
#include "internal.h"
-#include <stdlib.h>
-#include <sys/select.h>
+#include <sys/types.h>
+#include <sys/time.h>
#include <unistd.h>
-#include <stdio.h>
/* compile this file in if you want multi-fd access using select (); */
***
I'd be interested to see if this breaks the linux compile or not.
Next was a missing -lc in libtool that prevented libY from compiling. I
didn't find a nice way of solving that yet. Just hacking out the
offending bit in libtool did allow me to go on but it'll probably break
some programs linked against it.
Now I'm stuck with a problem in the Versions file in libYc++.
The error looks like
/usr/libexec/elf/ld:./Versions:5: syntax error in VERSION script
And Versions looks like (don't know if this changes across platforms?)
$ cat Y-0.2/libYc++/Versions
LIBYCXX_0.2_0 {
global:
_init;
_fini;
extern "C++" {
Y::*;
};
local:
*;
};
$
I haven't dived in yet so I don't even know what syntax the file is supposed
to follow.
Anyone a clue there?
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved