bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix link errors with --enable-threads=posix on AIX


From: Bruno Haible
Subject: Re: fix link errors with --enable-threads=posix on AIX
Date: Tue, 03 Dec 2019 03:04:34 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

Some more link errors of this kind, this time when the gnulib-tool option
--with-c++-tests is used:


xlC -q64 -qthreaded -qtls    -L/home/haible/prefix64/lib -o test-string-c++ 
test-string-c++.o test-string-c++2.o libtests.a ../gllib/libgnu.a libtests.a   
ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_once
ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[4]: *** [test-string-c++] Error 8

xlC -q64 -qthreaded -qtls    -L/home/haible/prefix64/lib -o test-wchar-c++ 
test-wchar-c++.o libtests.a ../gllib/libgnu.a libtests.a     
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[4]: *** [test-wchar-c++] Error 8


This patch fixes it.


2019-12-02  Bruno Haible  <address@hidden>

        Fix link errors with --enable-threads=posix on AIX.
        * modules/string-c++-tests (Makefile.am): Link the test-string-c++
        program with $(LIBTHREAD).
        * modules/wchar-c++-tests (Makefile.am): Link the test-wchar-c++
        program with $(LIBTHREAD).

diff --git a/modules/string-c++-tests b/modules/string-c++-tests
index 2f7e23c..bd813bd 100644
--- a/modules/string-c++-tests
+++ b/modules/string-c++-tests
@@ -16,5 +16,5 @@ if ANSICXX
 TESTS += test-string-c++
 check_PROGRAMS += test-string-c++
 test_string_c___SOURCES = test-string-c++.cc test-string-c++2.cc
-test_string_c___LDADD = $(LDADD) $(LIBINTL)
+test_string_c___LDADD = $(LDADD) $(LIBINTL) $(LIBTHREAD)
 endif
diff --git a/modules/wchar-c++-tests b/modules/wchar-c++-tests
index efc9c2e..cd898e2 100644
--- a/modules/wchar-c++-tests
+++ b/modules/wchar-c++-tests
@@ -15,5 +15,5 @@ if ANSICXX
 TESTS += test-wchar-c++
 check_PROGRAMS += test-wchar-c++
 test_wchar_c___SOURCES = test-wchar-c++.cc
-test_wchar_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_EACCESS)
+test_wchar_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_EACCESS) 
$(LIBTHREAD)
 endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]