LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Problem in installing CLIsh: Configure script unable to find pthread_create function (https://www.linuxquestions.org/questions/linux-kernel-70/problem-in-installing-clish-configure-script-unable-to-find-pthread_create-function-656592/)

avinash_ag1985 07-18-2008 06:38 AM

Problem in installing CLIsh: Configure script unable to find pthread_create function
 
Hi there.
I'm using CLIsh to build a Cisco-like command line interface for my application. The problem is when I try to install CLIsh. After unzipping the tarball, when i try to do a ./configure(run script to build makefile), I get the following error:

checking for pthread.h... yes
checking for pthread_create in -lpthread... no
configure: error: Cannot find the POSIX threads library

I have checked the library path. The header file exists but somehow the script is not able to link with library. I am accessing a Red Hat 9 system through telnet, with root privileges.

Could someone please help?
Thanks in advance

paulsm4 07-20-2008 05:58 PM

You're logging in as the "root" user with "telnet"? That's pretty scary - look in to SSH.

Meanwhile - you're exactly right. "configure" is telling you that it found a pthreads header (good!), but didn't find a pthreads library (bad).

Why not just (re)install the latest/greatest PThreads RPM?

http://www.redhat.com/docs/manuals/l...hical-rpm.html

Just a thought .. PSM

avinash_ag1985 07-21-2008 07:34 AM

Hi all.
Its all fine now. The script searches the path /usr/local for a .h file, if no other path is specified using --prefix. The path to the -lpthread library must be given explicitly as below:

PTHREAD_LIBS="/usr/lib -lpthread"

This is to be included just before the script searches for the POSIX threads. It will result in a successful compilation but the pthread function will still not be found. It has to be seen if this causes any problems.

However, I now have a new problem. The makefile shows the following error, when command make is given:

g++ -DHAVE_CONFIG_H -I. -I. -std=gnu++98 -g -O2 -MT tinyxml/libtinyxml_la-tinyxml.lo -MD -MP -MF tinyxml/.deps/libtinyxml_la-tinyxml.Tpo -c tinyxml/tinyxml.cpp -fPIC -DPIC -o tinyxml/.libs/libtinyxml_la-tinyxml.o
cc1plus: unrecognized option `-std=gnu++98'
make[1]: *** [tinyxml/libtinyxml_la-tinyxml.lo] Error 1
make[1]: Leaving directory `/home/Avinash/clish-0.7.3'
make: *** [all] Error 2

People, anything?

knudfl 07-22-2008 02:47 PM

""cc1plus: unrecognized option `-std=gnu++98' ""

Did you read this LQ thread
"Redhat 9.0 has to be stopped at all costs"
http://www.linuxquestions.org/questi...-costs-655491/

I made a test - compile with CLIsh the day you asked : #1
And it will probably compile with no errors on any modern
system. Just './configure && make' ... and it builds.

CLIsh: Not a new program, but all files seems to have got
an overhaul in 2008, not much chance with RH 9, sorry.
But try on a newer OS, and see if the result will fit
the requirements.

Regards


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