PDA

View Full Version : Can I install uClibc on my ubuntu5.10?


jack.ma
19th December 2006, 04:37
Hi,folks
Can I install uClibc on my ubuntu5.10? You see in my distribution gcc 4.0.2 is here.Why do I have to do so? When I make the busybox 1.3.0 it says

jack@ma:~/kernel/busybox-1.3.0$ make
CC applets/applets.o
applets/applets.c:22:2: error: #warning Static linking against glibc
produces buggy executables
applets/applets.c:23:2: error: #warning (glibc does not cope well with ld
--gc-sections).
applets/applets.c:24:2: error: #warning See
sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:25:2: error: #warning Note that glibc is utterly
unsuitable for static linking anyway.
make[1]: *** [applets/applets.o] Error 1
make: *** [applets] Error 2

Someone suggestst that

glibc has critical bugs that
make it so programs static-linked against glibc with gc-sections
option DO NOT WORK. Thus BB has provided an error message for you
rather than generating a binary that will seriously misbehave under
many circumstances.

glibc authors have intentionally not supported static linking for a
long time. If you want static linking, use a different libc that
properly supports it.

So,can I and how to install uClibc ?

Thanks
-jack

falko
20th December 2006, 14:24
uClibc is recommended for Busybox.
What's the output of apt-cache search uclibc?

jack.ma
21st December 2006, 09:48
uClibc is recommended for Busybox.
What's the output of apt-cache search uclibc?

Hi,falko

This is the output of apt-cache search uclibc as below

jack@ma:~$ sudo apt-cache search uclibc
libuclibc-dev - A small implementation of the C library
libuclibc0 - A small implementation of the C library
uclibc-toolchain - A compiler wrapper for uClibc

So, can I install the uclibc, compile some program against the C library, even use the uclibc-toolchain?

-jack

falko
22nd December 2006, 14:49
Run apt-get install libuclibc-dev libuclibc0 uclibc-toolchain and try again to build Busybox.

jack.ma
25th December 2006, 11:25
Hi,falko

Can I compile C program against uclibc with gcc ? If yes, how can I set the gcc 's options to compile successfully?If not,do I need some uclibc related compiler?

-Jack

falko
26th December 2006, 17:36
I think that Busybox compiles against uclibc automatically.