In a previous bug (#381807), I reported that the install name check on Darwin was broken for install names that contain special variables (i.e. the path begins with @<var-name>). This is the problem that caused me to report that bug. On Darwin, the LLVM ebuilds all contain a hack to fix the install name because LLVM doesn't respect the --libdir option to configure. I haven't fixed it yet on their end because of some build-system confusion that was going on, but I'll get to that soon enough--maybe not in time for 3.1, but soon. Meanwhile, I've discovered the reason the install names are wrong for the LLVM trunk ebuild: it uses the package version (9999) when LLVM's idea of its version is 3.1svn. This works fine for the release LLVM ebuilds, where the package version just so happens to be the same as the LLVM version, but this doesn't work for the LLVM trunk ebuild. I'll attach a small patch that should fix this. It will need to be updated again after the upcoming 3.1 release, but it should work for now. Once I fix this on LLVM's end, we can get rid of that awful hack. Reproducible: Always Steps to Reproduce: 1. Add this line to the package.keywords file: =sys-devel/llvm-9999 ** 2. emerge =sys-devel/llvm-9999 Actual Results: Dynamic dependencies refer to nonexistent file <prefix>/usr/lib/llvm/libLLVM-9999.dylib. Expected Results: Dynamic dependencies should refer to the actual file, <prefix>/usr/lib/llvm/libLLVM-<next-version>svn.dylib. As of this writing <next-version> is 3.1, but that will change after the upcoming release. Portage 2.2.01.20389-prefix (prefix/darwin/macos/10.6/x86, gcc-4.2.1, unavailable, 10.8.0 i386) ================================================================= System uname: Darwin-10.8.0-i386-32bit Timestamp of tree: Sun, 15 Apr 2012 19:18:38 +0000 distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled] ccache version 3.1.4 [disabled] app-shells/bash: 4.2_p20::gentoo_prefix dev-lang/python: 2.7.2-r3::gentoo_prefix dev-util/ccache: 3.1.4::gentoo_prefix dev-util/cmake: 2.8.7-r5::gentoo_prefix dev-util/pkgconfig: 0.26::gentoo_prefix sys-devel/autoconf: 2.68::gentoo_prefix sys-devel/automake: 1.10.3::gentoo_prefix, 1.11.1::gentoo_prefix sys-devel/gcc-config: 1.5-r2::gentoo_prefix sys-devel/libtool: 2.4-r4::gentoo_prefix sys-devel/make: 3.82::gentoo_prefix Repositories: gentoo_prefix Installed sets: ACCEPT_KEYWORDS="~x86-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-apple-darwin10" CFLAGS="-O2 -pipe -march=core2" CHOST="i686-apple-darwin10" 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/portage /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=core2" DISTDIR="/Users/chip/Gentoo/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles force-prefix news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-dead_strip_dylibs" MAKEOPTS="-j8" PKGDIR="/Users/chip/Gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/Users/chip/Gentoo/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/Users/chip/Gentoo/var/tmp" PORTDIR="/Users/chip/Gentoo/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="X aqua bash-completion berkdb bzip2 cairo coreaudio cracklib crypt curl cxx dbus doc exceptions expat extensions fontconfig gdbm gmp gnutls gpg gzip iconv icu ipv6 jbig jpeg libssh2 lzma lzo mmx mmxext mng modules mysql ncurses nls objc objc++ pch perl png prefix python qt3support readline ruby sasl sql sqlite sqlite3 sse sse2 ssl subversion threads tiff tk truetype unicode vim vim-syntax x86-macos xinerama xml xpm xv 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" CAMERAS="ptp2" ELIBC="Darwin" GPSD_PROTOCOLS="garmin garmintxt gpsclock" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="apple" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 309085 [details, diff] Patch to fix LLVM install names
Is there a way to retrieve this version number from the sources somehow? That would make this patch slightly more robust for as long as there is no way to have install_names like we prefer from upstream.
I used a grep on configure for PACKAGE_VERSION to get the correct version. This seems to work, and is more flexible than your patch. Thanks for your suggestion, though!