app-text/pdftk-1.44 fails to build on an amd64 box with sys-devel/gcc-4.5.3-r1. Seems like there is a problem with gcc's gcjh. The build throws lots of errors when generating header files with gcjh, like this one: gcjh -force --classpath=":/var/tmp/portage/app-text/pdftk-1.44/work/pdftk-1.44 -dist/java:." org/bouncycastle/asn1/IndefiniteLengthInputStream gcjh: unrecognized option '-m64' gcjh: Try 'gcjh -help' for more information make[1]: [org/bouncycastle/asn1/IndefiniteLengthInputStream.h] Error 1 (ignored) Finally the build fails due to the missing headers: g++ -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"1.44\" -Wall -Wextra -Weffc++ -O2 -I../java pdftk.cc -c pdftk.cc:60:39: fatal error: com/lowagie/text/Document.h: No such file or directory compilation terminated. make: *** [pdftk.o] Error 1 emake failed * ERROR: app-text/pdftk-1.44 failed (compile phase): * Compilation failed. * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 2206: Called die * The specific snippet of code: * emake -j1 -f "${S}"/Makefile.Debian || die "Compilation failed." This boils down to the following issue: pdftk-1.44-dist/java> gcjh -force --classpath=":/var/tmp/portage/app-text/pdftk-1.44/work/pdftk-1.44-dist/java:." com/lowagie/text/Header works great, but pdftk-1.44-dist/java> CFLAGS_amd64=-m64 ABI=amd64 gcjh -force --classpath=":/var/tmp/portage/app-text/pdftk-1.44/work/pdftk-1.44-dist/java:." com/lowagie/text/Header gcjh: unrecognized option '-m64' gcjh: Try 'gcjh -help' for more information triggers the error. Note that both variables are set to the above values in my ebuild environment, they are the default values for amd64 profiles. I don't think gcjh is supposed to behave like this. Why should it care about CFLAGS_* at all? Workaround: override default for CFLAGS_amd64; e.g., pdftk builds fine with CFLAGS_amd64= emerge -1 =app-text/pdftk-1.44
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
Same applies here when running revdep-rebuild emerge --info Portage 2.1.10.41 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 2.6.37-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.37-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T8300_@_2.40GHz-with-gentoo-2.0.3 Timestamp of tree: Mon, 26 Dec 2011 11:30:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.6-r2, 2.7.2-r3, 3.1.4-r3 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo science x-portage ACCEPT_KEYWORDS="amd64 x86" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release/etc/revdep-rebuild /etc/sandbox.d /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="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strictunknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS=" http://distfiles.gentoo.org http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.osuosl.org/ http://gentoo.chem.wisc.ed/gentoo/ ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/" LANG="it_IT@euro" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="it en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclde=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/science /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl acpi aiglx alsa amd64 amr apm arts avi berkdb blas bluetooth branding bzip2 cairo caps ccache cdda cddb cdparanoi cdr cdrom cleartype cli consolekit corefonts cracklib crypt css cups curl cxx dga directfb dri dts dvd dvdr dvdread emacs emboss encode eif expat extensions extras fam fbcon fbdev ffmpeg fftw firefox flac fltk fortran gcj gdbm gdu gif glitz glut glx gpm gs gtk hddtemp hdf5 htpd iconv ipv6 java jpeg kpathsea lcms ldap libnotify libwww lm_sensors logitech-mouse mad mmx mng modules mp3 mp4 mpeg mpi mpi-threads mpayer mudflap multilib mysql ncurses nls nptl nptlonly nsplugin objc objc++ objc-gc ogg oggvorbis openal opengl openmp oss pam pango pcre pf png policykit postscript ppds pppd preview-latex qt3support qt4 quicktime readline reiserfs romio samba scanner sdl sensord session slan sound sox spell sse sse2 ssl startup-notification stream svg sysfs tcltk tcpd tetex threads tiff tk truetype type1 udev unicode usb v4l vl2 vcd vesa vorbis wavpack wifi wma wma123 wmf wxwindows x264 xcb xml xorg xplanet xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCMPLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi nll plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file uthz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cace env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif spling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS=ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore f18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tipmate tnt ubx" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxrb ncurses text" LINGUAS="it en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd knock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos ccount" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PRTAGE_RSYNC_EXTRA_OPTS
pdftk fail log: http://pier.unirc.eu/cestino/pdftk.log
+1
Same problem, I give the requested info, please reopen. As the OP said, it comes from the environment variables, so I also attach my temp/environment file. 14:20 root@accretion /var/tmp/portage# emerge --info =app-text/pdftk-1.44 Portage 2.1.10.43 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r1, 3.0.6-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.0.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.0.3 Timestamp of tree: Sun, 25 Dec 2011 03:45:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/cmake: 2.8.6-r4 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.14.1-r1 Repositories: pentoo gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going" FEATURES="assume-digests binpkg-logs distlocks fixlafiles news parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS=" http://mirror.ovh.net/gentoo-distfiles/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.intergenia.de " LANG="en_FR.UTF-8" LC_ALL="en_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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="/var/lib/layman/pentoo /usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X a52 aac acl acpi alsa amd64 apm atm audiofile berkdb bluetooth bz2 bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dell divx dri dv dvb dvd dvdr dvdread esd exif fat ffmpeg firefox flac fortran fuse gdbm gif gimp glx gpm gtk gtk2 h264 hardened iconv ieee1394 ipv6 jpeg jpeg2k kpathsea lame ldap libnotify lirc lm_sensors mbox mime mmx modules mp3 mp4 mpeg mudflap multilib musepack ncurses network nls nptl nptlonly nsplugin ntfs nvidia ogg opengl openmp pam pcmcia pcre pdf png posix pppd qt qt3support quicktime readline samba sdl semantic-desktop session spell sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 svg sysfs tcpd theora threads tiff truetype udev unicode usb v4l v4l2 vdr vorbis vpx wifi wma wmf wmp x264 xcomposite xfs xinerama xml xorg xosd xpm xv xvid xvmc zlib" ALSA_CARDS="intel hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon casio_qv ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="devinput pctv inputlirc" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv vesa nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 297081 [details] build.log
Created attachment 297083 [details] environment
building pdftk-1.44 manually seems to work fine; in case anyone needs a quick workaround. steps I did (as a regular user, except where indicated otherwise): 1) unzipped pdftk-1.44 sources (from /usr/portage/distfiles/), 2) unzipped sources and replaced pdftk/Makefile.Base and pdftk/Makefile.Debian in the extracted tree with the corresponding files from the failed ebuild's working directory 3) did 'make -f Makefile.Debian' - compiled with some warnings seen already with the ebuild about the locally unread definitions. no warnings on gcjh options (no -m64 option passed) 4) copied the compiled binary to /usr/local/bin (as root) 5) tested pdftk's 'cat' operation and extracted some pages from a test pdf sorry guys, no time for digging deeper into this... (check ebuild in details)
oh my, > 1) unzipped pdftk-1.44 sources (from /usr/portage/distfiles/), > 2) unzipped sources and replaced pdftk/Makefile.Base and pdftk/Makefile.Debian > in the extracted tree with the corresponding files from the failed ebuild's > working directory of course I did not unzip files twice... just messed up the steps description. just ignore the part 'unzipped sources and' in point 2. sorry for the confusion...
I had the same problems but could resolve it by deleting /usr/bin/gcjh. This file did not belong to any package and a working gcjh is in /usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3/gcjh.
/usr/bin/gcjh *is* supposed to be orphaned, it's generated by gcc-config, see http://forums.gentoo.org/viewtopic-p-6696663.html The problem is that the current stable version of gcc-config adds ABI flags (-m32, -m64) to the invoked binaries. Apparently these are valid options to all wrapped binaries *except* gcjh. This has already been fixed in the newer, unstable versions of gcc-config (see bug 351384). If you upgrade gcc-config and reconfigure the current gcc (gcc-config seems to do that automatically when installed), pdftk should compile.