On 07/30/2014 03:39 PM, Armin K. wrote:
> On 07/30/2014 01:49 PM, 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.
>>
> 
> Try this: www.linuxfromscratch.org/~krejzi/glibc 32 bit.txt
> 

FYI, this should be on a single line since I was too lazy to rename a
file not to include spaces. Or you could just omit the file bit and
select it, there is no index file.

> You need a 32 bit capable compiler to build 32 bit glibc. I achieve that
> by installing a cross-gcc in /usr/gcc, then building a 32 bit glibc
> using that compiler. I believe the instructions are for gcc-4.8.x, but
> can be adjusted for 4.9.x by adjusting the switches from gcc pass1 in
> LFS (without --disable-multilib).
> 
> 
> 


-- 
Note: My last name is not Krejzi.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to