Results 1 to 13 of 13

Thread: pthread issues?

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    9

    Question pthread issues?

    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

  2. #2
    Registered User Zaphod's Avatar
    Join Date
    Dec 2001
    Posts
    648
    Could you please include the last 20 so files of the config.log file that was created by configure?

    Enjoy,
    Zaphod (dohpaZ)
    Chief Software Engineer of the Apocalypse.
    http://showeq.doomed.to/
    SourceForge.net user: dohpaz.

    Personal thank you donations are now accepted.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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>

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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; }

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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>

  6. #6
    Registered User Zaphod's Avatar
    Join Date
    Dec 2001
    Posts
    648
    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)
    Chief Software Engineer of the Apocalypse.
    http://showeq.doomed.to/
    SourceForge.net user: dohpaz.

    Personal thank you donations are now accepted.

  7. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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.

  8. #8
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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.

  9. #9
    Registered User
    Join Date
    Dec 2001
    Posts
    951
    use "export CC=gcc3" and "export CXX=g++3" instead (or gcc-3.0.1 / g++-3.0.1 if you are using mandrake).

  10. #10
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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.

  11. #11
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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.

  12. #12
    Registered User
    Join Date
    Dec 2001
    Posts
    951
    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.

  13. #13
    Registered User
    Join Date
    Jan 2002
    Posts
    9
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On