Compiling Qt-4.8.0 in RHEL 4 gives an error



  • Hello

    I am trying to install Qt-4.8.0 on my Red Hat Enterprise Linux 4 system. I am configuring it with:

    ./configure -nomake demos -nomake examples

    The configure runs fine.

    Then I compile it:

    gmake -j 3

    I then get an error:

    _.obj/release-shared/qthread_unix.o(.text+0x2c): In function set_thread_data(QThreadData*)': : undefined reference to__tls_get_addr'
    .obj/release-shared/qthread_unix.o(.text+0x1670): In function QThreadData::current()': : undefined reference to__tls_get_addr'
    .obj/release-shared/qthread_unix.o(.text+0x177a): In function QThreadData::current()': : undefined reference to_tls_get_addr'
    collect2: ld returned 1 exit status

    Seems that there is trouble with some tls support, so I tried configuring without tls:

    ./configure -no-stl -nomake demos -nomake examples

    I got the same error when running gmake.
    I checked the output while configuring and tls support was shut off:

    STL support ............ no

    I know that I am using an old OS version, but I cannot simply switch OS.

    I have succesfully compiled both Qt-4.5.2 and Qt-4.6.3 on this system before.

    Please help



  • I think you are mixing tls with STL.
    It looks like older kernel has this issue.

    Remove following line to skip this error
    #define HAVE_TLS



  • Hi vivek2k5

    Thank you for your reply.

    Qt compilation problem with corelib solved after I removed the lines in src/corelib/thread/qthread_unix.cpp.
    Now I just need to work on the problem of my brain meltdown, failing to spot the difference between stl and tls...

    BUT - now it fails with the following message:

    painting/qdrawhelper_sse2.cpp: In static member function static long int __vector__ QSimdSse2::v_greaterOrEqual(float __vector__, float __vector__)': painting/qdrawhelper_sse2.cpp:531: error:_mm_castps_si128' was not declared in this scope
    painting/qdrawhelper_sse2.cpp:531: warning: unused variable '_mm_castps_si128'
    gmake[1]: *** [.obj/release-shared/qdrawhelper_sse2.o] Error 1
    gmake[1]: *** Waiting for unfinished jobs....
    gmake[1]: Leaving directory $HOME/software/qt-everywhere-opensource-src-4.8.0/src/gui'
    gmake: *** [sub-gui-make_default-ordered] Error 2

    Any idea?



  • You will have to reconfigure with following option

    ./configure -no-sse2



  • Thanks - It worked.

    I will google it before posting next time, as I also found the workaround immediately after posting the question.

    Sorry for the inconvenience...



  • hmm - now it failed during compiling of Javascriptcore with only a warning message. I googled this, and was not really able to find an answer:

    wtf/Assertions.cpp:31: warning: ignoring #pragma GCC diagnostic
    gmake[2]: *** [.obj/release-static/Assertions.o] Error 1
    gmake[2]: Leaving directory /home/roha/software/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore' gmake[1]: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2 gmake[1]: Leaving directory/home/roha/software/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source'
    gmake: *** [sub-webkit-make_default-ordered] Error 2

    Any ideas?



  • I also got same issue. Not sure exactly whats wrong here (may be because of older version of g++, 3.4.6 in may case).
    "This":http://qt-project.org/forums/viewthread/13798 thread talks about issues in static build of webkit.

    I Just removed webkit from list of modules to be built
    ./configure -no-sse2 -no-webkit



  • I also have gcc-3.4.6...

    Thanks - I will not use the webkit anyway, and now it compiled until the end.

    Thank you very much, you have been a BIG help.



  • Did you manage to run any Qt program with these newly compiled libs ? I am getting a seg fault in hello Qt program itself. Have not looked deep into this, but looks like compilation is messed somewhere..

    By any chance, have you compiled Qt-4.6.4 and run it successfully on same system ??

    Thanks,



  • I compiled Qt-4.6.3 one and a half year back, and I also compiled Qt-4.7.4 a few days ago, when I was struggling with 4.8.0, but not Qt-4.6.4.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.