gawk-3.1.6 fails to emerge. It complains ld was given an unknonw option -soname. Reproducible: Always Steps to Reproduce: 1. emerge =sys-apps/gawk-3.1.6 Actual Results: [...] make[1]: Leaving directory `/Users/hongqn/Gentoo/var/tmp/portage/sys-apps/gawk-3.1.6/work/gawk-3.1.6' i686-apple-darwin9-gcc -O2 -pipe -march=nocona -shared -Wall -DHAVE_CONFIG_H -c -O2 -fPIC -I/Users/hongqn/Gentoo/var/tmp/portage/sys-apps/gawk-3.1.6/work/gawk-3.1.6 filefuncs.c i686-apple-darwin9-gcc -o filefuncs.so.0.0.1 -shared -Wl,-soname -Wl,filefuncs.so.0 filefuncs.o ld: unknown option: -soname collect2: ld returned 1 exit status make: *** [filefuncs.so.0.0.1] Error 1 * ERROR: sys-apps/gawk-3.1.6 failed: * filefuncs emake failed * * Call stack: * ebuild.sh: 49: <call src_compile> * environment:2104: emake CC=$(tc-getCC) LIBDIR="${EPREFIX}/$(get_libdir)" || die "filefuncs emake failed" * * If you need support, post the topmost build error, and the call stack if relevant. * build log: '/Users/hongqn/Gentoo/var/tmp/portage/sys-apps/gawk-3.1.6/temp/build.log' * ebuild environment: '/Users/hongqn/Gentoo/var/tmp/portage/sys-apps/gawk-3.1.6/temp/environment' * S: '/Users/hongqn/Gentoo/var/tmp/portage/sys-apps/gawk-3.1.6/work/gawk-3.1.6' Expected Results: It should emerge smoothly. $ which ld /Users/hongqn/Gentoo/usr/bin/ld $ ld -soname ld: unknown option: -soname $ emerge --info Portage 2.2.00.10418-prefix (default-prefix/darwin/macos/10.5/x86, gcc-4.0.1, unavailable, 9.3.0 i386) ================================================================= System uname: 9.3.0 i386 i386 Timestamp of tree: Tue, 03 Jun 2008 03:51:30 +0000 distcc 2.18.5-Apple.1 powerpc-apple-darwin9.0 (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p39 dev-lang/python: 2.5.2-r4 sys-devel/autoconf: 2.61-r01.1 sys-devel/automake: 1.10.1-r1 sys-devel/gcc-config: 1.4.0-r04.3 sys-devel/libtool: 1.5.26 ACCEPT_KEYWORDS="~x86-macos" CBUILD="i686-apple-darwin9" CFLAGS="-O2 -pipe -march=nocona" CHOST="i686-apple-darwin9" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona" DISTDIR="/Users/hongqn/Gentoo/usr/portage/distfiles" EPREFIX="/Users/hongqn/Gentoo" FEATURES="collision-protect distlocks nostrip parallel-fetch preserve-libs sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="en_US.UTF-8" LDFLAGS="" MAKEOPTS="-j3" PKGDIR="/Users/hongqn/Gentoo/usr/portage/packages" 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="/Users/hongqn/Gentoo/var/tmp" PORTDIR="/Users/hongqn/Gentoo/usr/portage" PORTDIR_OVERLAY="/Users/hongqn/Gentoo/usr/local/portage" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="aqua bash-completion coreaudio cracklib midi mmx mmxext ncurses nls objc objc++ prefix readline sse sse2 ssl unicode vim-syntax x86-macos 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 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" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
does your ld know the '-h' option? grobian i think you already added a case for interix to pass -h instead of -soname? or was that for bootstrapping only? maybe the ld wrappers need some more work, to do it like the interix one.
$ ld -h ld: unknown option: -h
(In reply to comment #2) > $ ld -h > ld: unknown option: -h Huh? no soname support at all? could you please post the output of ld --help? This seems somehow mysterious...
$ ld --help ld64: For information on command line options please use 'man ld'. $ file ~/Gentoo/usr/bin/ld /Users/hongqn/Gentoo/usr/bin/ld: symbolic link to `i686-apple-darwin9-ld' $ file ~/Gentoo/usr/bin/i686-apple-darwin9-ld /Users/hongqn/Gentoo/usr/bin/i686-apple-darwin9-ld: symbolic link to `/Users/hongqn/Gentoo//usr/i686-apple-darwin9/bin/ld' $ file /Users/hongqn/Gentoo/usr/i686-apple-darwin9/bin/ld /Users/hongqn/Gentoo/usr/i686-apple-darwin9/bin/ld: Mach-O executable i386
(In reply to comment #4) > $ ld --help > ld64: For information on command line options please use 'man ld'. > $ file ~/Gentoo/usr/bin/ld > /Users/hongqn/Gentoo/usr/bin/ld: symbolic link to `i686-apple-darwin9-ld' > $ file ~/Gentoo/usr/bin/i686-apple-darwin9-ld > /Users/hongqn/Gentoo/usr/bin/i686-apple-darwin9-ld: symbolic link to > `/Users/hongqn/Gentoo//usr/i686-apple-darwin9/bin/ld' > $ file /Users/hongqn/Gentoo/usr/i686-apple-darwin9/bin/ld > /Users/hongqn/Gentoo/usr/i686-apple-darwin9/bin/ld: Mach-O executable i386 hmm.. ok, now i'm out :) grobian will have to take this bug, i have no idea, sorry
@mduft: Darwin linker does not have soname, but install_name :) Though it works a bit different. Looks like KERNEL is no longer being set.
downgrade portage to =portage-2.2.00.10347 and you'll find it works fine again. @dev-portage: it seems KERNEL isn't exported to the build environment any more. I'll try with the most recent prefix (trunk merged) version tonight to see if the problem is still in there too.
actually, KERNEL isn't even available from inside an ebuild (it's unset/empty), exporting part is probably fine.
I don't see kernel_darwin anywhere in use.force: http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/profiles/default-prefix/darwin I think that might be your problem. Forced flags are exempt from IUSE filtering, and it seems like it might be getting filtered due to not being in IUSE.
Indeed, adding use.force with the appropriate entries fixes the problem. Thanks zmedico!