Daniel Teitsort
2011-Jun-27 22:32 UTC
[Libguestfs] hivex-1.2.7 build failure on Ubuntu 10.04, rpl_getopt, rpl_optind
I'm trying to build hivex 1.2.7 on Ubuntu 10.04, and get the following failure: Making all in xml make[2]: Entering directory `/opt/sandbox/src/hivex/hivex-1.2.7/xml' CC hivexml-hivexml.o CCLD hivexml hivexml-hivexml.o: In function `main': /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:86: undefined reference to `rpl_getopt' /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:100: undefined reference to `rpl_optind' /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:133: undefined reference to `rpl_optind' collect2: ld returned 1 exit status make[2]: *** [hivexml] Error 1 (For completeness, I should say the building is occuring in a chroot environment where an Ubuntu 10.04 image resides, not on an Ubuntu 10.04 machine proper. But, I doubt this has anything to do with the problem.) Perhaps something has gone wrong in the adoptions of a replacement getopt and optind? Said adoption was apparently triggered by the configure script, which reported: checking for working GNU getopt function... no This in turn was likely due to this bit in the config script, since Ubuntu 10.04 reportedly uses 2.11 of glibc: /* This code fails on glibc 2.11. */ { char *argv[] = { "program", "-b", "-a", NULL }; optind = opterr = 0; if (getopt (3, argv, "+:a:b") != 'b') result |= 64; else if (getopt (3, argv, "+:a:b") != ':') result |= 64; } return result; I am able to build hivex 1.2.5 in this environment just fine. I don't need hivexml, but haven't yet figured out how to turn off its build, and suspect other getopt uses will need to be replaced, anyhow. Any suggestions? Thanks, Dan Teitsort
Hilko Bengen
2011-Jun-27 23:23 UTC
[Libguestfs] hivex-1.2.7 build failure on Ubuntu 10.04, rpl_getopt, rpl_optind
* Daniel Teitsort:> I'm trying to build hivex 1.2.7 on Ubuntu 10.04, and get the following failure:Please have a look at Debian's "hivex" source package[1] and check whether that can be built on your Ubuntu machine. Thanks. -Hilko [1] http://packages.debian.org/source/sid/hivex
Richard W.M. Jones
2011-Jun-28 09:23 UTC
[Libguestfs] hivex-1.2.7 build failure on Ubuntu 10.04, rpl_getopt, rpl_optind
On Mon, Jun 27, 2011 at 10:32:44PM +0000, Daniel Teitsort wrote:> I'm trying to build hivex 1.2.7 on Ubuntu 10.04, and get the following failure: > > Making all in xml > make[2]: Entering directory `/opt/sandbox/src/hivex/hivex-1.2.7/xml' > CC hivexml-hivexml.o > CCLD hivexml > hivexml-hivexml.o: In function `main': > /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:86: undefined reference to `rpl_getopt' > /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:100: undefined reference to `rpl_optind' > /opt/sandbox/src/hivex/hivex-1.2.7/xml/hivexml.c:133: undefined reference to `rpl_optind' > collect2: > ld returned 1 exit status > make[2]: *** [hivexml] Error 1 > > > (For completeness, I should say the building is occuring in a chroot environment where an Ubuntu 10.04 image resides, not on an Ubuntu 10.04 machine proper. But, I doubt this has anything to do with the problem.) > > Perhaps something has gone wrong in the adoptions of a replacement getopt and optind? Said adoption was apparently triggered by the configure script, which reported: > > checking for working GNU getopt function... > no > > This in turn was likely due to this bit in the config script, since Ubuntu 10.04 reportedly uses 2.11 of glibc: > > /* This code fails on glibc 2.11. */ > { > char *argv[] = { "program", "-b", "-a", NULL }; > optind = opterr = 0; > if (getopt (3, argv, "+:a:b") != 'b') > result |= 64; > else if (getopt (3, argv, "+:a:b") != ':') > result |= 64; > } > return result; > > > I am able to build hivex 1.2.5 in this environment just fine. > > I don't need hivexml, but haven't yet figured out how to turn off its build, and suspect other getopt uses will need to be replaced, anyhow. > > Any suggestions?/me hums and grumbles about gnulib ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Reasonably Related Threads
- Compilation troubles
- [PATCH] hivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation; link hivexml against libgnu.
- [PATCH 0/7] hivex + hivexml: Add byte runs for nodes and values
- [PATCH 0/3] hivex: Improve OS X support
- [hivex] [PATCH 2/2] hivex: Expose embedded hive file name