Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427842 - app-emulation/libguestfs - checking if pod2man takes --stderr option... /// .../work/libguestfs-1.18.2/configure: line 47892: syntax error near unexpected token `;;'
Summary: app-emulation/libguestfs - checking if pod2man takes --stderr option... /// ....
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Andreis Vinogradovs ( slepnoga )
: 435214 (view as bug list)
Depends on:
Reported: 2012-07-24 04:07 UTC by Jared B.
Modified: 2012-10-28 18:17 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---

config.log (config.log,952.77 KB, text/plain)
2012-07-24 04:07 UTC, Jared B.
configure.xz (configure.xz,170.58 KB, text/plain)
2012-07-25 02:19 UTC, Jared B.
A fixed patch file (0003-configure_ac_automagic.patch,4.30 KB, text/plain)
2012-08-06 08:36 UTC, Julien
Another patchfile which prevent using of env.d (suggestion) (0004-configure_ac_automagic.patch,4.71 KB, patch)
2012-08-06 09:23 UTC, Julien
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2012-07-24 04:07:43 UTC
Created attachment 319056 [details]

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 (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/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
CFLAGS="-march=native -O2 -pipe"
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"
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"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
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"
Comment 1 Richard Jones 2012-07-24 16:37:16 UTC
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.
Comment 2 Jared B. 2012-07-25 02:18:47 UTC
(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.
Comment 3 Jared B. 2012-07-25 02:19:23 UTC
Created attachment 319168 [details]
Comment 4 Richard Jones 2012-07-25 07:45:32 UTC
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
  # 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
  case $GENISOIMAGE in
  \\/* | ?:\\/*" >&6; }
  ac_cv_path_GENISOIMAGE="$GENISOIMAGE" # Let the user override the test with a path.
  ;;         ###### line 47892
for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
  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
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2

if test -n "$GENISOIMAGE"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENISOIMAGE" >&5
$as_echo "$GENISOIMAGE" >&6; }
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

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?).
Comment 5 Richard Jones 2012-07-25 07:47:40 UTC
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 that we supply, and bare m4 directives shouldn't appear in the configure script.
Comment 6 Jared B. 2012-07-25 08:22:54 UTC
(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.  :-)
Comment 7 Richard Jones 2012-07-25 08:49:06 UTC
aclocal.m4 is generated by aclocal (from automake) and m4/*
Comment 8 Jared B. 2012-07-25 08:56:41 UTC
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.  :-)
Comment 9 Julien 2012-08-06 08:26:45 UTC
I confirm the bug.

The problem comes from a bad patch file.
@@ -442,7 +450,7 @@
-    AC_MSG_RESULT([no])
+    AC_MSG_RESULT([no]

This patch section is only a bug, removing one ')'.
removing this section will fix problem.
Comment 10 Julien 2012-08-06 08:36:31 UTC
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.
Comment 11 Julien 2012-08-06 09:23:27 UTC
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/

Remove files/env.file and in ebuild file, line
	newenvd "${FILESDIR}"/env.file 99"${PN}"
Comment 12 Richard Jones 2012-08-06 11:37:04 UTC
(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]
>  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
Comment 13 Julien 2012-08-06 12:17:18 UTC
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.
Comment 14 REdOG 2012-08-21 16:40:38 UTC
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: `  ;;'
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-18 13:47:33 UTC
*** Bug 435214 has been marked as a duplicate of this bug. ***
Comment 16 Maxim Koltsov (RETIRED) gentoo-dev 2012-10-28 18:17:30 UTC
Fixed in 1.18.9 by upstream, old versions cleaned.