... make[3]: Leaving directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/test' Making all in debug make[3]: Entering directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/debug' i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -MT delay.o -MD -MP -MF .deps/delay.Tpo -c -o delay.o delay.c i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -MT svctor.o -MD -MP -MF .deps/svctor.Tpo -c -o svctor.o svctor.c mv -f .deps/svctor.Tpo .deps/svctor.Po /bin/sh ../../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o svctor svctor.o ../../src/lib/libatm.la mv -f .deps/delay.Tpo .deps/delay.Po /bin/sh ../../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o delay delay.o ../../src/lib/libatm.la mkdir .libs i686-pc-linux-gnu-gcc -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o .libs/svctor svctor.o ../../src/lib/.libs/libatm.so -lresolv creating svctor i686-pc-linux-gnu-gcc -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o .libs/delay delay.o ../../src/lib/.libs/libatm.so -lresolv creating delay make[3]: Leaving directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/debug' Making all in qgen make[3]: Entering directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/qgen' DHAVE_CONFIG_H -I. -I../.. -I../../src/include -O2 -march=nocona -pipe -ggdb -fno-strict-aliasing -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -MT common.o -MD -MP -MF .deps/common.Tpo -c -o common.o common.c make[3]: DHAVE_CONFIG_H: Command not found make[3]: [common.o] Error 127 (ignored) mv -f .deps/common.Tpo .deps/common.Po mv: cannot stat `.deps/common.Tpo': No such file or directory make[3]: *** [common.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/qgen' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0' make: *** [all] Error 2 * * ERROR: net-dialup/linux-atm-2.5.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2658: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/net-dialup/linux-atm-2.5.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-dialup/linux-atm-2.5.0/temp/environment'. *
macbook ~ # emerge --info Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686) ================================================================= System uname: 2.6.24-gentoo-r8 i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz Timestamp of tree: Sun, 06 Jul 2008 23:00:02 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=nocona -pipe -ggdb" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=nocona -pipe -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug unmerge-orphans userfetch" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/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="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/private" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip X a52 aac acl acpi alsa altenburgcards amarok amr amuled apm applet async asyncns atm automount avahi bash-completion berkdb bluetooth bonjour bookmarks bzip2 cairo cdr cisco cli cracklib crypt cups d dbus dedicated deskbar dga dhcp divx dri dv dvd dvdr dvdread dvi eap-tls enblend encode evo exif extra-algorithms fam fasttrack ffmpeg flac ftp galago gd gdbm german gif glib glitz gmedia gnome gnutella gnutls gphoto2 gpm gsf gtk h323 hal haskell hddtemp hfs iconv icu id3 id3tag ieee1394 imlib injection inkjar ipv6 irda isdnlog isight jabber java javascript jit joystick jpeg jpeg2k kde kig-scripting kqemu latex lcms libnotify lirc lm_sensors lua lzo macbook mad madwifi maps mdnsresponder-compat midi mmap mmx mng mozdevelop mp2 mp3 mp4 mpeg mplayer mtp mudflap music musicbrainz nautilus ncurses net network networking networkmanager njb nls nntp nptl nptlonly nsplugin ntfs ogg opengl openmp oss pam pascal pch pcre pdf perl pidgin plotutils pmu png pnm posix postgres postscript pptp ps pth pulseaudio python qt3support qt4 quicktime rar rc5 rdesktop readline real realmedia reflection reiser4 reiserfs rtc samba screen sdl sdl-image sdl-sound sdlaudio server session sftp sharedmem sift slp smp sockets socks5 solver sourceview speex spell spl sse sse2 ssl ssse3 startup-notification subversion svg tetex theora threads threadsafe tiff timidity tk trayicon truetype unicode unzip usb v4l2 valgrind vcd video voice vorbis weak-algorithms wifi win32codecs wma wmp wxwindows x264 x86 xanim xattr xcomposite xext xface xine xml xmlreader xorg xrandr xscreensaver xulrunner xv xvid zip zlib zsh-completion" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" 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" CAMERAS="sony_dscf1 sony_dscf55" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="inputlirc macmini" USERLAND="GNU" VIDEO_CARDS="i810 vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Run the following sequence: cd /usr/portage/net-dialup/linux-atm ebuild linux-atm-2.5.0.ebuild clean unpack grep -A 3 -B 3 DEFS= /var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/configure and post here the output of the last command.
macbook linux-atm # grep -A 3 -B 3 DEFS= /var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/configure # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs=
Then I don't understand how this could happen... The @DEFS@ from Makefile.in files should be translated as "-DHAVE_CONFIG_H" in the resulted Makefiles. Can you investigate this issue a bit further?
I went into the dir /var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0 and did an automake and autoconf and make and this way, it builds successfully. It chooses gcc as the compiler: ... make[4]: Entering directory `/var/tmp/portage/net-dialup/linux-atm-2.5.0/work/linux-atm-2.5.0/src/switch/tcp' gcc -DHAVE_CONFIG_H -I. -I../../.. -I./../../qgen -I../../../src/include -g -O2 -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -MT tcpsw.o -MD -MP -MF .deps/tcpsw.Tpo -c -o tcpsw.o tcpsw.c mv -f .deps/tcpsw.Tpo .deps/tcpsw.Po /bin/sh ../../../libtool --tag=CC --mode=link gcc -I../../../src/include -g -O2 -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o sw_tcp tcpsw.o ../../../src/switch/libsw.a ../../../src/lib/libatm.la -lfl mkdir .libs gcc -I../../../src/include -g -O2 -Wall -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -o .libs/sw_tcp tcpsw.o ../../../src/switch/libsw.a ../../../src/lib/.libs/libatm.so -lresolv -lfl ... It seems, that when using the ebuild, $(CC) isn't set correctly. macbook qgen # grep -A3 -B3 DEFS Makefile.in DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ...
I found the problem: macbook qgen # grep CC Makefile.in ... CC = @CC_FOR_BUILD@ ... I had already the same problem before with an empty CC_FOR_BUILD in bug #215831. I described the bug there (basically a typo in the configure script, they used CC_FOR_BUILD="${CC_FOR_BUILD-...}" but should use CC_FOR_BUILD="${CC_FOR_BUILD:-...}") and also presented an easy solution. In this case, the slightly modification of src_compile() in the ebuild is: src_compile() { append-flags -fno-strict-aliasing CC_FOR_BUILD="$(tc-getCC)" \ econf || die "econf failed" emake || die "emake failed" } That solves the problem. ( I really hate automake, autoconf and friends ... )
I didn't know this is valid sh syntax, but seems to work (at least for me): mrness@mbp-gentoo ~ $ unset a mrness@mbp-gentoo ~ $ b=${a-defaultvalue} mrness@mbp-gentoo ~ $ echo $b defaultvalue mrness@mbp-gentoo ~ $ a=value mrness@mbp-gentoo ~ $ b=${a-defaultvalue} mrness@mbp-gentoo ~ $ echo $b value Anyway, setting CC cannot harm anyone. Fixed in cvs, without revision bump.
The point is, $CC_FOR_BUILD was set but empty. az@macbook ~ $ a="" az@macbook ~ $ b=${a-default} az@macbook ~ $ echo $b az@macbook ~ $ b=${a:-default} az@macbook ~ $ echo $b default az@macbook ~ $