The aclocal.m4 file (actually the tcl.m4 file that it includes) in tk 8.6 contains these lines: case $system in [...] Darwin-*) CFLAGS_OPTIMIZE=s [...] (n.b. There's similar code in the OpenBSD branch of that case statement.) The configure script uses this to set the default CFLAGS (which we override when we actually run configure with our own flags). Unfortunately, the Makefile combines both the default and our CFLAGS to yield the full CFLAGS. 's' is obviously not a compiler switch, so GCC coughs up on it and the build fails. It looks like they really meant to set it to '-Os' in this version, but for some reason, they haven't updated it yet. I'm going to report this upstream (if it isn't already), but there's no reason we can't work around this ourselves until they fix it. It's actually quite simple: just fix the offending line to: CFLAGS_OPTIMIZE=-Os and then re-run autoconf. Reproducible: Always Steps to Reproduce: 1. On Darwin (Mac OS X), emerge =dev-lang/tk-8.6.0 Actual Results: Build fails with: i686-apple-darwin10-gcc -c s [...] <prefix>/var/tmp/portage/dev-lang/tk-8.6.0/work/tk8.6.0/unix/../generic/tk3d.c i686-apple-darwin10-gcc: s: No such file or directory make: *** [tk3d.o] Error 1 Expected Results: Package should merge successfully. $ emerge --info Portage 2.2.01.21476-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: Sat, 12 Jan 2013 23:39:00 +0000 distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled] ccache version 3.1.8 [disabled] app-shells/bash: 4.2_p39-r1::gentoo_prefix dev-lang/python: 2.7.3-r2::gentoo_prefix, 3.3.0::gentoo_prefix dev-util/ccache: 3.1.8::gentoo_prefix dev-util/cmake: 2.8.9::gentoo_prefix dev-util/pkgconfig: 0.27.1::gentoo_prefix sys-devel/autoconf: 2.69::gentoo_prefix sys-devel/automake: 1.12.4::gentoo_prefix sys-devel/gcc-config: 1.8-r00.1::gentoo_prefix sys-devel/libtool: 2.4.2::gentoo_prefix sys-devel/make: 3.82-r4::gentoo_prefix Repositories: gentoo_prefix 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/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="<prefix>/usr/portage/distfiles" FCFLAGS="" FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox 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" PKGDIR="<prefix>/usr/portage/packages" PORTAGE_CONFIGROOT="<prefix>" 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="<prefix>/var/tmp" PORTDIR="<prefix>/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 pcre perl png prefix python qt3support readline ruby sasl sql sqlite sqlite3 sse sse2 ssl subversion threads tiff tk truetype unicode uuid vim vim-syntax x86-macos xinerama xml xpm xv 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" CAMERAS="ptp2" ELIBC="Darwin" GPSD_PROTOCOLS="garmin garmintxt gpsclock" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="apple" USERLAND="GNU" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
I think this is outdated, as I fixed this already. The ebuild did s/-O//g, which leaves the s. I changed it into s/-O[s2]\?//g, that fixed the build issue for me.
(In reply to comment #1) > I think this is outdated, as I fixed this already. The ebuild did s/-O//g, > which leaves the s. I changed it into s/-O[s2]\?//g, that fixed the build > issue for me. Still not fixed for me.
oh, I think I fixed tcl, not tk, duh...
Fixed now.