Re: [Lsb-build] Need an lsb chroot build environment with real libs instead of stubs.

Bart Whiteley <[email protected]> Wed, 4 Feb 2004 16:33:11 -0700
Newsgroups gmane.linux.lsb.implementation
Organization Novell, Inc.
Message-ID <[email protected]>
I've started to create a "jail" build environment that is lsbsi + build tools. 

I started with this: 
ftp://ftp.freestandards.org/pub/lsb/impl/released/binary/ia32/lsbsi-ia32-1.3.1.tar.bz2
I extracted it to /opt/lsbsi-1.3.1.

I can chroot into that environment and run simple commands. 
Next I got gcc from here: 
ftp://ftp.freestandards.org/pub/lsb/impl/packages/gcc-core-3.3.2.tar.bz2

I built this on my SuSE9 host system as per the instructions for building/installing gcc.  
I configured with --prefix=/opt/gcctmp.  I installed with 'make DESTDIR=/opt/lsbsi-1.3.1 install' 

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.  Could this be the problem? 
How do I get around this? 

Thanks. 

On Tuesday 03 February 2004 06:50 pm, Wichmann, Mats D wrote:
> > I'd like to set up an LSB chroot build environment for all my
> > packages.
> > There's a slight problem with the lsbdev-chroot solution.  In
> > my RPM build,
> > I compile a tool, then execute the tool within the RPM build.
> >  Since lsbdev-chroot
> > only gives me access to stub libraries.  I can't execute the tool.
> >
> > It seems to me that what I need is LSB-si + build tools.
> > This way I would have
> > real libraries instead of stubs, so I can execute my newly
> > compiled tool within
> > the RPM build.
> >
> > I can take LSB-si and lsbdev-chroot and start to build such
> > an environment.
> > I'm sending this email to see if anyone else has already done
> > this and can give me some advice.
>
> There's some work afoot to add build tools to the lsbsi.
> I've added the lsb-impl list to this thread for that reason.
>
> Is there a good reason why the alternative build toolkit
> (lsbcc) doesn't work for you?  It was designed for the
> situation where more tools are needed than are provided
> by the chroot, in particulat the GNU-configure type
> arrangement where lots of things that aren't part of the
> LSB need to run before the build can actually proceed.
>
> Actually more feedback on what would make the chroot more
> useful would be appreciated... you've begun that process
> already, thanks.  What libraries are you using that are
> not found at run-time?  The lsb stub libraries are still
> only pulled in at link time, and the ordinary versions /ought/
> to be available at runtime. If not, the existing tools
> (gcc, etc) wouldn't be working either!  If there are only a
> few extra libs needed, you can import them into the chroot via
> the config file, or arrange to link those libraries statically.
>
> Anyway, that's the scheme :-)
>
> More details please?

-- 
Bart Whiteley <[email protected]>
Novell, Inc., the leading provider of information solutions
http://www.novell.com/