Problem compiling a simple Hello agianst uClibc

Ayoub ayoub at ezono.com
Mon Nov 28 12:16:22 UTC 2005


Hi all,

I'm trying to compile a simple Hello against uClibc ( version 0.9.28 ).
I am using a cross compiler ( genetated by buildroot ) i386-linux-uclibc-gcc

here is my Makefile :

TARGET=i386
CROSS=$(TARGET)-linux-uclibc-
CC=$(CROSS)gcc
LD=$(CROSS)ld
STRIP=$(CROSS)strip


CFLAGS=-Wall -D__FORCE_NOGLIBC -I/home/zaki/eZonix/tmp/usr/i386-linux-uclibc/usr/include
LDFLAGS=-L/home/zaki/eZonix/tmp/usr/i386-linux-uclibc/lib/



EXEC=hello

all: $(EXEC) strip romfs

hello.o: hello.c
 $(CC) -o hello.o -c hello.c $(CFLAGS)

hello: hello.o
 $(CC) -o hello hello.o $(LDFLAGS)

strip:
 $(STRIP) $(EXEC)

romfs:


clean:
 rm -rf *.o $(EXEC)


Then I'm using the 'ldd' provided by the uClibc:

[root at zaklinux hello]# ./ldd hello
ldd: can't open cache '/usr/i386-linux-uclibc/etc/ld.so.cache' 
 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
 linux-gate.so.1 => (0xffffe000)
 !!! libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000) /* this library is not in uClibc*/
 libc.so.0 => not found (0x00000000)
 libc.so.6 => /lib/libc.so.6 (0x00000000)
 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)



I have asked this question before in this forum and the answer was that this library is not included in the uClibc package.

So in this case I have to copy always this library from my complierlibs or can I avoid the dependiency with the libgcc_s.so.1 =>/lib/libgcc_s.so.1 ?

Or maybe my uclibc cross compiler is not well generated ?

Please help me I'm very confused.


Cheers,

ZAK



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20051128/53c91a2a/attachment-0001.htm 


More information about the uClibc mailing list