[odb-users] Pthreads issue

Aarón Bueno Villares abv150ci at gmail.com
Thu Jan 14 15:22:19 EST 2016


Trying to compile libodb-boost in my platform (Ubuntu 14.04), I have
discovered the following issue:


If I call ./configure withouth params for example it works without
problems, but if I pass the flag option -Werror, it says that it cannot
find the pthread library:

    ./configure --disable-static CXX=g++4.8 CXXFLAGS='-O3 -Werror
-std=c++11'

Output:

checking for the pthreads library -lpthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no

And it seems that is the only compiler option which makes ./configure
doesn't work properly:

     ./configure --disable-static CXX=g++4.8 CXXFLAGS='-O3 -Wall -pedantic
-pedantic-errors -Wextra -std=c++11'

Output:

// ...
checking for the pthreads library -lpthreads... no
checking for the pthreads library -lpthread... yes
checking if more special flags are required for pthreads... -D_REENTRANT
checking for __thread keyword... yes
// ....

But as soon I pass the -Werror compiler flag, it crash.


More information about the odb-users mailing list