Buildroot: cannot find /lib/libc.so.0

Peter S. Mazinger ps.m at gmx.net
Fri Sep 30 09:01:19 UTC 2005


On Thu, 29 Sep 2005, Stephen Warren wrote:

> Dmytro Bablinyuk wrote:
> >>> buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/bin/ld:
> >>> cannot find /lib/libc.so.0
> >>> collect2: ld returned 1 exit status
> >>
> >>
> >> What version of uClibc are you building with - is it a recent
> >> snapshot, or an official release?
> >
> > Yes, it is recent snapshot - a couple hours old snapshot.
> >
> > Is there any workaround available apart from linking /lib files to
> > buildroot/build_powerpc/staging_dir/lib or shall I walk through Makefiles?
> 
> I don't know. I still haven't had time to look into the cause of the
> problem.

I added uclibc_nonshared.a support uClibc. This involved creating a linker 
script libc.so with the following line:
GROUP ( path_to/libc.so.0 path_to/uclibc_nonshared.a )

At build time (running make) in TOPDIR/libc I create this by having 
path_to as $(TOPDIR)lib. In install_dev I rewrite this line to
GROUP ( RUNTIME_PREFIX/libc.so.0 DEVEL_PREFIX/lib/uclibc_nonshared.a )

A possible failure is, that libc.so is created before libc.so.0 is already 
installed.

To hopefully correct this issue:
I have splitted out the header installation from install_dev into 
install_headers (install_dev installs the library links and depends on 
install_headers, so it should behave as earlier).
I have also added an additional condition for the creation of libc.so, 
checking if the RUNTIME_PREFIX/lib/libc.so.0 file is already installed, so 
libc.so shouldn't be installed if it is useless.

To really behave correctly, after buildroot is corrected I am intending 
to add install_dev dependency on install_runtime and install_headers 
dependency on headers, then all the additionally added checks can be 
removed.

Please test current svn in buildroot and see if it works for you now.

Thanks, Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list