[uClibc]std[out|err|in] problem

Erik Andersen andersen at lineo.com
Wed Sep 5 19:56:50 UTC 2001


On Wed Sep 05, 2001 at 09:40:38PM +0200, Robert Schwebel wrote:
> On Wed, 5 Sep 2001, Robert Schwebel wrote:
> > Ah, ok, I've just tested it with the static library and this _works_. So
> > the problem must be specific to the dynamic lib or to the dynamik
> > linker...?
> 
> After a very unsuccessful day of digging around all parts of my system I
> found out that there have been some fragments of old installations of
> uClibc lying around somewhere. Now that it seems like I've found all that
> stuff things seem to work again. Sorry for the confusion...

Excellent.  I just couldn't see how that was happening.  Glad
you found it!

> Two odd things are left now: first is that I cannot look at the library
> dependencies with the "normal" ldd. uClibc's version is a binary, whereas
> the "conventional" one is a shell script which mainly sets some
> environment variables; the output comes from the binary itself. But as
> /usr/i386-linux-uclibc/bin/ldd works as expected it is no problem - would
> just be interesting to understand.

I wrote the uClibc ldd app since the system ldd is actually executing
your system's shared library loader which in turn partially executes 
your application...

This works fine when your uClibc apps are for the same architecture as
you host arch.  Unfortunately, if you are cross-compiling, the system
ldd will simply segfault.  I got tired of that...  The uClibc ldd reads
the ELF headers on your file and uses what it knows about how you built
uClibc.   The uClibc 'readelf' app is also quite useful...

> The other thing is that using "PATH=/usr/i386-linux-uclibc/bin:$PATH make"
> results in busybox/tinylogin being linked against
> 
>   robert at callisto:~/embedded/rootfs/bin ! /usr/i386-linux-uclibc/bin/ldd \
>   busybox
>           libc.so.0 => /usr/i386-linux-uclibc/lib/libc.so.0
>           /usr/i386-linux-uclibc/lib/ld-uClibc.so.0 =>
>   /usr/i386-linux-uclibc/lib/ld-uClibc.so.0
> 
> Which means that the dynamik linker is searched in the full path as it is
> on the development system, so I have to make a link on the embdded machine
> for being recognized correctly. I hope this is not another oddity of my
> disturbed machine...

It looks like you want to set "SHARED_LIB_LOADER_PATH=/lib" in your
Config file...  Then it will look for /lib/ld-uClibc.so.0 

Check out ftp://uclibc.org/buildroot.tar.gz for an example of how to
build an entire root filesystem without ever touching a single line of
uClibc's Config file (and without needing to be root).  I even provide a
User-Mode linux binary so you can just download the thing, then run
'make && ./linux' to try it out without rebooting and without needing to
be root.  I try very hard to keep buildroot up to date so it will always
work (I made a minor update earlier today).

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the uClibc mailing list