Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-04-2014, 08:32 PM   #1
LQ Newbie
Registered: Jul 2011
Posts: 3

Rep: Reputation: Disabled
Cannot find pthread in ubuntu 14.04

I am trying to install a program TRIQS in a 32-bit Pentium 4 Ubuntu14.04 system;
In course of the compilation I ran into the error "lpthreads not found"
I then copied "liblpthread.a" and "" from /usr/libx32 into usr/bin still the program doe not compile as it cannot find pthread(see error log below).

Please help as I am in dire need.
Thanks in anticipation

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2882036904.dir/link.txt --verbose=1
/usr/bin/gcc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec2882036904.dir/CheckFunctionExists.c.o -o cmTryCompileExec2882036904 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/enukpere/src/triqs/build/src/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec2882036904] Error 1
make: *** [cmTryCompileExec2882036904/fast] Error 2
Old 07-04-2014, 08:46 PM   #2
LQ Newbie
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Note that error : "cannot find -lpthreads" not "cannot find -lpthread"
Old 07-05-2014, 07:25 AM   #3
LQ Newbie
Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
ZUNKE, ThanKs for the correction but I am yet to receive a solution. Do you have a solution to the problem "-lpthreads" not found?

Last edited by Imani1; 07-05-2014 at 07:27 AM.
Old 07-05-2014, 10:14 AM   #4
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Libraries belong in a lib directory, not in a bin directory (the system is configured to look for them there), so moving a library into /usr/bin is rather pointless.

I can't find any reference to a "libpthreads" anywhere except asa component to libevent. I wonder if this isn't just a typo in the Makefile of the program you're trying to compile. I wonder if you edit the makefile and change "-lpthreads" to "-lpthread" it will suddenly work. I note the argument "-DCHECK_FUNCTION_EXISTS=pthread_create", and pthread_create is a part of libpthread.

Does the TRIQS software have any documentation regarding necessary prerequisites? Sometimes library names change over the years, so if it was written on an older Linux OS it's possible that this could be a source of confusion,
Old 07-15-2014, 09:53 PM   #5
LQ Newbie
Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
In connection wth the issue of not finding pthread I read somewhere that I should export libpthread.a from the directory libx32 to where it can be seen by usr/bin/ld.
The question is how do I perform the export?
Please help I need to install the proyram for my thesis.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot find the server at error after restart new Ubuntu Install Libellula Linux - Newbie 1 03-26-2013 06:46 PM
how can i find where linux store programming library such as:pthread.h...? oreka Linux - Newbie 2 11-30-2008 02:06 AM
libtest.a uses pthread: user of libtest.a should not link pthread again debulu Programming 2 01-31-2007 09:23 PM
Pthread JanusPaul Programming 8 02-09-2005 05:46 PM
kmpio can't find pthread library Fats-T Linux - Software 0 02-03-2005 01:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration