emerge fails with the following: Making all in doc make[2]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make all-am make[3]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' o yat2m ./yat2m.c make[3]: o: Command not found make[3]: [yat2m] Error 127 (ignored) for file in gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi tools.texi ; do \ ./yat2m -I . --release "GnuPG 2.0.9" --source "GNU Privacy Guard" --store \ `test -f '$file' || echo './'`$file ; done /bin/sh: line 1: ./yat2m: No such file or directory /bin/sh: line 1: ./yat2m: No such file or directory /bin/sh: line 1: ./yat2m: No such file or directory /bin/sh: line 1: ./yat2m: No such file or directory /bin/sh: line 1: ./yat2m: No such file or directory /bin/sh: line 1: ./yat2m: No such file or directory make[3]: *** [yat2m-stamp] Error 127 make[3]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9' make: *** [all] Error 2 * * ERROR: app-crypt/gnupg-2.0.9 failed. Reproducible: Always Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.24-thinkpad-r4 i686) ================================================================= System uname: 2.6.24-thinkpad-r4 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz Timestamp of tree: Wed, 02 Apr 2008 08:45:04 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.5.1-r5 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 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.24 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer -mfpmath=sse -g" 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 /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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=prescott -pipe -fomit-frame-pointer -mfpmath=sse -g" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo" LINGUAS="de" MAKEOPTS="-j4" 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/layman/sunrise /usr/portage/local/layman/jokey /usr/local/portage" SYNC="rsync://rsync1.de.gentoo.org/gentoo-portage" USE="X X509 acl acpi alsa amazon apache2 audiofile bash-completion berkdb bluetooth bzip2 cairo cardbus cdda cddb cdinstall cdio cdparanoia cdr cli cracklib crypt css ctype cups curl dbus device-mapper divx dri dvd dvdr dvdread encode fat fftw firefox flac foomaticdb fortran games gd gdbm geldkarte gif gimp gimpprint gmedia gnuplot gnutls gpg gpgme gphoto2 gpm graphviz gtk hal hbci hdaps hibernate-script hou iconv icq id3 id3tag imap imlib imlib2 innodb ipod ipv6 ipw3945 irc jabber java java5 java6 javascript jpeg jpeg2k kde lame laptop latex logrotate metric midi mikmod mime mmap mmx mmxext mp2 mp3 mp4 mpeg mpeg2 mpi mplayer msn mudflap mysql mysqli ncurses network networkmanager nfs nls nowin nptl nptlonly nsplugin ntfs obex offensive ogg openct opengl openmp pam pcmcia pcre pcsc-lite pdf perl php png pop postgres ppds python qt3 qt3support qt4 query-browser rar rdesktop readline real realmedia reflection reiser4 reiserfs replytolist samba science sco_flowcontrol sdl session smartcard smime smp smtp sou sound spell spl sse sse2 ssl ssse3 subversion svg symlink tcpd theora threads tidy tiff truetype twolame unicode usb userlocales vamp vcd videos vim-syntax vim-with-x vlm vnc vorbis webdav wifi win32codecs wmf wmp x264 x86 xcomposite xinerama xml xorg xosd xpm xprint xscreensaver xvid zeroconf zip zlib" 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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="ati radeon vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Please attach config.log
which i should find where?
I believe it is at: /var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/config.log
Created attachment 148817 [details] config.log sorry for the delay
I don't see how it can be. Can you please do this by hand? cd mkdir gnupg-test cd gnupg-test tar -xf @@@@/gnupg-2.0.9.tar.bz2 cd gnupg-2.0.9 ./configure And attach config.log.
Created attachment 148876 [details] again log did as you told.
OK... This went fine... You can also build this using "make" :) Are you sure that emerge =app-crypt/gnupg-2.0.7 works correctly at your system? Can you please try again?
Have you installed gcc-4.3 which is *MASKED*? configure:3655: i686-pc-linux-gnu-gcc --version >&5 gcc (Gentoo 4.3.0 p1.0) 4.3.0 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
now: yes, to the time i filed the bug i was running 4.2 i try building both versions again now
ok 2.0.9 seems to build manually 2.0.7 and 2.0.9 fail to build via emerge (with -4.2)
Well... gnupg-2.0.7 had been built on your system... I don't understand what is wrong, what was changed? You can debug the configure script, and look why CC_FOR_BUILD turns out empty. { echo "$as_me:$LINENO: checking for cc for build" >&5 echo $ECHO_N "checking for cc for build... $ECHO_C" >&6; } if test "$cross_compiling" = "yes"; then CC_FOR_BUILD="${CC_FOR_BUILD-cc}" else CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" fi { echo "$as_me:$LINENO: result: $CC_FOR_BUILD" >&5 echo "${ECHO_T}$CC_FOR_BUILD" >&6; }
(In reply to comment #11) > Well... gnupg-2.0.7 had been built on your system... > I don't understand what is wrong, what was changed? 2.0.7 was built at Thu Mar 6 10:27:18 2008 >>> app-crypt/gnupg-2.0.7-r1 so i think there might have been quite a lot of updates in between > > You can debug the configure script, and look why CC_FOR_BUILD turns out empty. > > { echo "$as_me:$LINENO: checking for cc for build" >&5 > echo $ECHO_N "checking for cc for build... $ECHO_C" >&6; } > if test "$cross_compiling" = "yes"; then > CC_FOR_BUILD="${CC_FOR_BUILD-cc}" > else > CC_FOR_BUILD="${CC_FOR_BUILD-$CC}" > fi > { echo "$as_me:$LINENO: result: $CC_FOR_BUILD" >&5 > echo "${ECHO_T}$CC_FOR_BUILD" >&6; } > what should i do with that code?
(In reply to comment #12) > what should i do with that code? > Add set -x at the beginning and set +x at the end. Then add echo ${VAR} at every place, where VAR is one of: CC_FOR_BUILD, CC, cross_compiling
Any news?
+ echo 'configure:5741: checking for cc for build' + echo -n 'checking for cc for build... ' checking for cc for build... + echo no no + echo gcc gcc + test no = yes + CC_FOR_BUILD=gcc + echo gcc gcc + echo 'configure:5751: result: gcc' + echo gcc gcc + set +x is the result from this change
So CC_FOR_BUILD is set correctly, does it still empty in config.log?
Exactly the same problem for me. macbook ~ # gcc-config -l [1] i686-pc-linux-gnu-3.4.6 [2] i686-pc-linux-gnu-3.4.6-hardened [3] i686-pc-linux-gnu-3.4.6-hardenednopie [4] i686-pc-linux-gnu-3.4.6-hardenednopiessp [5] i686-pc-linux-gnu-3.4.6-hardenednossp [6] i686-pc-linux-gnu-4.1.2 * [7] i686-pc-linux-gnu-4.3.0 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 i686) ================================================================= System uname: 2.6.24-gentoo i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz Timestamp of tree: Sat, 19 Apr 2008 09:00:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.4 dev-lang/python: 2.4.4-r9 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/" LINGUAS="de" MAKEOPTS="-j3" 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 amarok amr amuled apm applet atm automount bash-completion berkdb bluetooth bzip2 cairo cdr 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 fasttrack ffmpeg flac ftp galago gd gdbm german gif glib glitz gmedia gnome gnutella gnutls gpm gsf gtk h323 hal haskell hddtemp hfs iconv icu id3 id3tag ieee1394 injection ipv6 irda isdnlog isight java javascript jit jpeg jpeg2k kqemu latex lcms lirc lm_sensors lua lzo macbook mad madwifi maps midi mmap mmx mng mozdevelop mp2 mp3 mp4 mpeg mtp mudflap musicbrainz nautilus ncurses net network networking networkmanager njb nls nptl nptlonly nsplugin ntfs ogg opengl openmp oss pam pascal pch pcre pdf perl pidgin pmu png pnm posix postgres postscript ps 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 smp sourceview speex spell spl sse sse2 ssl ssse3 subversion svg tcpd theora threads threadsafe tiff timidity trayicon truetype unicode unzip usb v4l2 valgrind vcd video vorbis weak-algorithms wifi win32codecs wma wmp wxwindows x264 x86 xanim xattr xcomposite xext xine xml xmlreader xorg xrandr xscreensaver xulrunner xv xvid zip zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" 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, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 150270 [details] my config.log
OK, if I make this in the ebuild: src_compile() { CC_FOR_BUILD="$(tc-getCXX)" \ econf \ ... Then I get: ... Making all in doc make[2]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make all-am make[3]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' i686-pc-linux-gnu-g++ -o yat2m ./yat2m.c ./yat2m.c: In function 'char* xstrdup(const char*)': ./yat2m.c:264: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:264: error: initializing argument 1 of 'char* strcpy(char*, const char*)' ./yat2m.c:265: error: invalid conversion from 'void*' to 'char*' ./yat2m.c: In function 'section_buffer_s* get_section_buffer(const char*)': ./yat2m.c:336: error: invalid conversion from 'void*' to 'section_buffer_s*' ./yat2m.c:341: error: invalid conversion from 'void*' to 'section_buffer_s*' ./yat2m.c: In function 'void add_content(const char*, char*, int)': ./yat2m.c:382: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:388: error: invalid conversion from 'void*' to 'line_buffer_s*' ./yat2m.c: In function 'size_t proc_texi_cmd(FILE*, const char*, const char*, size_t, int*, int*)': ./yat2m.c:504: error: invalid conversion from 'void*' to 'const char*' ./yat2m.c:512: error: invalid conversion from 'void*' to 'const char*' ./yat2m.c:540: error: invalid conversion from 'void*' to 'const char*' ./yat2m.c:552: error: invalid conversion from 'void*' to 'const char*' ./yat2m.c:579: error: invalid conversion from 'void*' to 'const char*' ./yat2m.c: In function 'void parse_file(const char*, FILE*, char**, int)': ./yat2m.c:862: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:901: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:910: error: invalid conversion from 'void*' to 'macro_s*' ./yat2m.c:925: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:1063: error: invalid conversion from 'void*' to 'char*' ./yat2m.c:1119: error: invalid conversion from 'void*' to 'char*' make[3]: *** [yat2m] Error 1 make[3]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9' make: *** [all] Error 2 * * ERROR: app-crypt/gnupg-2.0.9 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2347: Called die * The specific snippet of code: * emake || die; * The die message: * (no error message) *
Sorry, that was my fault. Of course you have to use tc-getCPP there, not tc-getCXX. But then I get: Making all in doc make[2]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make all-am make[3]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' i686-pc-linux-gnu-cpp -o yat2m ./yat2m.c for file in gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi tools.texi ; do \ ./yat2m -I . --release "GnuPG 2.0.9" --source "GNU Privacy Guard" --store \ `test -f '$file' || echo './'`$file ; done /bin/sh: line 1: ./yat2m: Permission denied /bin/sh: line 1: ./yat2m: Permission denied /bin/sh: line 1: ./yat2m: Permission denied /bin/sh: line 1: ./yat2m: Permission denied /bin/sh: line 1: ./yat2m: Permission denied /bin/sh: line 1: ./yat2m: Permission denied make[3]: *** [yat2m-stamp] Error 126 make[3]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9' make: *** [all] Error 2 * * ERROR: app-crypt/gnupg-2.0.9 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2347: Called die * The specific snippet of code: * emake || die; * The die message: * (no error message) * So seems that the file is not executable. And it's not: macbook doc # ls -la yat2m -rw-r--r-- 1 root root 83478 Apr 19 13:17 yat2m
OK, if I add a 'chmod +x yat2m' in doc/Makefile, I get this: ... Making all in doc make[2]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' make all-am make[3]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' i686-pc-linux-gnu-cpp -o yat2m ./yat2m.c chmod +x yat2m; for file in gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi tools.texi ; do \ ./yat2m -I . --release "GnuPG 2.0.9" --source "GNU Privacy Guard" --store \ `test -f '$file' || echo './'`$file ; done ./yat2m: line 35: typedef: command not found ./yat2m: line 48: typedef: command not found ./yat2m: line 49: typedef: command not found ./yat2m: line 50: typedef: command not found ./yat2m: line 51: typedef: command not found ./yat2m: line 54: typedef: command not found ./yat2m: line 55: typedef: command not found ./yat2m: line 56: typedef: command not found ./yat2m: line 57: typedef: command not found ./yat2m: line 58: typedef: command not found ./yat2m: line 59: typedef: command not found ./yat2m: line 64: __extension__: command not found ./yat2m: line 65: __extension__: command not found ./yat2m: line 73: __extension__: command not found ./yat2m: line 74: __extension__: command not found ./yat2m: line 80: __extension__: command not found ./yat2m: line 81: __extension__: command not found ./yat2m: line 82: __extension__: command not found ./yat2m: line 83: __extension__: command not found ./yat2m: line 84: __extension__: command not found ./yat2m: line 85: __extension__: command not found ./yat2m: line 86: __extension__: command not found ./yat2m: line 87: __extension__: command not found ./yat2m: line 88: __extension__: command not found ./yat2m: line 89: __extension__: command not found ./yat2m: line 90: syntax error near unexpected token `}' ./yat2m: line 90: `__extension__ typedef struct { int __val[2]; } __fsid_t;' ./yat2m: line 35: typedef: command not found ./yat2m: line 48: typedef: command not found ./yat2m: line 49: typedef: command not found ./yat2m: line 50: typedef: command not found ./yat2m: line 51: typedef: command not found ./yat2m: line 54: typedef: command not found ./yat2m: line 55: typedef: command not found ./yat2m: line 56: typedef: command not found ./yat2m: line 57: typedef: command not found ./yat2m: line 58: typedef: command not found ./yat2m: line 59: typedef: command not found ./yat2m: line 64: __extension__: command not found ./yat2m: line 65: __extension__: command not found ./yat2m: line 73: __extension__: command not found ./yat2m: line 74: __extension__: command not found ./yat2m: line 80: __extension__: command not found ./yat2m: line 81: __extension__: command not found ./yat2m: line 82: __extension__: command not found ./yat2m: line 83: __extension__: command not found ./yat2m: line 84: __extension__: command not found ./yat2m: line 85: __extension__: command not found ./yat2m: line 86: __extension__: command not found ./yat2m: line 87: __extension__: command not found ./yat2m: line 88: __extension__: command not found ./yat2m: line 89: __extension__: command not found ./yat2m: line 90: syntax error near unexpected token `}' ./yat2m: line 90: `__extension__ typedef struct { int __val[2]; } __fsid_t;' ./yat2m: line 35: typedef: command not found ./yat2m: line 48: typedef: command not found ./yat2m: line 49: typedef: command not found ./yat2m: line 50: typedef: command not found ./yat2m: line 51: typedef: command not found ./yat2m: line 54: typedef: command not found ./yat2m: line 55: typedef: command not found ./yat2m: line 56: typedef: command not found ./yat2m: line 57: typedef: command not found ./yat2m: line 58: typedef: command not found ./yat2m: line 59: typedef: command not found ./yat2m: line 64: __extension__: command not found ./yat2m: line 65: __extension__: command not found ./yat2m: line 73: __extension__: command not found ./yat2m: line 74: __extension__: command not found ./yat2m: line 80: __extension__: command not found ./yat2m: line 81: __extension__: command not found ./yat2m: line 82: __extension__: command not found ./yat2m: line 83: __extension__: command not found ./yat2m: line 84: __extension__: command not found ./yat2m: line 85: __extension__: command not found ./yat2m: line 86: __extension__: command not found ./yat2m: line 87: __extension__: command not found ./yat2m: line 88: __extension__: command not found ./yat2m: line 89: __extension__: command not found ./yat2m: line 90: syntax error near unexpected token `}' ./yat2m: line 90: `__extension__ typedef struct { int __val[2]; } __fsid_t;' ./yat2m: line 35: typedef: command not found ./yat2m: line 48: typedef: command not found ./yat2m: line 49: typedef: command not found ./yat2m: line 50: typedef: command not found ./yat2m: line 51: typedef: command not found ./yat2m: line 54: typedef: command not found ./yat2m: line 55: typedef: command not found ./yat2m: line 56: typedef: command not found ./yat2m: line 57: typedef: command not found ./yat2m: line 58: typedef: command not found ./yat2m: line 59: typedef: command not found ./yat2m: line 64: __extension__: command not found ./yat2m: line 65: __extension__: command not found ./yat2m: line 73: __extension__: command not found ./yat2m: line 74: __extension__: command not found ./yat2m: line 80: __extension__: command not found ./yat2m: line 81: __extension__: command not found ./yat2m: line 82: __extension__: command not found ./yat2m: line 83: __extension__: command not found ./yat2m: line 84: __extension__: command not found ./yat2m: line 85: __extension__: command not found ./yat2m: line 86: __extension__: command not found ./yat2m: line 87: __extension__: command not found ./yat2m: line 88: __extension__: command not found ./yat2m: line 89: __extension__: command not found ./yat2m: line 90: syntax error near unexpected token `}' ./yat2m: line 90: `__extension__ typedef struct { int __val[2]; } __fsid_t;' ./yat2m: line 35: typedef: command not found ./yat2m: line 48: typedef: command not found ./yat2m: line 49: typedef: command not found ./yat2m: line 50: typedef: command not found ./yat2m: line 51: typedef: command not found ./yat2m: line 54: typedef: command not found ... Seems somehow to be completly broken. I cannot really imagine that for other people, yat2m behaves so much different.
Sorry, tc-getCPP was also wrong. :) (I already wondered why the file was not executable and these strange errors...) With CC_FOR_BUILD="$(tc-getCC)", the whole thing compiles fine and works!
THIS IS STRANGE! You had CC_FOR_BUILD in your environment... OK, I forced it... I preferred to know where it came from... BTW: The right toolchain to add is: tc-getBUILD_CC Thanks.
No, I didn't have it in my environment or why do you think this? Without any modifications, I also get: ... make[3]: Entering directory `/var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9/doc' o yat2m ./yat2m.c make[3]: o: Command not found make[3]: [yat2m] Error 127 (ignored) ... Also, in my config.log, you see: ... configure:5740: checking for cc for build configure:5747: result: ...
Can you please see what happening in the configure script? Why it results in empty CC_FOR_BUILD?
OK, I took a deeper look in the configure script. I added this at the very beginning of the configure script: #! /bin/sh echo "---m2: ${CC_FOR_BUILD-NOTSET}" echo "---mm1: ${CC_FOR_BUILD:-EMPTY}" set | grep CC_FOR_BUILD And I get this result: macbook gnupg # ebuild gnupg-2.0.9.ebuild merge Disabling noauto in features... merge disables it. (qmerge doesn't) * gnupg-2.0.9.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] >>> Checking gnupg-2.0.9.tar.bz2's mtime... >>> WORKDIR is up-to-date, keeping... >>> Compiling source in /var/tmp/portage/app-crypt/gnupg-2.0.9/work/gnupg-2.0.9 ... * econf: updating gnupg-2.0.9/scripts/config.guess with /usr/share/gnuconfig/config.guess * econf: updating gnupg-2.0.9/scripts/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/gnupg-2.0.9 --enable-symcryptrun --enable-gpg --enable-gpgsm --enable-agent --enable-bzip2 --disable-scdaemon --enable-nls --disable-ldap --disable-capabilities --build=i686-pc-linux-gnu ---m2: ---mm1: EMPTY CC_FOR_BUILD= So the var is already set there but empty. You could also fix it by using this code (I replaced "-" with ":-" there) in the configure script: { echo "$as_me:$LINENO: checking for cc for build" >&5 echo $ECHO_N "checking for cc for build... $ECHO_C" >&6; } if test "$cross_compiling" = "yes"; then CC_FOR_BUILD="${CC_FOR_BUILD:-cc}" else CC_FOR_BUILD="${CC_FOR_BUILD:-$CC}" fi { echo "$as_me:$LINENO: result: $CC_FOR_BUILD" >&5 echo "${ECHO_T}$CC_FOR_BUILD" >&6; } Therefore, I added this before the econf in the ebuild: sed -i -e "s/CC_FOR_BUILD-/CC_FOR_BUILD:-/g" configure This also solves the problem and it compiles fine. The question is only, why CC_FOR_BUILD is already set before configure is called. I don't know exactly how econf is working, but I took a look in the reported file /usr/share/gnuconfig/config.guess and it's set there: set_cc_for_build=' ... ' ... if [ "${UNAME_SYSTEM}" = "Linux" ] ; then eval $set_cc_for_build ...
This is lower case... We are looking for upper case :) Well... I hope that now, that I forced it it will be fixed.
This $set_cc_for_build is a peace of shell code which declares $CC_FOR_BUILD. But I think the forcing by the ebuild is anyway the better solution, the ebuild can make probably a better choice than the configure script (even if it would work correctly).