Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[solved] Building problems while trying to build Qt 4.7.3 on a machine that has installed Qt 4.4.3



  • Hi there,

    I am trying to build Qt 4.7.3 on a linux machine that comes with a installed Qt 4.4.3.
    In the beginning of t he build process qmake reads all the .pro files in source dir and creates the corresponding Makefiles.
    Each of the created Makefiles has a line like:

    @LIBS = $(SUBLIBS) -L/usr/lib64 -L/home/user/rpmbuild/BUILD/qt-everywhere-opensource-src-4.7.3/lib -lQtCore -L/usr/lib64 -lz -lm -pthread -L/opt/gnome/lib64 -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread @

    The problem is the first occurence of "-L/usr/lib64" which has precedence over "-L/home/user/rpmbuild/BUILD/qt-everywhere-opensource-src-4.7.3/lib"
    As a consequence the wrong QtCore is used (the Qt 4.4.3 one out of /usr/lib64), which results in a linker error.

    In my opinion qmake should not put the /usr/lib64 path in front of the other library path.

    Do you have any hints on how to get that right?
    Is this a bug in qmake?

    Regards,
    Markus



  • This must have been added from somewhere else. I tried a configure run on an older kubuntu box with Qt 4.4.1 libs in /usr/lib64, I do not have that path in the LIBS variable. Maybe it sneaked in by some other dependency which is installed there?



  • Thanks for the hint Volker.
    I had a closer look into the .spec file of the rpm that I am using and behold:
    there is a line passing several extra parameters to the configure call:

    -- ok now the third try to get that following line into the post. It was parsed away by the forum.

    The line contains:
    @define common_options -L%libdir@

    I changed that line to my needs and the issue is solved now.


Log in to reply