[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert'
From: |
Richard W.M. Jones |
Subject: |
Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert' |
Date: |
Mon, 18 Jun 2012 12:05:20 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Jun 18, 2012 at 12:01:01PM +0100, Richard W.M. Jones wrote:
> On Mon, Jun 18, 2012 at 11:44:08AM +0100, Richard W.M. Jones wrote:
> > On Mon, Jun 18, 2012 at 12:33:36PM +0200, Jim Meyering wrote:
> > > [libtool-kill-dependency_libs.sh]
> > > That looks promising.
> > > Can you easily refrain from using that when building gnulib's own tests?
> >
> > I've removed that now. Still happens.
> >
> > However I think this could be a bug in libtool (from RHEL 5).
> >
> > Here is the linking rule in gnulib/tests/Makefile.am:
> >
> > test_futimens_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
> >
> > LDADD is defined as:
> >
> > LDADD = libtests.a ../../gnulib/lib/libgnu.la libtests.a
> > $(LIBTESTS_LIBDEPS)
> > ^^ NB ^^
> >
> > Here is the final command that gets executed:
> >
> > /bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -o test-futimens
> > test-futimens.o libtests.a ../../gnulib/lib/libgnu.la libtests.a -lrt
> > gcc -g -O2 -o test-futimens test-futimens.o
> > ../../gnulib/lib/.libs/libgnu.a libtests.a -lrt
> >
> > Notice that the first 'libtests.a' is erased by libtool. If my
> > understanding is correct, it is the first 'libtests.a' which would
> > resolve this missing dependency.
>
> Here is the same output from libtool on Fedora 17:
>
> bash ../../libtool-kill-dependency_libs.sh ../../libtool --tag=CC
> --preserve-dup-deps --mode=link gcc -std=gnu99 -std=gnu99 -g -O2 -o
> test-futimens test-futimens.o libtests.a ../../gnulib/lib/libgnu.la
> libtests.a -lrt
> libtool: link: gcc -std=gnu99 -std=gnu99 -g -O2 -o test-futimens
> test-futimens.o libtests.a ../../gnulib/lib/.libs/libgnu.a libtests.a -lrt
>
> (this is using libtool-kill-dependency_libs.sh, but I'm fairly sure
> that doesn't make any difference). Notice that the first 'libtests.a'
> is preserved by this version of libtool.
>
> I tried simply copying 'libtool' from Fedora 17 into the RHEL 5
> libguestfs repo, but that doesn't appear to fix the problem.
>
> Still looking at this.
I see that upstream passes '--preserve-dup-deps' to libtool.
This option also exists in the ancient libtool in RHEL 5, and is
present in gnulib/tests/Makefile.am (in AM_LIBTOOLFLAGS).
However RHEL 5 automake doesn't mention AM_LIBTOOLFLAGS anywhere in
the documentation.
Anyway, I can hack around this in libguestfs.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
- gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Jim Meyering, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Jim Meyering, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Jim Meyering, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert', Richard W.M. Jones, 2012/06/18
- Re: gnulib/tests/utimecmp.c:183: undefined reference to `hash_insert',
Richard W.M. Jones <=