[kaffe] kaffe & diet libc

Martin Pohlack mp26 at os.inf.tu-dresden.de
Tue Jun 10 04:21:01 PDT 2003


I'm currently investigating which libc to port do DROPS in order to port 
kaffe to it. My first candidate is "diet libc".

My first step, was to configure the following way:

CC="diet gcc -nostdinc -D_BSD_SOURCE" ./configure --disable-nls

The next "make all" fails in replace/ with the following error:

In file included from ifaddrs_linux.c:37,
                  from getifaddrs.c:30:
/mnt/erwin/mp26/dietlibc/include/errno.h:539: warning: `__set_errno' 
getifaddrs.c:23: warning: this is the location of the previous definition
In file included from getifaddrs.c:30:
ifaddrs_linux.c:42: linux/netlink.h: No such file or directory
ifaddrs_linux.c:43: linux/rtnetlink.h: No such file or directory
In file included from getifaddrs.c:30:
ifaddrs_linux.c:47: net/ethernet.h: No such file or directory
make: *** [getifaddrs.lo] Error 1

I circumvent this by manually issuing the last libtool call with "-Ulinux":

/bin/sh ../libtool --mode=compile diet gcc -nostdinc -D_BSD_SOURCE 
-Ulinux -DHAVE_CONFIG_H -I. -I. -I../config -I../include  -I.. -I.. 
-DKVER='"1.1.x-cvs"' -I/home/mp26/erwin/kaffe/./kaffe/kaffevm 
-I../config -I../include  -DKAFFE_VMDEBUG  -g -O2 -Wall 
-Wstrict-prototypes -c -o getifaddrs.lo `test -f 'getifaddrs.c' || echo 

The again "make all" in kaffe/ :

diet gcc -nostdinc -D_BSD_SOURCE -shared  .libs/ByteToCharDefault.o 
.libs/ByteToCharIconv.o .libs/CharToByteDefault.o 
.libs/CharToByteIconv.o .libs/ObjectStreamClassImpl.o 
.libs/Application.o .libs/Class.o .libs/ClassLoader.o .libs/Compiler.o 
.libs/Double.o .libs/Float.o .libs/Math.o .libs/MemoryAdvice.o 
.libs/NativeLibrary.o .libs/Object.o .libs/PrimordialClassLoader.o 
.libs/RMIHashes.o .libs/Runtime.o .libs/String.o .libs/System.o 
.libs/Thread.o .libs/ThreadStack.o .libs/Throwable.o .libs/UNIXProcess.o 
.libs/ZipFile.o .libs/Array.o .libs/Constructor.o .libs/Field.o 
.libs/Method.o .libs/DateFormat.o .libs/TestNative.o .libs/Arrays.o  -lm 
-lc  -Wl,-soname -Wl,libnative-1.1.x-cvs.so -Wl,-retain-symbols-file 
-Wl,.libs/libnative.exp -o .libs/libnative-1.1.x-cvs.so
/usr/bin/ld: .libs/libnative-1.1.x-cvs.so: undefined versioned symbol 
name flockfile@@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libnative.la] Error 1
make[2]: Leaving directory `/mnt/erwin/mp26/kaffe/libraries/clib/native'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/erwin/mp26/kaffe/libraries/clib'
make: *** [all-recursive] Error 1

Any ideas? Or has anyone succesfully compiled kaffe with "diet libc"?

Martin Pohlack

More information about the kaffe mailing list