bug-gnulib
[Top][All Lists]
Advanced

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

Re: pthread related build error on CentOS 6


From: Tom G. Christensen
Subject: Re: pthread related build error on CentOS 6
Date: Tue, 31 Jan 2017 09:49:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 26/01/17 21:15, Tom G. Christensen wrote:
Hello,

My daily full gnulib bootstrap on CentOS 6 has stopped working with this
build error:
gcc -std=gnu99 -fvisibility=hidden -g -O2 -Wall   -o git-merge-changelog
git-merge-changelog.o libgnu.a   -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
-lm
libgnu.a(lock.o): In function `glthread_rwlock_init_for_glibc':
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:46: undefined
reference to `pthread_rwlockattr_init'
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:53: undefined
reference to `pthread_rwlockattr_setkind_np'
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:59: undefined
reference to `pthread_rwlockattr_destroy'
collect2: ld returned 1 exit status
make[4]: *** [git-merge-changelog] Error 1

Adding -pthread or -lpthread allows the link to succeed.

The build then fails again at:
gcc -std=gnu99  -g -O2 -Wall   -o test-fstrcmp test-fstrcmp.o
../gllib/libgnu.a   -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
../gllib/libgnu.a(lock.o): In function `glthread_rwlock_init_for_glibc':
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:46: undefined
reference to `pthread_rwlockattr_init'
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:53: undefined
reference to `pthread_rwlockattr_setkind_np'
/home/tgc/projects/gnulib/build/gllib/glthread/lock.c:59: undefined
reference to `pthread_rwlockattr_destroy'
collect2: ld returned 1 exit status
make[4]: *** [test-fstrcmp] Error 1

Manually linking test-fstrcmp with -pthread then allows the build to
complete.


bump?

It's currently not possible for me to build a gnulib snapshot made with this gnulib-tool invocation: ./gnulib-tool --create-testdir --with-tests --dir=/home/tgc/projects/gnulib/build --avoid=non-recursive-gnulib-prefix-hack

It will fail as shown above.

I've uploaded a log from a failed build:
http://jupiterrise.com/tmp/log-gnulib-201701301327195863188.txt
(add .gz for a compressed version)

-tgc



reply via email to

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