Discussion:
test-copy-file build error on CentOS 6
(too old to reply)
Tom G. Christensen
2017-05-18 19:33:56 UTC
Permalink
Raw Message
Hello,

I just noticed that I am unable to build a gnulib snapshot with tests on
CentOS 6:

gcc -std=gnu99 -g -O2 -Wall -o test-copy-file test-copy-file.o
../gllib/libgnu.a -lacl -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
../gllib/libgnu.a(gettime.o): In function `gettime':
/home/tgc/projects/gnulib/build/gllib/gettime.c:36: undefined reference
to `clock_gettime'


The last commit to build successfully was e48f55fd7.

-tgc
Bruno Haible
2017-05-18 20:23:06 UTC
Permalink
Raw Message
Hello Tom,
Post by Tom G. Christensen
I just noticed that I am unable to build a gnulib snapshot with tests on
gcc -std=gnu99 -g -O2 -Wall -o test-copy-file test-copy-file.o
../gllib/libgnu.a -lacl -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
/home/tgc/projects/gnulib/build/gllib/gettime.c:36: undefined reference
to `clock_gettime'
The last commit to build successfully was e48f55fd7.
Thanks for the report! The cause is that I added a dependency to module
'utimens' on 2017-05-01. This patch should fix it:


2017-05-18 Bruno Haible <***@clisp.org>

copy-file tests: Fix link error (regression from 2017-05-01).
Reported by Tom G. Christensen <***@jupiterrise.com>.
* modules/copy-file-tests (Makefile.am): Link test-copy-file with
$(LIB_CLOCK_GETTIME).

diff --git a/modules/copy-file-tests b/modules/copy-file-tests
index c6eaf70..299d49f 100644
--- a/modules/copy-file-tests
+++ b/modules/copy-file-tests
@@ -17,4 +17,4 @@ Makefile.am:
TESTS += test-copy-file.sh test-copy-file-1.sh test-copy-file-2.sh
TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL)
check_PROGRAMS += test-copy-file
-test_copy_file_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
+test_copy_file_LDADD = $(LDADD) $(LIB_ACL) $(LIB_CLOCK_GETTIME) @LIBINTL@
Tom G. Christensen
2017-05-19 15:09:54 UTC
Permalink
Raw Message
Post by Bruno Haible
Thanks for the report! The cause is that I added a dependency to module
copy-file tests: Fix link error (regression from 2017-05-01).
* modules/copy-file-tests (Makefile.am): Link test-copy-file with
$(LIB_CLOCK_GETTIME).
Thank you, the build now completes.

=======================
All 1130 tests passed
(19 tests were not run)
=======================

-tgc

Loading...