To bootstrap gentoo prefix with interactive installer on OS X Yosemite 10.10.4, the script stopped at stage3 when emerging sys-apps/coreutils-8.24::gentoo_prefix. The error in build log is listed below : * QA Notice: Found .so dynamic libraries on Darwin: * Users/Alfred/Gentoo/usr/libexec/coreutils/libstdbuf.so * QA Notice: invalid self-reference install_name src/libstdbuf.so in /Users/Alfred/Gentoo/usr/libexec/coreutils/libstdbuf.so * ERROR: sys-apps/coreutils-8.24::gentoo_prefix failed: * invalid install_name found, your application or library will crash at runtime * * Call stack: * misc-functions.sh, line 1225: Called install_qa_check * misc-functions.sh, line 241: Called install_qa_check_macho * misc-functions.sh, line 422: Called die * The specific snippet of code: * has allow_broken_install_names ${FEATURES} || \ * die "invalid install_name found, your application or library will crash at runtime" Reproducible: Always Steps to Reproduce: 1.Bootstrap with interactive installer 2. 3. Actual Results: emerge stopped at sys-apps/coreutils-8.24 bootstrap failed Expected Results: There should be no error which blocks bootstrapping. I've tried bootstrapping gentoo prefix on OS X (fresh install) multiple times within a week, all failed at different packages but with the same error. First it was at `emerge -e system` when emerging help2man but stage3 passed successfully. Then stage3 won't continue because coreutils failed installing. Both help2man and coreutils had version bumps recently, since gentoo prefix use unstable ~x64macos, this maybe related to ebuild problems.
I kludged around this issue by adding for l in "${ED}"/usr/libexec/coreutils/*.so ; do install_name_tool -id "${EPREFIX}"/usr/libexec/coreutils/${l##*/} "${l}" done to the ebuild's src_install() function. I have no idea what libstdbuf.so is, but a similar hack allowed me to merge sys-apps/help2man as well.
(In reply to Johan Hattne from comment #1) > I kludged around this issue by adding > > for l in "${ED}"/usr/libexec/coreutils/*.so ; do > install_name_tool -id "${EPREFIX}"/usr/libexec/coreutils/${l##*/} "${l}" > done > > to the ebuild's src_install() function. I have no idea what libstdbuf.so > is, but a similar hack allowed me to merge sys-apps/help2man as well. Thanks for your reply but I have no idea how to manually modify ebuild when bootstrapping. By the way can you explain how your scripts work please? I don't have a working prefix now so that I'm unable to test install_name_tool and google doesn't help much.
I managed to mask coreutils-8.24 by package.mask method and bootstrapped successfully. As far as I know, prefix portage tree is an overlay on main tree, in this case ~x64macos on ~amd64. I checked coreutils ebuild on overlay portage tree (http://hg.code.sf.net/p/gentooprefixtree/code/rev/e9432baf944d), the version 8.24 was a version bump only. So the actual problem should be something located at ~amd64 on version 8.24, which breaks prefix. But a fix should be applied to overlay ebuild.
afaict, this is entirely a prefix ebuild customization
*** Bug 556766 has been marked as a duplicate of this bug. ***
stdbuf should only be installed on ELF platforms. Haubi added a patch for 8.23, but that one no longer applies. https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html still mentions it should only be enabled on ELF platforms, so I guess we need a different patch for it.
right, so the code supports darwin, yay.
Fixed, thanks https://sourceforge.net/p/gentooprefixtree/code/ci/8428be58e400b968e3637bd71581546f5e96234c/