Created attachment 319056 [details] config.log I can't compile libguestfs on my server. It always fails during the configure stage with this error: checking if pod2man takes --stderr option... /var/tmp/portage/app-emulation/libguestfs-1.18.2/work/libguestfs-1.18.2/configure: line 47892: syntax error near unexpected token `;;' This happens with both 1.18.2 and 1.17.43. Tried looking into it a bit, but I couldn't make much sense out of the configure script (and that 47892 refers to the *line number* - the thing is massive). Would appreciate if any devs could take a look. Here are my use for this package (note: perl is enabled by default, and I did try with it enabled, but still get the same configure error): app-emulation/libguestfs-1.18.2 USE="fuse -perl -bash-completion -debug -doc -erlang -introspection -nls -ocaml -ruby (-selinux) -static-libs -systemtap" And, emerge --info. I've also attached the config.log. Portage 2.1.10.65 (hardened/linux/amd64/no-multilib, gcc-4.5.3, glibc-2.14.1-r3, 3.4.2-hardened-r1 x86_64) ================================================================= System uname: Linux-3.4.2-hardened-r1-x86_64-Intel-R-_Xeon-R-_CPU_E5649_@_2.53GHz-with-gentoo-2.1 Timestamp of tree: Fri, 20 Jul 2012 19:45:01 +0000 app-shells/bash: 4.2_p20 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.6 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.4-r1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r3 Repositories: gentoo x-portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" 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/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j25" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="lzma" PORTAGE_COMPRESS_FLAGS="-7" PORTAGE_CONFIGROOT="/" 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="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://209.221.142.124/gentoo-portage" USE="acl amd64 bzip2 caps cli cracklib crypt cups cxx dri gdbm hardened iconv ipv6 justify minimal mmx modules mudflap ncurses nptl openmp pam pax_kernel pcre pppd readline session sse sse2 ssl tcpd urandom xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 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 sheets 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 fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Does portage re-run 'autoconf'? Line 47892 doesn't make any sense if it means the ./configure script supplied in the libguestfs 1.18.2 tarball. The (upstream) test seems OK, so my only thought is that you've got an old version of autoconf that produces a corrupt configure script. Perhaps we are using a macro that your autoconf doesn't support? Sorry, not a lot to go on. Three suggestions: - Try newer libguestfs (1.18.5 is newest stable) - Try updating autoconf - Find out what is in the generated ./configure script around the line that generates the error.
(In reply to comment #1) Thanks for the suggestions. Unfortunately, I still haven't had much luck: > - Try newer libguestfs (1.18.5 is newest stable) Done, by renaming the existing 1.18.2 ebuild to 1.18.5. Still fails the same way. > - Try updating autoconf This is a brand new server install, with autoconf 2.68 (default) and 2.13 (for nspr). It looks like it was written specifically for 2.68, so I don't think an old version would be the problem: m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, > - Find out what is in the generated ./configure > script around the line that generates the error. I agree it doesn't make a whole lot of sense. I've attached the file from the build directory, just in case it's regenerating it like you suggested. Maybe that'd give you more info to work with? Don't know. Like I said before, this configure script is a mess.
Created attachment 319168 [details] configure.xz
Thanks for attaching the configure script. It has certainly been miscompiled by autoconf for some reason. Here is the code which fails: ---------------------------------------- for ac_prog in genisoimage mkisofs do # Extract the first word of \"$ac_prog\", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5 $as_echo_n \"checking for $ac_word... \" >&6; } if ${ac_cv_path_GENISOIMAGE+:} false; then : $as_echo_n \"(cached) \" >&6 else case $GENISOIMAGE in \\/* | ?:\\/*" >&6; } ac_cv_path_GENISOIMAGE="$GENISOIMAGE" # Let the user override the test with a path. ;; ###### line 47892 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GENISOIMAGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GENISOIMAGE=$ac_cv_path_GENISOIMAGE if test -n "$GENISOIMAGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENISOIMAGE" >&5 $as_echo "$GENISOIMAGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ----------------------------- The whole section before line 47892 is corrupted in a number of ways compared to the configure script supplied in the upstream tarball: - double quotes have been escaped \" - [ and ] characters have been omitted - } is used instead of ) in case statements - >&6; appears in a bogus place - unclosed " Something has really gone wrong with the way this configure script is generated, and the obvious culprit is autoconf. I think this is some sort of gross bug in autoconf (or m4?).
By the way, in what file did you see this line? m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, It's not in any configure.ac that we supply, and bare m4 directives shouldn't appear in the configure script.
(In reply to comment #5) > By the way, in what file did you see this line? > m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, aclocal.m4, in the work directory. Just happened to see it while poking around, and figured I'd mention it since you had brought up the possibility of it being an autoconf version issue. No idea if it's actually relavant or not. :-)
aclocal.m4 is generated by aclocal (from automake) and m4/*
ahh, ok. I guess the version number was tagged on then to show what generated it, not necessarily what it was designed for. Either wya, I'm still at a loss. :-)
I confirm the bug. The problem comes from a bad patch file. files/0002-configure_ac_automagic.patch: @@ -442,7 +450,7 @@ AC_MSG_RESULT([yes]) POD2_STDERR_OPTION="--stderr" else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no] POD2_STDERR_OPTION="" fi This patch section is only a bug, removing one ')'. removing this section will fix problem.
Created attachment 320550 [details] A fixed patch file Patch file generated against libguestfs-1.18.5. I also added a missing LT_INIT, and a subir for examples files.
Created attachment 320554 [details, diff] Another patchfile which prevent using of env.d (suggestion) As we deal with the patchfile i suggest to remove env file and patch src/Makefile.am. Remove files/env.file and in ebuild file, line newenvd "${FILESDIR}"/env.file 99"${PN}"
(In reply to comment #9) > I confirm the bug. > > The problem comes from a bad patch file. > files/0002-configure_ac_automagic.patch: > @@ -442,7 +450,7 @@ > AC_MSG_RESULT([yes]) > POD2_STDERR_OPTION="--stderr" > else > - AC_MSG_RESULT([no]) > + AC_MSG_RESULT([no] > POD2_STDERR_OPTION="" > fi > > This patch section is only a bug, removing one ')'. > removing this section will fix problem. Just a note that in libguestfs 1.18.6 (which is only in git now, but the tarball will be uploaded in a few days) the whole way that POD is done has changed. This hunk will be redundant. I'll have a look at the other patch and see what can go upstream.
My quote is not a fix, but it's the faulty hunk of the portage files/0002-configure_ac_automagic.patch. The whole hunk must be removed, there will be no problem if POD will change in 1.18.6. This hunk only delete a ')' which make autotools fail.
I still have this issue with all versions in portage and 19.1 in overlay. checking if pod2man takes --stderr option... /var/tmp/notmpfs/portage/app-emulation/libguestfs-1.19.1/work/libguestfs-1.19.1/configure: line 46975: syntax error near unexpected token `;;' /var/tmp/notmpfs/portage/app-emulation/libguestfs-1.19.1/work/libguestfs-1.19.1/configure: line 46975: ` ;;'
*** Bug 435214 has been marked as a duplicate of this bug. ***
Fixed in 1.18.9 by upstream, old versions cleaned.