PDA

View Full Version : pthread issues?



rnswebx
01-02-2002, 09:55 PM
When running configure on a redhat 7.1 install (with all of the required rpm updates, I think) I've ran into this problem several times. Has anyone either seen this, or does anyone happen to know the fix?

<snip>
checking for Qt... yes
>> Found version.: 2.3.2
>>> Headers......: /opt/qt-gcc3-2.3.2/include/
>>>> Libraries...: /opt/qt-gcc3-2.3.2/lib/
>>>>> Workable...: -*{ YES }*-
checking for Qt MOC... yes
checking if Qt compiles without flags... no
checking for pthread_create in -lpthread... no
configure: error: cannot find pthread_create in libpthread
</snip>

Any feedback is appreciated

Zaphod
01-02-2002, 09:58 PM
Could you please include the last 20 so files of the config.log file that was created by configure?

Enjoy,
Zaphod (dohpaZ)

rnswebx
01-02-2002, 10:01 PM
Sure. Thanks for being so damn fast to reply
<snip>
[root@onyx showeq]# ./configure | tail -20
configure: error: cannot find pthread_create in libpthread
checking for objdir... .libs
creating libtool
loading cache ./config.cache
checking for supported compiler version... yes
checking for supported libc version... yes
checking for extra includes... no
checking for extra libs... no
checking for libz... -lz
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for IceConnectionNumber in -lICE... yes
checking for libXext... yes
checking for libpng... -lpng -lz -lm
checking for Qt... yes
>> Found version.: 2.3.2
>>> Headers......: /opt/qt-gcc3-2.3.2/include/
>>>> Libraries...: /opt/qt-gcc3-2.3.2/lib/
>>>>> Workable...: -*{ YES }*-
checking for Qt MOC... yes
checking if Qt compiles without flags... no
checking for pthread_create in -lpthread... no
[root@onyx showeq]#
</snip>

rnswebx
01-02-2002, 10:02 PM
I'm an idiot... here is what you really asked for:

}
configure:3641: checking for pthread_create in -lpthread
configure:3663: gcc -o conftest -g -O2 conftest.C -lpthread 1>&5
/tmp/ccwN8rfN.o: In function `main':
/home/webx/showeq/configure:3660: undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3649 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create();

int main() {
pthread_create()
; return 0; }

rnswebx
01-02-2002, 10:48 PM
OK, I was having an issue with -lqt-mt, which I fixed by editing my ld.so.conf, however I'm still stuck at the pthreads error. I no longer have the Qt compile without flags error, if that helps at all. Here are the applicable entries from config.log:

<snip>
configure:3479: checking if Qt compiles without flags
configure:3532: gcc -o conftest -g -O2 -I/opt/qt-gcc3-2.3.2/include -L/usr/X11R6/lib conftest.C -lqt-mt -lXext -lX11 1>&5
configure:3641: checking for pthread_create in -lpthread
configure:3663: gcc -o conftest -g -O2 conftest.C -lpthread 1>&5
/tmp/ccAvsxVj.o: In function `main':
/home/webx/showeq/configure:3660: undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3649 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create();

int main() {
pthread_create()
; return 0; }
</snip>

Zaphod
01-03-2002, 12:06 AM
mswebx,
It looks like you are using the 3.x C++ compiler yet a 2.X C compiler. Make sure to set both your CC and CXX environment variables appropriately if you're using them to set which compiler to use.

I suspect you set the CXX environment variable and no the CC environment variable when attempting to configure ShowEQ.

Enjoy,
Zaphod (dohpaZ)

rnswebx
01-03-2002, 05:25 AM
Thanks again for your reply, however that's not the case. I'm using gcc for both c++ and c compiling (export CC=gcc; export CXX=gcc). Is this incorrect? I'll show a list of rpms I have installed, perhaps I'm missing something that isn't listed in the INSTALL:

gcc-3.0.3-1
glibc-devel-2.2.4-19.3
glibc-2.2.4-19
glibc-common-2.2.4-19
qt-gcc3-devel-2.3.2-1
qt-gcc3-2.3.2-1
libstdc++-3.0.3-2

Has anyone gotten seq 4 to work with a fresh 7.1 install with X only? (No gnome or kde)

Again, any feedback is appreciated.

rnswebx
01-03-2002, 05:33 AM
Thanks again for your reply, however that's not the case. I'm using gcc for both c++ and c compiling (export CC=gcc; export CXX=gcc). Is this incorrect? I'll show a list of rpms I have installed, perhaps I'm missing something that isn't listed in the INSTALL:

gcc-3.0.3-1
glibc-devel-2.2.4-19.3
glibc-2.2.4-19
glibc-common-2.2.4-19
qt-gcc3-devel-2.3.2-1
qt-gcc3-2.3.2-1
libstdc++-3.0.3-2

Has anyone gotten seq 4 to work with a fresh 7.1 install with X only? (No gnome or kde)

Again, any feedback is appreciated.

fryfrog
01-03-2002, 05:43 AM
use "export CC=gcc3" and "export CXX=g++3" instead (or gcc-3.0.1 / g++-3.0.1 if you are using mandrake).

rnswebx
01-03-2002, 05:59 AM
I dont have those executables after installing the rpms, so it ends up causing the obvious problem:

checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc3
checking whether the C compiler (gcc3 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

rnswebx
01-03-2002, 06:18 AM
Well, it's official, I've been looking much much too deep. The only problem I had was with setting CXX, and I should have at least noticed this on fryfrog's last response. Simply setting CXX to g++ (export CXX=g++) worked fine. I'm compiling now, but at least I got through the configure. Thanks again for the feedback.

fryfrog
01-04-2002, 04:05 AM
i would STILL use export CXX=g++3 and NOT what you are using. i THINK (and i can't be 100% right of course) that if you are using redhat 7.2 (or probably 7.1) you need to use this.

redhat 7.2 gcc-3 (and the other related stuff) does NOT upgrade your current gcc. it actually co-exists. this is because 3.0.x and 2.9x.x are NOT really that compatible. so both exist, you have to know how to use them.

if you do "gcc --version" and it says 2.x, you are using the wrong one. same with "g++ --version". (i think). for me, using rh 7.2 with rh 7.2's gcc 3.0.1 line of rpm files installed (and not modified from default names) the files were called (and in...)

rh 7.2
/usr/bin/gcc vs. /usr/bin/gcc3
and
/usr/bin/g++ vs. /usr/bin/g++3

mdk 8.1
/usr/bin/gcc vs. /usr/bin/gcc-3.0.1
and
/usr/bin/g++ vs. /usr/bin/g++-3.0.1

while you might get it compiling now, it could break in the future if this is the case. but then, maybe you did something odd like install the rpms and then rename gcc3 to gcc... or installed gcc by compiling from source.

rnswebx
01-04-2002, 04:16 AM
I actually upgraded mine, and didn't install 3.0.3 seperately. There is no longer any gcc/g++ 2.9.x on my machine. In retrospect, I think it would've been easier on me to install the rpm with -i instead of -U, so that they could co-exist, as in your explanation.