Hi Bernhard, Thanks for your help. Though, I did not wanted to go "buildroot" method ( as my requirement is specific : gcc-4.1.1, target arch-i386, busybox-1.14.3, uClibc-0.9.31.1), I thought of giving it a try. However, on configuring buildroot, I could not find gcc-4.1.1 option (yes, it's quite old now but that's my requirement). If you have any "pointers" for me --> what all changes are required in the busybox Makefile to successfully compile with uClibc, it would really help me. I did this in the earlier busybox version and the latest busybox Makefile seems to be too complex. My requirement is to create initrd using busybox (statically linked) and uClib as my C library. Thanks Sushil
--- On Fri, 10/9/09, Bernhard Reutner-Fischer <[email protected]> wrote: From: Bernhard Reutner-Fischer <[email protected]> Subject: Re: busybox-1.14.3 compilation with uClibc To: "walter harms" <[email protected]> Cc: "Sushil Kumar" <[email protected]>, [email protected] Date: Friday, October 9, 2009, 9:59 PM On Fri, Oct 09, 2009 at 06:19:18PM +0200, walter harms wrote: > > >Sushil Kumar schrieb: >> Hi Walter Harms/vda, >> >> Thanks for your reply. >> Took the latest uClibc-0.9.30.1 tar and successfully compiled it is using >> the native glibc. >> >> I made some changes in the busybox/Makefile.flags to include uClib library >> path and compiled the busybox using the latest uClibc-0.9.30.1 C library and >> I got lots of erreor as can be seen below. >> Thinking, error in my approach, I wrote a simple "hello world" program and >> tried to compile this using uClibc library. I got the similar error related >> to the uClibc/include headers while compiling the busybox. >> I have used the following command to compile my test program. >> gcc -nostdlib -I../uClibc-0.9.30.1/include >> -I/usr/lib/gcc/i386-redhat-linux/4.1.1/include/ test.c >> >> as suggested I followed the approach given at >> tldp.org/Glibc-HOWTO.html#toc10, to compile a program with C library, other >> than glibc. >> >> Please let me know what I am doing wrong. Further, in the latest busybox >> (1.14.3), the linking of files are done using scripts/trylink. Can we not >> link the program using any direct command. >> Thanks >> Sushil >> >> Included below are some lines of compilation error of my test program >> ========================================== >> >> busybox-1.14.3]#gcc -nostdlib -I../uClibc-0.9.30.1/include >> -I/usr/lib/gcc/i386-redhat-linux/4.1.1/include/ test.c >> In file included from ../uClibc-0.9.30.1/include/pthread.h:21, >> from ../uClibc-0.9.30.1/include/bits/uClibc_mutex.h:15, >> from ../uClibc-0.9.30.1/include/bits/uClibc_stdio.h:119, >> from ../uClibc-0.9.30.1/include/stdio.h:72, >> from test.c:1: >> ../uClibc-0.9.30.1/include/time.h: In function ‘libc_hidden_proto’: >> ../uClibc-0.9.30.1/include/time.h:346: error: storage class specified for >> parameter ‘clock_gettime’ >mmh that look if the header is missing something, no clue what. >it is long time since i last tried uClibc, did you also try the "-muclibc" to >gcc as suggested by bernhard ? that won't work, he tries to use uninstalled headers. Sushil, i'd recommend you build a proper cross-compiler (git clone git://git.uClibc.org/buildroot) && cd buildroot && make menuconfig) That gives you a nice cross-compiler with sysroot support (i.e. easily relocatable) that you can use to build whatever app you like. HTH,
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
