Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 391763 - sys-devel/llvm-2.8-r2 fails to link correctly on Mac OS 10.7
Summary: sys-devel/llvm-2.8-r2 fails to link correctly on Mac OS 10.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-24 07:52 UTC by Stuart Shelton
Modified: 2011-11-24 08:57 UTC (History)
0 users

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 Stuart Shelton 2011-11-24 07:52:41 UTC
After building binutils-apple-4.2 with USE="lto":

...
>>> Original instance of package unmerged safely.
 * Switching to x86_64-apple-darwin11-4.2 ...
collect2: ld terminated with signal 5 [Trace/BPT trap: 5]
dyld: Library not loaded: @executable_path/../lib/libLLVM-2.8.dylib
  Referenced from: /opt/gentoo/usr/lib/llvm/libLTO.dylib
  Reason: image not found
>>> sys-devel/binutils-apple-4.2 merged.

Am I mis-reading this, or did "@executable_path" get hardcoded?

$ binutils-config -l
 [1] x86_64-apple-darwin11-3.2.6 *
 [2] x86_64-apple-darwin11-4.2

$ epm -ql llvm | grep dylib
/opt/gentoo/usr/lib/llvm/libBugpointPasses.dylib
/opt/gentoo/usr/lib/llvm/libEnhancedDisassembly.dylib
/opt/gentoo/usr/lib/llvm/libLLVM-2.8.dylib
/opt/gentoo/usr/lib/llvm/libLLVMHello.dylib
/opt/gentoo/usr/lib/llvm/libLTO.dylib
/opt/gentoo/usr/lib/llvm/libprofile_rt.dylib

$ emerge --info

Portage 2.2.01.19572-prefix (prefix/darwin/macos/10.7/x64, gcc-4.2.1, unavailable, 11.2.0 x86_64)
=================================================================
System uname: Darwin-11.2.0-x86_64-i386-64bit
Timestamp of tree: Tue, 22 Nov 2011 22:40:15 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin11.0 [disabled]
app-shells/bash:      4.2_p10
dev-java/java-config: 2.1.11-r3
dev-lang/python:      2.6.5-r2, 2.7.2-r3
dev-util/pkgconfig:   0.26
sys-devel/autoconf:   2.68
sys-devel/automake:   1.10.3, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:    2.4-r4
sys-devel/make:       3.82
Repositories: gentoo_prefix local
Installed sets: @preserved-rebuild
ACCEPT_KEYWORDS="amd64 amd64-linux ppc-macos x64-macos x86 x86-linux x86-macos ~amd64 ~amd64-linux ~ppc-macos ~x64-macos ~x86 ~x86-linux ~x86-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin11"
CFLAGS="-O2 -fno-math-errno -march=core2 -msse4 -msse4.1 -msse4.2 -mfpmath=sse -pipe"
CHOST="x86_64-apple-darwin11"
CONFIG_PROTECT="/etc /opt/gentoo/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo /opt/gentoo/etc/ca-certificates.conf /opt/gentoo/etc/env.d /opt/gentoo/etc/env.d/java/ /opt/gentoo/etc/fonts/fonts.conf /opt/gentoo/etc/gconf /opt/gentoo/etc/revdep-rebuild /opt/gentoo/etc/terminfo"
CXXFLAGS="-O2 -fno-math-errno -march=core2 -msse4 -msse4.1 -msse4.2 -mfpmath=sse -pipe"
DISTDIR="/opt/gentoo/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-dead_strip_dylibs"
LINGUAS="en en_GB"
MAKEOPTS="-j5"
PKGDIR="/opt/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/opt/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/opt/gentoo/var/tmp"
PORTDIR="/opt/gentoo/usr/portage"
PORTDIR_OVERLAY="/opt/gentoo/usr/local/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X aqua ares bash-completion berkdb bzip2 cairo chroot common-lisp coreaudio cracklib cxx expat faac faad fftw flac fontconfig gdbm gmp graphviz gs gtk hpn iconv icu idea ipv6 ithreads java jbig jpeg jpeg2k lcms libedit lzma md5sum mmap mmx mmxext modules mp3 ncurses network nls objc objc++ ogg opengl openmp pcre perl png prefix python rar readline sasl schroedinger slang sndfile speex spell sqlite sqlite3 sse sse2 ssl svg tcl theora threads tiff tk trace unicode urandom utils vdpau vim-syntax vorbis wmf x64-macos xcb xinerama xml xpm xvid zlib" APACHE2_MODULES="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 stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Stuart Shelton 2011-11-24 08:02:13 UTC
Looking at it, both libraries come from sys-devel/llvm-2.8-r2 - so something appears to be wrong with this package on Lion?
Comment 2 Fabian Groffen gentoo-dev 2011-11-24 08:26:42 UTC
don't think this is Lion related, somehow the install_names don't get "fixed"
Comment 3 Fabian Groffen gentoo-dev 2011-11-24 08:30:29 UTC
Ok, the ebuild expects something else than @executable_path.  We'll have to be a bit more flexible, I guess.
Comment 4 Fabian Groffen gentoo-dev 2011-11-24 08:57:26 UTC
I think I have this fixed now.  I just lookup the install_name as used by the lib, and change what was found, instead of assuming what the install_name is.