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. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org