I consider the following a bug, which can be problematic for (among others) releng. On amd64, sys-libs/glibc-2.4 creates these dentries: ${D}/usr/lib/locale -> /usr/lib64/locale ${D}/usr/lib64/locale/ (and children) Now, /usr/lib is a symlink to /usr/lib64, so the first entry would be a symlink to itself: /usr/lib/locale == /usr/lib64/locale -> /usr/lib64/locale. The offending part of code is this (lines 467ff in glibc-2.4-r3): # Make sure all the ABI's can find the locales and so we only # have to generate one set keepdir /usr/$(get_libdir)/locale for l in $(get_all_libdirs) ; do if [[ ! -e ${D}/usr/${l}/locale ]] ; then dosym /usr/$(get_libdir)/locale /usr/${l}/locale fi done Blubb and I discussed 2 options: a) move locale out of /usr/lib${ABI}, probable to /usr/share. b) keep locale in /usr/lib/locale, as it's not ABI dependant. I personally favour the second option. Comments?
(a) is not an option: - locale data is binary data and specific to the host arch, thus violates the requirements to be in /usr/share - glibc and every other distribution out there uses $libdir/locale i dont see this behavior on my machines ... in fact, glibc should not install anything at all in /usr/lib on a multilib amd64 setup the proper behavior is: /usr/${primary abi libdir}/locale/ is a directory /usr/${every other abi libdir}/locale is a symlink to /usr/${primary abi libdir}/locale/ and that's what i have: $ qlist -v sys-libs/glibc | grep lib.*locale /usr/lib32/locale -> /usr/lib64/locale /usr/lib64/locale/.keep_sys-libs_glibc-2.2
Please have a look at glibc-2.4-rX instead of glibc-2.2. Also, i used default-linux/amd64/2006.1/ as profile.
> Please have a look at glibc-2.4-rX instead of glibc-2.2. what are you talking about ? i am referring to the latest glibc ebuilds in fact, glibc-2.2 doesnt even support multilib
post your glibc CONTENTS file ... what src_install() is doing is correct # Everything past this point just needs to be done once ... is_final_abi || return 0 ... keepdir /usr/$(get_libdir)/locale for l in $(get_all_libdirs) ; do if [[ ! -e ${D}/usr/${l}/locale ]] ; then dosym /usr/$(get_libdir)/locale /usr/${l}/locale fi done $(get_libdir) evaluates to "lib64" and $(get_all_libdirs) evaluates to "lib64 lib32" ... that means a dir is created at /usr/lib64/locale while a symlink is created at /usr/lib32/locale glibc itself installs nothing at all into /usr/lib on a multilib system
/usr/portage/eclass/multilib.eclass: # get_all_libdirs: # Returns a list of all the libdirs used by this profile. This includes # those that might not be touched by the current ebuild and always includes # "lib". so the "lib" directory is always included in the list returned by get_all_libdirs. The dosym call for l = "lib" is causing another problem: during a catalyst stage1 build there is no /usr/lib -> lib64 symlink in the tmp/stage1root, meaning the dosym call will create /usr/lib as a directory which breaks the multilib setup. The IMHO real solution would be to create the /usr/lib symlink in glibc too: # Make sure the non-native interp can be found on multilib systems if has_multilib_profile ; then case $(tc-arch) in amd64) [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib [[ ! -e ${D}/usr/lib ]] && dosym $(get_abi_LIBDIR amd64) /usr/lib dosym /$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2 ;; ppc64) [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib [[ ! -e ${D}/usr/lib ]] && dosym $(get_abi_LIBDIR ppc64) /usr/lib dosym /$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1 ;; esac fi
Ok, this is what i have. My current glibc(2.3.6) installation is fine. Its CONTENTS shows no /usr/lib entry. However, i have an image directory of a non-merged glibc-2.4 run here, that has these entries: dvandyk@phi atheros $ ll /var/tmp/portage/glibc-2.4-r3/image/usr/ total 24 drwxr-xr-x 2 root root 4096 Aug 4 23:03 bin drwxr-xr-x 21 root root 4096 Aug 4 23:03 include drwxr-xr-x 2 root root 4096 Aug 4 23:03 lib drwxr-sr-x 5 root root 4096 Aug 4 23:03 lib64 drwxr-xr-x 2 root root 4096 Aug 4 23:03 sbin drwxr-xr-x 7 root root 4096 Aug 4 23:03 share dvandyk@phi atheros $ ll /var/tmp/portage/glibc-2.4-r3/image/usr/lib/ total 0 lrwxrwxrwx 1 root root 17 Aug 4 23:03 locale -> /usr/lib64/locale So, it doesn't create /usr/lib32, and it puts a symlink to /usr/lib64/locale into /usr/lib/.
> The IMHO real solution would be to create the /usr/lib symlink in glibc too: no ... the reason we make an exception for /lib is because of binary requirements for the dynamic interpreters ... all ELF binaries built on x86 32bit have /lib/ld-linux.so.2 hardcoded in them
odd then that my tests missed the /usr/lib/locale ... at any rate, ive changed the code to read this: keepdir /usr/$(get_libdir)/locale for a in $(get_install_abis) ; do if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale fi done