Hello Tom,

> The error looks like this on Solaris 9:
> /usr/tgcware/gcc49/bin/gcc -std=gnu11  -g -O2  -L/usr/tgcware/lib 
> -R/usr/tgcware/lib -o test-rwlock1 test-rwlock1.o ../gllib/libgnu.a 
> -lpthread -lm   -lm     -lm    -lm  -lm  -l
> m
> Undefined                       first referenced
>   symbol                             in file
> sched_yield                         test-rwlock1.o
> ld: fatal: Symbol referencing errors. No output written to test-rwlock1
> collect2: error: ld returned 1 exit status
> make[4]: *** [test-rwlock1] Error 1
> 
> It looks like just a missing @YIELD_LIB@ in modules/lock-tests.

You're right, absolutely. Fixed:


2017-02-01  Bruno Haible  <[email protected]>

        lock tests: Fix link error.
        * modules/lock-tests (test_rwlock1_LDADD): Add @YIELD_LIB@.
        Reported by Tom G. Christensen <[email protected]>.

diff --git a/modules/lock-tests b/modules/lock-tests
index b42740c..b7f1a73 100644
--- a/modules/lock-tests
+++ b/modules/lock-tests
@@ -12,5 +12,5 @@ configure.ac:
 Makefile.am:
 TESTS += test-rwlock1 test-lock
 check_PROGRAMS += test-rwlock1 test-lock
-test_rwlock1_LDADD = $(LDADD) @LIBMULTITHREAD@
+test_rwlock1_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@
 test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@


Reply via email to