Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555790 - sys-apps/coreutils-8.24::gentoo_prefix : emerge failed with error invalid install_name
Summary: sys-apps/coreutils-8.24::gentoo_prefix : emerge failed with error invalid ins...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 556766 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-24 12:32 UTC by Alfred
Modified: 2015-08-08 15:26 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred 2015-07-24 12:32:25 UTC
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.
Comment 1 Johan Hattne 2015-07-28 02:24:45 UTC
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.
Comment 2 Alfred 2015-07-28 16:15:22 UTC
(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.
Comment 3 Alfred 2015-07-28 19:32:02 UTC
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.
Comment 4 SpanKY gentoo-dev 2015-08-04 02:12:04 UTC
afaict, this is entirely a prefix ebuild customization
Comment 5 Fabian Groffen gentoo-dev 2015-08-08 10:09:24 UTC
*** Bug 556766 has been marked as a duplicate of this bug. ***
Comment 6 Fabian Groffen gentoo-dev 2015-08-08 10:27:29 UTC
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.
Comment 7 Fabian Groffen gentoo-dev 2015-08-08 10:30:58 UTC
right, so the code supports darwin, yay.