[Clfs-support] CLFS multiarch /lib for 64bit and /lib32 for 32bit

Ivan Kabaivanov ivan.kabaivanov at gmail.com
Sun Jan 29 06:29:00 PST 2017


Hi, 

I've been an LFS user since 2000. I have been building a pure 64bit LFS for a number of years, but now I'd like to start building a multilib one. 

I like how Debian and Arch are doing it: 
/lib and /usr/lib contain the 64bit libraries 
/lib64 is a link to /lib 
/usr/lib64 is a link to /usr/lib64 
/lib32 and /usr/lib32 contain the 32bit libraries. 

Ideally I would prefer *not* to have the lib64 link and just to have /lib and /usr/lib for 64bit and /lib32 /usr/lib32 for 32bit. 

This makes sense, is convenient as I build just a fraction of the packages for 32bitness and I don't want to specify --libdir=/usr/lib64 for the default build of 64bit packages. A number of commercial software also seems to expect /lib and /usr/lib to be 64bit and /lib32 /usr/lib32 to be 32bit. 

So far I have a working set of commands to build the base system according to your convention (/lib and /usr/lib are 32bit, /lib64 and /usr/lib64 are 64bit), but I'd like the other way around. 

I've tried to modify the instructions and the gcc specs patch as needed (both gcc/config/i386/linux64 and gcc/config/i386/t-linux64) but I end up with a failure in test-installation.pl for the 64bit glibc. gcc -m64 produces working binaries as once run the test prog prints 'Your new glibc installation seems to be ok.' but ldd reports a non-dynamic executable. I'm guessing it can't find the linker, even though I did specify it with the sed command 

sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux-x86-64.so.2 -o|" scripts/test-installation.pl 

If I patch glibc to skip test-installation.pl (I know, bad idea, but just for debugging), libgcc fails to find /lib/cpp and there goes my final gcc. 

I would appreciate any tips you have. I will provide patches for the book commands so you can better understand what I'm modifying. 

And a suggestion. Now that pure 32bit is being dropped left and right by the major distros, isn't it time to revisit the whole /lib, lib32, lib64 structure? It makes so much more sense to me to treat 64bit as the "native" bitness and therefore use /lib and /usr/lib for it. The extra arch is 32bit so treat it as the exception with /lib32 and /usr/lib32. 

Thanks, 
IvanK. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20170129/f2369194/attachment-0001.html>


More information about the Clfs-support mailing list