Important: Please read the Qt Code of Conduct -

Compile 4.7.2 fails

  • Hello,

    After entering the following commands:

    "sudo ./configure -opensource -confirm-license -verbose -nomake examples -nomake demos -debug -no-qt3support -no-opengl -no-cups"


    "sudo make"

    I get the following errors:

    /home/gerard/qt-everywhere-opensource-src-4.7.2/lib/ undefined reference to g_main_context_push_thread_default' /home/gerard/qt-everywhere-opensource-src-4.7.2/lib/ undefined reference tog_main_context_pop_thread_default'

    collect2: ld returned 1 exit status

    make[4]: *** [../../../../bin/assistant] Error 1
    make[4]: se sale del directorio «/home/gerard/qt-everywhere-opensource-src-4.7.2/tools/assistant/tools/assistant»
    make[3]: *** [sub-assistant-make_default-ordered] Error 2
    make[3]: se sale del directorio «/home/gerard/qt-everywhere-opensource-src-4.7.2/tools/assistant/tools»
    make[2]: *** [sub-tools-make_default-ordered] Error 2
    make[2]: se sale del directorio «/home/gerard/qt-everywhere-opensource-src-4.7.2/tools/assistant»
    make[1]: *** [sub-assistant-make_default-ordered] Error 2
    make[1]: se sale del directorio «/home/gerard/qt-everywhere-opensource-src-4.7.2/tools»
    make: *** [sub-tools-make_default-ordered] Error 2


    If anyone could help me, it would be very appreciated. Ive been trying to resolve this problem for the last 2 days.


    [EDIT: code markup for log output, Volker]

  • Seems to be that glib is missing in the list of linked libraries or that it is the wrong version. Do you have multiple glib versions installed?

  • It works!

    I added the argument "-no-glib" to the command ./configure.

    Thank you very much!!

  • Hi Gerard..
    I am also facing the same issue.
    Could you tell me how to resolve this?
    Where should i add -no-glib argument?

  • [quote author="saravanant" date="1328694355"]Hi Gerard..
    I am also facing the same issue.
    Could you tell me how to resolve this?
    Where should i add -no-glib argument?[/quote]

    For Gerard it would be like this:
    ./configure -opensource -confirm-license -verbose -nomake examples -nomake demos -debug -no-qt3support -no-opengl -no-cups -no-glib

    So it has to be added somewhere as a command line argument.

    [Edit] sudo removed, see also next note of tobias below VVVVVVV

  • Moderators

    Off-topic: There is no need to run configure or make as root.

    You will need root privileges to "make install" if you are installing into some system place like /usr/local/Trolltech or /opt/something, but everything else will run fine without.

  • I just wish I had bothered to search this forum before spending a day on my own, trying to get rid of the annoying message.

    As soon as I put the -no-glib in the configure script everything ran fine and my customer is happy.

    One side note.. I had to compile with -lrt (something I normally don't have to do)... small price :)



Log in to reply