Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546098 - net-libs/http-parser-2.4.2: emerge fails with invalid install_name on OSX
Summary: net-libs/http-parser-2.4.2: emerge fails with invalid install_name on OSX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-10 00:08 UTC by MATSUI Tetsushi
Modified: 2017-03-07 08:08 UTC (History)
1 user (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 MATSUI Tetsushi 2015-04-10 00:08:43 UTC
emerge net-libs/http-parser-2.4.2, which is one of depends of net-libs/nodejs,
fails with invalid install_name.

 * QA Notice: Found .so dynamic libraries on Darwin:
 *     Users/tetsushi/G2/usr/lib/libhttp_parser.so.2.4.2
 * QA Notice: invalid self-reference install_name libhttp_parser.so.2.4.2 in /Users/tetsushi/G2/usr/lib/libhttp_parser.so.2.4.2
 * ERROR: net-libs/http-parser-2.4.2::mft_experimental failed:
 *   invalid install_name found, your application or library will crash at runtime
 


Reproducible: Always

Steps to Reproduce:
1. keyword net-libs/http-parser
2. emerge net-libs/http-parser




net-libs/nodejs is keyworded with x64-macos but its depend net-libs/http-parser isn't.
So I tried to emerge with keywording it but it fails.

The fix will be to change linker option in Makefile, maybe.

emerge --info:
Portage 2.2.14-prefix (python 2.7.8-final-0, prefix/darwin/macos/10.9/x64, gcc-4.2.1, unavailable, 13.4.0 x86_64)
=================================================================
System uname: Darwin-13.4.0-x86_64-i386-64bit
Timestamp of tree: Sun, 05 Apr 2015 02:07:26 +0000
app-shells/bash:      4.2_p53
dev-lang/perl:        5.20.2
dev-lang/python:      2.7.8, 3.3.3
dev-util/cmake:       3.1.0
dev-util/pkgconfig:   0.28-r2
sys-devel/autoconf:   2.69
sys-devel/automake:   1.14.1
sys-devel/gcc-config: 1.8-r1
sys-devel/libtool:    2.4.2-r1
sys-devel/make:       4.1-r1
Repositories: gentoo_prefix mft_experimental betagarden
ACCEPT_KEYWORDS="x64-macos x86-macos ~x64-macos ~x86-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin13"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-apple-darwin13"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/Users/tetsushi/G2/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.gg3.net/ http://ftp.iij.ad.jp/pub/linux/gentoo/ http://distfiles.gentoo.org/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-dead_strip_dylibs"
MAKEOPTS="-j1"
PKGDIR="/Users/tetsushi/G2/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/tetsushi/G2/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/tetsushi/G2/var/tmp"
PORTDIR="/Users/tetsushi/G2/usr/portage"
PORTDIR_OVERLAY="/Users/tetsushi/Projects/mft_experimental /Users/tetsushi/G2/var/lib/layman/betagarden"
SYNC="rsync://rsync8.prefix.bitzolder.nl/gentoo-portage-prefix"
USE="aqua cjk coreaudio cracklib cxx emacs gif ipv6 jpeg libav mmx mmxext modules ncurses nls objc objc++ png prefix prefix-guest python readline sse sse2 ssl unicode x64-macos zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ja en it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby21" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Leho Kraav (:macmaN @lkraav) 2015-08-25 20:19:19 UTC
2.5.0 doesn't work either

>>> Emerging (1 of 3) net-libs/http-parser-2.5.0::gentoo_prefix
 * http-parser-2.5.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                        [ ok ]
>>> Unpacking source...
>>> Unpacking http-parser-2.5.0.tar.gz to /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work
>>> Source unpacked in /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work
>>> Preparing source in /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0 ...
 * Will copy sources from /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0
 * .amd64: copying to /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0-.amd64
>>> Source prepared.
>>> Configuring source in /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0 ...
 * .amd64: running multilib-minimal_abi_src_configure
>>> Source configured.
>>> Compiling source in /opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0 ...
 * .amd64: running multilib-minimal_abi_src_compile
make -j5 library 
x86_64-apple-darwin14-gcc  -I. -DHTTP_PARSER_STRICT=0  -march=nocona -march=core2 -O2 -pipe -Wall -Wextra  -fPIC -c http_parser.c -o libhttp_parser.o
x86_64-apple-darwin14-gcc -Wl,-dead_strip_dylibs -shared -o libhttp_parser.so.2.5.0 libhttp_parser.o
ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture x86_64
collect2: ld returned 1 exit status
Makefile:93: recipe for target 'library' failed
make: *** [library] Error 1
 * ERROR: net-libs/http-parser-2.5.0::gentoo_prefix failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-libs/http-parser-2.5.0::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/http-parser-2.5.0::gentoo_prefix'`.
 * The complete build log is located at '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/temp/build.log'.
 * The ebuild environment file is located at '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/temp/environment'.
 * Working directory: '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0-.amd64'
 * S: '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0'

>>> Failed to emerge net-libs/http-parser-2.5.0, Log file:

>>>  '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/temp/build.log'

 * Messages for package net-libs/http-parser-2.5.0:

 * ERROR: net-libs/http-parser-2.5.0::gentoo_prefix failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-libs/http-parser-2.5.0::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/http-parser-2.5.0::gentoo_prefix'`.
 * The complete build log is located at '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/temp/build.log'.
 * The ebuild environment file is located at '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/temp/environment'.
 * Working directory: '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0-.amd64'
 * S: '/opt/prefix/var/tmp/portage/net-libs/http-parser-2.5.0/work/http-parser-2.5.0'
Comment 2 Leho Kraav (:macmaN @lkraav) 2015-08-25 20:33:41 UTC
Discovered that my problem is actually the gcc toolchain completely gone broke, probably due to xcode updates.
Comment 3 Fabian Groffen gentoo-dev 2015-08-26 08:22:30 UTC
hmmm, I see gcc, that's no good
Comment 4 Guilherme Amadio gentoo-dev 2015-08-26 08:25:57 UTC
Yeah, you may need a rebootstrap using clang to fix the toolchain, as gcc is no longer supported on OS X.
Comment 5 Leho Kraav (:macmaN @lkraav) 2015-08-28 09:24:10 UTC
Yes, I'm re-bootstrapped on clang now.

http-parser-2.5.0 still suffers from the same "Found .so dynamic libraries on Darwin" error :/
Comment 6 Leho Kraav (:macmaN @lkraav) 2015-08-28 10:43:35 UTC
iojs also depends on http-parser, so this gets things quite stuck. Do any of you smarter folks know if this library's set up routine is a difficult specific or a general prefix problem? Losing an unknown amount of time debugging this when there wasn't any hope to begin with would really suck.
Comment 7 Fabian Groffen gentoo-dev 2015-08-28 12:26:37 UTC
err, yeah, it needs some fixing to set -install_name ${EPREFIX}/usr/lib/libhttp....

toolchain won't really matter here
Comment 8 Askar Bektassov 2016-02-25 20:24:07 UTC
Hi Fabian,

I am having a similar error with http-parser-2.6.1 on El Capitan

>>> Completed installing http-parser-2.6.1 into /Users/askarbektassov/Gentoo/var/tmp/portage/net-libs/http-parser-2.6.1/image/

 * Final size of build directory: 572 KiB
 * Final size of installed tree: 68 KiB

ecompressdir: bzip2 -9 /usr/share/doc
 * QA Notice: invalid self-reference install_name libhttp_parser.2.6.1.dylib in /Users/askarbektassov/Gentoo/usr/lib/libhttp_parser.2.6.1.dylib
 * ERROR: net-libs/http-parser-2.6.1::gentoo_prefix failed:
 *   invalid install_name found, your application or library will crash at runtime
Comment 9 John Gibson 2017-03-06 20:16:09 UTC
(In reply to Askar Bektassov from comment #8)
> Hi Fabian,
> 
> I am having a similar error with http-parser-2.6.1 on El Capitan
> 
> >>> Completed installing http-parser-2.6.1 into /Users/askarbektassov/Gentoo/var/tmp/portage/net-libs/http-parser-2.6.1/image/
> 
>  * Final size of build directory: 572 KiB
>  * Final size of installed tree: 68 KiB
> 
> ecompressdir: bzip2 -9 /usr/share/doc
>  * QA Notice: invalid self-reference install_name libhttp_parser.2.6.1.dylib
> in /Users/askarbektassov/Gentoo/usr/lib/libhttp_parser.2.6.1.dylib
>  * ERROR: net-libs/http-parser-2.6.1::gentoo_prefix failed:
>  *   invalid install_name found, your application or library will crash at
> runtime

This problem still exists for in http-parser-2.6.2 on Sierra. I was able to fix it by altering the ebuild like so:

-       emake CFLAGS_FAST="${CFLAGS}" library
+       emake CFLAGS_FAST="${CFLAGS}" LDFLAGS_LIB="-shared -Wl,-dylib_install_name,${EPREFIX}/usr/$(get_libdir)/libhttp_parser.dylib" 
library

However, this is obviously non-portable and I don't know how to fix it the right way.
Comment 10 Fabian Groffen gentoo-dev 2017-03-07 08:08:29 UTC
It appeared not that difficult, although the end-result is odd.  This has to do with an upstream bug.  In any case, pushed the fix, thanks!