[Libguestfs] hivex-1.2.7 build failure on Ubuntu 10.04, rpl_getopt, rpl_optind
Richard W.M. Jones
rjones at redhat.com
Tue Jun 28 09:23:31 UTC 2011
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
More information about the Libguestfs
mailing list