An example here is =sys-libs/zlib-1.2.8-r1. When emerged on ISA=mips32r2 ABI=o32 uclibc, the configure phase and the compile phase do nothing and the image directory $D is empty after install (except for a skeletal directory structure). Here's eclass-debug.log which looks like its picking up the ABI value but not acting on it when the eclass does multilib_foreach_abi ... Note I killed it at qmerge otherwise it would break my system. inherit: autotools -> /usr/portage/eclass/autotools.eclass *** Multiple Inheritence (Level: 2) inherit: libtool -> /usr/portage/eclass/libtool.eclass *** Multiple Inheritence (Level: 3) inherit: multilib -> /usr/portage/eclass/multilib.eclass *** Multiple Inheritence (Level: 4) inherit: toolchain-funcs -> /usr/portage/eclass/toolchain-funcs.eclass *** Multiple Inheritence (Level: 5) inherit: multilib -> /usr/portage/eclass/multilib.eclass inherit: toolchain-funcs -> /usr/portage/eclass/toolchain-funcs.eclass inherit: multiprocessing -> /usr/portage/eclass/multiprocessing.eclass inherit: toolchain-funcs -> /usr/portage/eclass/toolchain-funcs.eclass inherit: multilib -> /usr/portage/eclass/multilib.eclass inherit: multilib-minimal -> /usr/portage/eclass/multilib-minimal.eclass *** Multiple Inheritence (Level: 2) inherit: multilib-build -> /usr/portage/eclass/multilib-build.eclass *** Multiple Inheritence (Level: 3) inherit: multibuild -> /usr/portage/eclass/multibuild.eclass *** Multiple Inheritence (Level: 4) inherit: multiprocessing -> /usr/portage/eclass/multiprocessing.eclass inherit: multilib -> /usr/portage/eclass/multilib.eclass EXPORT_FUNCTIONS: src_configure -> multilib-minimal_src_configure EXPORT_FUNCTIONS: src_compile -> multilib-minimal_src_compile EXPORT_FUNCTIONS: src_test -> multilib-minimal_src_test EXPORT_FUNCTIONS: src_install -> multilib-minimal_src_install multilib_copy_sources: entering function, parameters: multilib_get_enabled_abis: entering function, parameters: multilib_get_enabled_abis: no ABIs enabled, fallback to o32 multilib_get_enabled_abis: ABI=o32, DEFAULT_ABI=o32 multibuild_copy_sources: entering function, parameters: multibuild_foreach_variant: entering function, parameters: _multibuild_create_source_copy multibuild_foreach_variant: initial build_dir = /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 multilib_foreach_abi: entering function, parameters: multilib-minimal_abi_src_configure multilib_get_enabled_abis: entering function, parameters: multilib_get_enabled_abis: no ABIs enabled, fallback to o32 multilib_get_enabled_abis: ABI=o32, DEFAULT_ABI=o32 multibuild_foreach_variant: entering function, parameters: _multilib_multibuild_wrapper multilib-minimal_abi_src_configure multibuild_foreach_variant: initial build_dir = /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 multilib_foreach_abi: entering function, parameters: multilib-minimal_abi_src_compile multilib_get_enabled_abis: entering function, parameters: multilib_get_enabled_abis: no ABIs enabled, fallback to o32 multilib_get_enabled_abis: ABI=o32, DEFAULT_ABI=o32 multibuild_foreach_variant: entering function, parameters: _multilib_multibuild_wrapper multilib-minimal_abi_src_compile multibuild_foreach_variant: initial build_dir = /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 multilib_foreach_abi: entering function, parameters: multilib-minimal_abi_src_install multilib_get_enabled_abis: entering function, parameters: multilib_get_enabled_abis: no ABIs enabled, fallback to o32 multilib_get_enabled_abis: ABI=o32, DEFAULT_ABI=o32 multibuild_foreach_variant: entering function, parameters: _multilib_multibuild_wrapper multilib-minimal_abi_src_install multibuild_foreach_variant: initial build_dir = /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 multilib_install_wrappers: entering function, parameters:
Here's the build log * Package: sys-libs/zlib-1.2.8-r1 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: elibc_uclibc kernel_linux mips uclibc userland_GNU * FEATURES: sandbox * Package: sys-libs/zlib-1.2.8-r1 * Repository: gentoo * Maintainer: base-system@gentoo.org * USE: elibc_uclibc kernel_linux mips uclibc userland_GNU * FEATURES: sandbox >>> Unpacking source... >>> Unpacking zlib-1.2.8.tar.gz to /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work >>> Source unpacked in /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work >>> Preparing source in /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 ... * Will copy sources from /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 /var/tmp/portage/sys-libs/zlib-1.2.8-r1/temp/environment: line 1285: /dev/fd/62: No such file or directory >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 ... /var/tmp/portage/sys-libs/zlib-1.2.8-r1/temp/environment: line 1299: /dev/fd/62: No such file or directory >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-libs/zlib-1.2.8-r1/work/zlib-1.2.8 ... /var/tmp/portage/sys-libs/zlib-1.2.8-r1/temp/environment: line 1299: /dev/fd/62: No such file or directory >>> Source compiled. >>> Test phase [not enabled]: sys-libs/zlib-1.2.8-r1 >>> Install zlib-1.2.8-r1 into /var/tmp/portage/sys-libs/zlib-1.2.8-r1/image/ category sys-libs /var/tmp/portage/sys-libs/zlib-1.2.8-r1/temp/environment: line 1299: /dev/fd/62: No such file or directory >>> Completed installing zlib-1.2.8-r1 into /var/tmp/portage/sys-libs/zlib-1.2.8-r1/image/ /usr/lib/portage/bin/ebuild-helpers/prepstrip: line 289: /dev/fd/62: No such file or directory /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory ecompressdir: bzip2 -9 /usr/share/doc /usr/lib/portage/bin/ebuild-helpers/ecompressdir: line 72: /dev/fd/62: No such file or directory
Okay this is solved by adding at least the following to the profile (hardened/linux/uclibc/mips): LIBDIR_o32="lib" however I will add also DEFAULT_ABI="o32" ABI="${DEFAULT_ABI}" since it makes explicit the ABI. This may be required in some of the other minor arches (like eabi for arm) but at least I get what the multilib-* eclasses are looking for. I'm still puzzled why amd64 and x86 just work without any LIBDIR/ABI set but for good measure I will set them there too.
Well, IMO multiprocessing.eclass would still use some '|| die' or assertion love. Failing that horribly because of improper /dev setup is not something good to do.
(In reply to Michał Górny from comment #3) you really need to provide actual details and not just generalizations. if you read the code, you'll see that it already has `die` in a bunch of places. Anthony: can you attach the output of running `emerge --debug zlib` and make sure you have a /dev/fd symlink ?
(In reply to SpanKY from comment #4) > (In reply to Michał Górny from comment #3) > > you really need to provide actual details and not just generalizations. if > you read the code, you'll see that it already has `die` in a bunch of places. > > Anthony: can you attach the output of running `emerge --debug zlib` and make > sure you have a /dev/fd symlink ? He didn't have the symlink. That's what IMO multiprocessing should assert for.
(In reply to Michał Górny from comment #5) but multiprocessing.eclass isn't using /dev/fd directly (ignoring the fallback logic in redirect_alloc_fd which wasn't run in Anthony's case) so why does this check belong in multiprocessing ?
(In reply to SpanKY from comment #6) > (In reply to Michał Górny from comment #5) > > but multiprocessing.eclass isn't using /dev/fd directly (ignoring the > fallback logic in redirect_alloc_fd which wasn't run in Anthony's case) Well, I specifically meant asserting in the fallback logic.
(In reply to Michał Górny from comment #7) but that wouldn't have made a difference in this bug report :). so even if there was an assert there a year ago, Anthony still would have filed this bug and the output would have been unchanged.
(In reply to SpanKY from comment #8) > (In reply to Michał Górny from comment #7) > > but that wouldn't have made a difference in this bug report :). so even if > there was an assert there a year ago, Anthony still would have filed this > bug and the output would have been unchanged. I know. I'm just using this bug as an opportunity to fix the other issue. Do you really want me to file a separate report for that?
(In reply to Anthony Basile from comment #2) > Okay this is solved by adding at least the following to the profile > (hardened/linux/uclibc/mips): > > LIBDIR_o32="lib" > > however I will add also > > DEFAULT_ABI="o32" > ABI="${DEFAULT_ABI}" > > since it makes explicit the ABI. This may be required in some of the other > minor arches (like eabi for arm) but at least I get what the multilib-* > eclasses are looking for. I have the same issue with the following profile: # ls -l /etc/portage/make.profile lrwxrwxrwx 1 root root 52 Nov 26 19:54 /etc/portage/make.profile -> ../../usr/portage/profiles/hardened/linux/arm/armv6j
# grep CHOST= /etc/portage/make.conf CHOST="armv6j-hardfloat-linux-gnueabi"
Please ignore my comments. =/
(In reply to Michał Górny from comment #9) the point was that your comment #3 which re-opened & re-assigned things (as well as later ones) never made that clear.
http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.4&r2=1.5
(In reply to SpanKY from comment #14) Breaks on AIX (in Prefix) now, as AIX does not have /dev/fd at all. Because of this, bash handles /dev/fd/[0-9]* and /dev/std{in,out,err} itself, allowing for the fallback in redirect_alloc_fd() to still work. However, this special handling is disabled (at compile time) when the OS provides this handling. Thus [[ -L /dev/fd ]] is false while [[ -e /dev/fd/0 ]] still is true. Though not sure how to fix this correctly: Does PM guarantee (one of) /dev/fd/{0,1,2} to be available? Then [[ ! -e /dev/fd/0 ]] should work here instead.
Yes, This hunk of code breaks on FreeMiNT too. # Make sure /dev/fd is sane. #479656 if [[ ! -L /dev/fd ]] ; then eerror "You're missing a /dev/fd symlink to /proc/self/fd." eerror "Please fix the symlink and check your boot scripts (udev/etc...)." die "/dev/fd is broken" fi Surely, it should be moved to the 'else' clause where direct use of /dev/fd is made. That means platforms with an appropriate bash will use the former code. Not ideal, but it will avoid the issue in most cases.
The fix does not work on Mac OSX either.
(In reply to SpanKY from comment #14) > http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.4&r2=1.5 Can we please revert this change since it causes any ebuild that calls eautoreconf to fail on those archs that don't have a /dev/fd symlink?
+ 06 Dec 2013; Jonathan Callen <jcallen@gentoo.org> multiprocessing.eclass: + Fix multiprocessing.eclass for non-Linux hosts + This fix probably could be made better, but at least it isn't completely broken now.
(In reply to Jonathan Callen from comment #19) please post links to diffs, not useless changelog entries: http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.5&r2=1.6 uname is bad, but i don't have a fundamentally better answer. i've changed it to CBUILD instead at least. http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.6&r2=1.7
It breaks gentooandroid.sourceforge.net too. Isn't it simpler to use use prefix || than if [[ ! -L /dev/fd && ${CBUILD} == *linux* ]] ; then ? The local fix I use is if [[ ! -L /dev/fd && ${CBUILD} == *linux* && ! has non-root ${FEATURES} ]] ; then