Greetings Everyone, I know LFS to date hasn't really expressed much interest in adding in support for multilib builds, but I figured I'd send out the FYI for anyone out there who has been experimenting or would like to do so in the future. (The very minor changes LFS needs in order to build multilib are listed at the end).
The latest toolchain packages (the ones LFS is currently using, gcc-4.4.3, binutils-2.20, glibc-2.11.1) along with the general build methodology appears to break for multilib. Following the latest DIY reference build but with these package versions yields the same results. In GCC pass 2, after gcc successfully builds libgcc and the new compiler, the build fails at libgomp with the following error: configure: error: unsupported system, cannot find sizeof (omp_lock_t) Digging into the config log, the particular conftest that is failing actually builds successfully, but attempting to run the newly built binary produces: ./conftest: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory build:~/gcc-build/x86_64-unknown-linux-gnu/32/libgomp$ ldd conftest linux-gate.so.1 => (0xf7745000) librt.so.1 => /temptools/lib/librt.so.1 (0xf772f000) libgcc_s.so.1 => not found libpthread.so.0 => /temptools/lib/libpthread.so.0 (0xf7716000) libc.so.6 => /temptools/lib/libc.so.6 (0xf75cb000) /temptools/lib/ld-linux.so.2 (0xf7746000) Compiling the binary with -v -Wl,--verbose shows it linking against libgcc_s.so in the gcc-build dir: attempt to open /home/build/gcc-build/./gcc/32/libgcc.so failed attempt to open /home/build/gcc-build/./gcc/32/libgcc.a succeeded attempt to open /home/build/gcc-build/./gcc/32/libgcc_s.so succeeded -lgcc_s (/home/build/gcc-build/./gcc/32/libgcc_s.so) But it's obviously not looking there when trying to run the binary, which is where the conftest is failing. In fact, the config.log shows: configure:19341: ./conftest ./conftest: error while loading shared libraries: libgcc_s.so.1: wrong ELF class: ELFCLASS64 I intend to keep working my way through this problem slowly, but I wanted to put it out there in case anyone else had any ideas as to what's going on. -- JH -- Changes for LFS -- 1. Binutils Pass 1: remove the /{,usr}/lib -> /{,usr}/lib64 links 2. Kill the --disable-multilib switches on all Gcc builds 3. Add a 32-bit Glibc for both chapters with essentially the following configure command (the one for chapter 6 would of course use the different prefix and no need to use the $LFS_TGT tools): echo "CFLAGS += -march=i486 -mtune=native" > configparms CC="$LFS_TGT-gcc -m32" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ ../glibc-2.11.1/configure --prefix=/tools \ --host=i686-pc-linux-gnu --build=$(../glibc-2.11.1/scripts/config.guess) \ --disable-profile --enable-add-ons \ --enable-kernel=2.6.18 --with-headers=/tools/include \ libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes 4. For the 64-bit Glibc builds, add this before the configure line: echo "slibdir=/tools/lib64" > configparms echo "libdir=/tools/lib64" >> configparms -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page