chroot'd toolchain & gnu libc issue? (was Re: Proper use of libtool under buildroot?)

Peter S. Mazinger ps.m at gmx.net
Mon Dec 12 09:46:25 UTC 2005


On Mon, 12 Dec 2005, Marcus Crafter wrote:

> 
> On 12/12/2005, at 10:27 AM, Peter S. Mazinger wrote:
> 
> > On Mon, 12 Dec 2005, Marcus Crafter wrote:
> >> In the buildroot 'make menuconfig' options I selected '[*] native
> >> toolchain in the target filesystem' (the help for this option says
> >> 'If you want the target system to be able to run binutils/gcc and
> >> compile native code, say Y here'), and that's how I checked the gcc/
> >> ld, etc that was in my root build area and saw the behaviour below.
> >>
> >> I thought from the description above that this particular package
> >> option would build a native gcc/ld for the root area which I could
> >> use to chroot into and build further applications - I haven't checked
> >> the makefiles just yet but perhaps it simply copies the cross
> >> compilation tool chain in to the root area rather than buliding a
> >> fresh one (?). Not sure.
> >>
> >> Is this what you mean by creating a minimal dev environment for the
> >> target? Or am I still a bit confused and should be looking to do this
> >> another way? ie. manually?
> >>
> >> Hope to hear from you soon.
> >
> > something is really wrong then, those files shouldn't depend on  
> > host libc
> >
> > try to use readelf -d instead of ldd
> 
> Ok, tried that, unfortunately readelf is also linked against the host  
> libc from the looks of it:
> 
> bellagio[/home/crafterm/workspace/new/buildroot/build_i386]:12>sudo  
> chroot root
> bellagio[/]:1>/usr/bin/readelf -d /usr/bin/gcc
> bash: /usr/bin/readelf: No such file or directory
> bellagio[/]:2>ldd /usr/bin/readelf
>          libc.so.6 => not found (0x00000000)
>          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
> bellagio[/]:3>
> 
> >>>>
> >>>> Have I perhaps built the toolchain incorrectly? Shouldn't they be
> >>>> linked against the uclibc libc shared library?
> >
> > they should
> 
> Ok. I'm looking into the Makefiles, toolchain/gcc/gcc-uclibc-3.x.mk  
> defines a target
> 
> GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
> 
> which seems like it should be building the 'target' GCC, etc. Still  
> digging to see what's going on, at least I know now that it should  
> work :)
> 
> Any thing else I might be able to check?

no, try to cleanup completely your buildroot (less the downloaded files) 
best you move out downloaded files, remove buildroot, unpack again and 
move dl back.

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