On 06/29/2013 03:12 PM, Armin K. wrote: > On 06/29/2013 05:38 AM, Wayne Blaszczyk wrote: >> On 13/06/13 01:36, Armin K. wrote: >>>> >>> >>> I see nothing wrong there. It can be that your ldd is part of 32bit >>> glibc (was it you that was building multilib CLFS?) and it can't check >>> 64bit libraries. My practice for multilib LFS (yes LFS) is only to >>> install 32bit libraries into /lib32 and/or /usr/lib32 and maybe some >>> required executables to /usr/bin with -32 suffix - gio-querymodules-32, >>> gdk-pixbuf-query-loaders-32, gtk-query-immodules-2.0-32, >>> pango-querymodules-32 and so on. (everything is done using DESTDIR method). >>> >> >> Hi Armin, >> >> I would be very interested in how you achieved this. Have you got some >> kind of guide you can post? >> I too myself would like to install some 32 bit libs, in my case I use >> ICA Client which is 32 bit only. Currently, I have an old 32bit tarball >> of libraries which I complied, maybe 5 years ago on a 32 bit system >> which I just un-tar on my 64bit system. That seems to work fine, but I >> would like to build a fresh set. >> I can successfully build a 32 bit glibc onto my 64 bit system using some >> of the CLFS (cross-tools) instructions, but that is as far as I got. I >> cannot build gcc with multi lib as I'm not to sure about the prerequisites. >> >> Thanks, >> Wayne. >> >> > > Ugh, I don't have the guide anymore, but I did combine CLFS and > Temporary Toolchain Instructions from LFS to achieve this. > > In the first step you need static multilib binutils and compiler: > > export PATH=/usr/gcc:$PATH > > Binutils: > > ... > --prefix=/usr/gcc \ > --target=x86_64-krejzi-linux-gnu \ > --enable-multilib > > make > make install > > Static GCC: > > ... > --target=x86_64-krejzi-linux-gnu \ > --prefix=/usr/gcc \ > --with-newlib \ > --without-headers \ > --disable-shared \ > --disable-decimal-float \ > --disable-threads \ > --disable-libatomic \ > --disable-libgomp \ > --disable-libitm \ > --disable-libmudflap \ > --disable-libquadmath \ > --disable-libsanitizer \ > --disable-libssp \ > --disable-libstdc++-v3 \ > --enable-languages=c \ > --enable-multilib > > make all-gcc all-target-libgcc > make install-gcc install-target-libgcc > > ln -sv libgcc.a `x86_64-krejzi-linux-gnu-gcc -print-libgcc-file-name | > sed 's/libgcc/&_eh/'` > > ln -sv libgcc.a `x86_64-krejzi-linux-gnu-gcc -m32 > -print-libgcc-file-name | sed 's/libgcc/&_eh/'` > > 32 bit Glibc: > > echo slibdir=/lib32 > configparms > > BUILD_CC="gcc" \ > CC="x86_64-krejzi-linux-gnu-gcc -m32" \ > AR="x86_64-krejzi-linux-gnu-ar" \ > RANLIB="x86_64-krejzi-linux-gnu-ranlib" \ > ... > --prefix=/usr \ > --libdir=/usr/lib32 \ > --libexecdir=/usr/lib32 \ > --disable-profile \ > --enable-add-ons \ > --enable-kernel=2.6.32 \ > i686-pc-linux-gnu > > make > make install install_root=$PWD/dest > > mv $PWD/dest/lib32 / > mv $PWD/dest/usr/lib32 /usr >
Hm, I forgot important file mv $PWD/dest/usr/include/gnu/stubs-32.h /usr/include/gnu > ln -s ../lib32/ld-linux.so.2 /lib/ld-linux.so.2 > echo /lib32 >> /etc/ld.so.conf > echo /usr/lib32 >> /etc/ld.so.conf > ln -s ../lib/locale /usr/lib32/locale > > Binutils: > > Same instructions as in LFS except you add --enable-multilib > > GCC: > > Same instructions as in LFS except you add --enable-multilib and > --enable-bootstrap iirc. It should bootstrap itself as long as 32bit > Glibc libraries are there. > > I didn't add the apropriate ./configure invocation, adjust it for > yourself (replace ... with it). > > Also, first time when I built 32bit glibc using static gcc, I didn't had > exactly the same files in /usr/lib32/getconf and /usr/lib/getconf. I > just rebuilt 32bit Glibc again when the main GCC build was finished > using CC="gcc -m32", ommiting BUILD_CC, AR and RANLIB variables. > > I can't guarantee that instructions are correct though. I just > copy/pasted some instructions I remember using back then. I hope I gave > you some pointers. Have fun. > Also, forgot to add that I used the temp. instructions with GCC 4.7.2 ... I don't know what has changed with GCC 4.8 nor if you will need c++ compiler and libstdc++ library but I believe that for 32bit glibc bootstrap you only need a static C compiler, for gcc build you either use original /tools gcc or your final gcc from chap6 lfs. -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
