Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pthreads not found.
10-23-2013, 01:42 AM,
Post: #1
pthreads not found.
Hi devs,

Just did a fresh build of AA on arch linux and got the following messages from configure:

checking for the pthreads library -lpthreads... 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 for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
configure: error: "Required pthreads support not found."

This doesn't stop the build from working. I know for certain that the required packages are installed and have noted quite a few people with the same error (on other projects). I'm working on fixing this but any help would be great!



Reply
10-23-2013, 12:52 PM,
Post: #2
RE: pthreads not found.
Is your pthread library on Arch in a non-standard place? e.g. not in /usr/lib64 or /usr/lib ?

It looks like configure tends to look for -lpthreads (with the s) first before -lpthread because of other OS's like AIX that have both names, and broken POSIX compliance in pthread... That being said, you're not finding -lpthread either, so you need to figure out where that is first.

If it's in a special directory, and not in the default library search path, try adding

Code:
PTHREAD_LIBS="-L/path/to/pthread/libs"

right before your ./configure

(This isn't in the ./configure --help output, but I see the variable mentioned within the script)
Reply
10-23-2013, 08:36 PM, (This post was last modified: 10-23-2013, 08:40 PM by xenos.)
Post: #3
RE: pthreads not found.
pthreads are in usr/lib and pthread.h is in /usr/include

I use this simple script to do an alternate-install;

export CFLAGS="-03 --march=native"
./configure --enable-alternate-install
make clean all install-alternate

If I remove the top line the output is;

checking for the pthreads library -lpthreads... 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... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes

That line has been in the script for a heck of a long time, wasn't until recently that I noticed the errors, the script doesn't stop if configure fails, probably why I didn't notice Huh
(10-23-2013, 12:52 PM)L`Emmerdeur Wrote: Is your pthread library on Arch in a non-standard place? e.g. not in /usr/lib64 or /usr/lib ?

It looks like configure tends to look for -lpthreads (with the s) first before -lpthread because of other OS's like AIX that have both names, and broken POSIX compliance in pthread... That being said, you're not finding -lpthread either, so you need to figure out where that is first.

If it's in a special directory, and not in the default library search path, try adding

Code:
PTHREAD_LIBS="-L/path/to/pthread/libs"

right before your ./configure

(This isn't in the ./configure --help output, but I see the variable mentioned within the script)



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)