On Wed, 2014-07-30 at 12:49 +0100, Anthony Wright wrote:
> I've successfully built a 64 bit LFS 7.5-systemd installation. I'm
> trying to build a series of packages on top of that, and one of the
> packages needs a 32 bit version of glibc in addition to the 64 bit
> version of glibc (it fails trying to include /usr/include/gnu/stubs-32.h).
>
> Using a distro such as Ubuntu I can apt-get a 32 bit glibc, so I know
> it's possible to have the 64 and 32 bits version of glibc co-existing,
> but I can't work out how to build a 32 bit version of glibc on a clean
> 64 bit version of LFS.
>
> I've tried following the glibc instructions in chapter 6 and then
> modifying the configure to:
>
> ../glibc-2.19/configure \
> --prefix=/usr \
> --disable-profile \
> --enable-kernel=2.6.32 \
> --enable-obsolete-rpc \
> --host=i686-linux-gnu \
> CC="gcc -m32" \
> CXX="g++ -m32"
>
> Unfortunately it runs for quite a while and then fails with the
> following output:
>
> a - elf/dl-sym.os
> a - elf/dl-tsd.os
> a - elf/unwind-dw2-fde-glibc.os
> a - elf/framestate.os
> a - elf/unwind-pe.os
> gcc -m32 -nostdlib -nostartfiles -r -o
> /xx/glibc-build/elf/librtld.map.o '-Wl,-('
> /xx/glibc-build/elf/dl-allobjs.os /xx/glibc-build/libc_pic.a -lgcc
> '-Wl,-)' -Wl,-Map,/xx/glibc-build/elf/librtld.mapT
> /usr/bin/ld: skipping incompatible
> /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/libgcc.a when searching for
> -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: error: ld returned 1 exit status
> Makefile:286: recipe for target '/xx/glibc-build/elf/librtld.map' failed
> make[2]: *** [/xx/glibc-build/elf/librtld.map] Error 1
> make[2]: Leaving directory '/xx/glibc-2.19/elf'
> Makefile:213: recipe for target 'elf/subdir_lib' failed
> make[1]: *** [elf/subdir_lib] Error 2
> make[1]: Leaving directory '/xx/glibc-2.19'
> Makefile:9: recipe for target 'all' failed
> make: *** [all] Error 2
>
> I also wondered about editting the LFS book to build a 32 bit glibc just
> after the 64 bit glibc has been built so that hopefully the tools which
> seem to be missing above would be available.
>
> Any suggestions would be appreciate.
>
> thanks,
>
> Anthony.
Hello Anthony,
A quick search on google produced the following:
../../src/glibc-2.6/configure --prefix=$HOME/glibc32-2.6 \
--host=i686-linux-gnu \
--build=i686-linux-gnu \
CC="gcc -m32" CXX="g++ -m32" \
CFLAGS="-O2 -march=i686" \
CXXFLAGS="-O2 -march=i686"
You could give this a go and see how you get on.
The poster claims that it was successful. I don't have a 64-bit system
so am unable to verify it.
Regards,
Christopher.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page