On Fri, Mar 28, Richard W.M. Jones wrote:
On Fri, Mar 28, 2014 at 10:00:49AM +0100, Olaf Hering wrote:
> Does your build have "working GNU getopt function... yes"?
Seems so:
$ rm config.cache
$ ./configure |& grep getopt
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for getopt.h... (cached) yes
checking for getopt_long_only... yes
checking whether getopt is POSIX compatible... yes
checking for working GNU getopt function... yes
checking for working GNU getopt_long function... yes
You would need to check config.log to see exactly why configure is
having a problem.
from config.log:
/* This code dumps core on glibc 2.14. */
{
static char program[] = "program";
static char w[] = "-W";
static char dummy[] = "dummy";
char *argv[] = { program, w, dummy, NULL };
optind = opterr = 1;
if (getopt (3, argv, "W;") != 'W')
result |= 64;
}
gdb --quiet --readnow ./conftest -ex r -ex bt -ex detach -ex q
Reading symbols from /usr/src/packages/BUILD/libguestfs-1.26.0/conftest...expanding to
full symbols...done.
Starting program: /usr/src/packages/BUILD/libguestfs-1.26.0/conftest
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C
"debuginfo(build-id)=5d1a12e6f0e95331cc4e39df74ecbd5adb76a1f7"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C
"debuginfo(build-id)=a06caa12df8f953a453befa827c3145adaf6269a"
main(323) result 0
main(344) result 0
main(357) result 0
main(370) result 0
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b2dbf8 in _getopt_internal_r () from /lib64/libc.so.6
#0 0x00007ffff7b2dbf8 in _getopt_internal_r () from /lib64/libc.so.6
#1 0x00007ffff7b2e44b in _getopt_internal () from /lib64/libc.so.6
#2 0x00007ffff7b2e498 in getopt () from /lib64/libc.so.6
#3 0x0000000000400937 in main () at t.c:378
Detaching from program: /usr/src/packages/BUILD/libguestfs-1.26.0/conftest, process 31042
This change actually fixes build for me on sles11sp3 and 11.4:
Index: libguestfs-1.26.0/builder/Makefile.am
===================================================================
--- libguestfs-1.26.0.orig/builder/Makefile.am
+++ libguestfs-1.26.0/builder/Makefile.am
@@ -278,6 +278,9 @@ virt_index_validate_SOURCES = \
virt_index_validate_CPPFLAGS = \
-DLOCALEBASEDIR=\""$(datadir)/locale"\"
+virt_index_validate_LDADD = \
+ -L../gnulib/lib/.libs -lgnu
+
man_MANS += virt-index-validate.1
noinst_DATA += $(top_builddir)/html/virt-index-validate.1.html
Index: libguestfs-1.26.0/builder/Makefile.in
===================================================================
--- libguestfs-1.26.0.orig/builder/Makefile.in
+++ libguestfs-1.26.0/builder/Makefile.in
@@ -291,7 +291,7 @@ am_virt_index_validate_OBJECTS = \
virt_index_validate-index-struct.$(OBJEXT) \
virt_index_validate-index-validate.$(OBJEXT)
virt_index_validate_OBJECTS = $(am_virt_index_validate_OBJECTS)
-virt_index_validate_LDADD = $(LDADD)
+virt_index_validate_DEPENDENCIES =
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -1660,6 +1660,9 @@ virt_index_validate_SOURCES = \
virt_index_validate_CPPFLAGS = \
-DLOCALEBASEDIR=\""$(datadir)/locale"\"
+virt_index_validate_LDADD = \
+ -L../gnulib/lib/.libs -lgnu
+
all: all-am
.SUFFIXES:
Olaf