RE: [Lsb-build] Need an lsb chroot build environment with real libsinstead of stubs.

"Wichmann, Mats D" <[email protected]> Wed, 4 Feb 2004 16:30:19 -0800
Newsgroups gmane.linux.lsb.implementation
Message-ID <[email protected]>
> Observe: 
> 
> # /opt/lsbsi-1.3.1/opt/gcctmp/bin/gcc --version
> gcc (GCC) 3.3.2
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. 
>  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A 
> PARTICULAR PURPOSE.
> 
> # chroot /opt/lsbsi-1.3.1/
> bash-2.05b# ls /opt/gcctmp/bin/gcc
> /opt/gcctmp/bin/gcc
> bash-2.05b# /opt/gcctmp/bin/gcc --version
> bash: /opt/gcctmp/bin/gcc: No such file or directory
> bash-2.05b# ldd /opt/gcctmp/bin/gcc
> /usr/bin/ldd: line 1: /opt/gcctmp/bin/gcc: No such file or directory
> 
> Any idea what's going on here? 
> 
> I did notice this: 
> 
> # ldd /opt/lsbsi-1.3.1/opt/gcctmp/bin/gcc
>         libc.so.6 => /lib/i686/libc.so.6 (0x40028000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> # ls /opt/lsbsi-1.3.1/lib/ld-linux*
> /bin/ls: /opt/lsbsi-1.3.1/lib/ld-linux*: No such file or directory
> 
> So there's no ld-linux.so.2 in lsbsi.

That's right.

>  Could this be the problem? 

Yes.

> How do I get around this? 

You need to build binaries that are targeted for
the lsbsi, which specifically has the LSB
linker and not the Linux linker.  You can't
do this (easily) from Linux, so it should be
done from the lsbsi.

Sorry this procedure is a little convoluted,
you can't really get there from the lsbsi tarball.

I'll send some notes on this out in a bit.

-- mats