Qmake not loading qt.conf



  • I just built QT 4.8.2 from source and I am experiencing an issue when setting up the qt.conf file. I need this to work for my build environment.
    I place a qt.conf file like this
    @
    [Paths]
    Prefix = .
    @

    in the same directory as qmake.exe
    but when I run
    @C:\qtbuild\qmake> qmake -query@

    I get the built-in paths not the qt.conf paths

    I have debugged the issue and found that when run from cmd or explorer the argv[0] value does not contain a full path to the exe just the as executed path. So if I change to call to
    @C:\qtbuild\qmake> c:\qtbuild\qmake\qmake.exe -query@

    I get the correct paths.

    I also tried this in 4.6.2 and it all works correctly so I tracked down the change log and believe this commit is what broke the functionality http://qt.gitorious.org/qt/qt/commit/c378e16e57e8ce2255116e7fdb5436524cccb8c7 at least for qmake, I assume similar changes were made in QLibraryInfo to break all the other qt applications.

    So my question, has anyone else experienced this? Do you have any workarounds? What was the change made?

    I think the best would be to provide a fall back for Option::qmake_abslocation being set to "" in Option::init() , at least for windows getting the running applications location via GetModuleFileName()



  • what is "just the as executed path" supposed to mean? please paste the actual contents.



  • Sorry if this is a bit old, but i faced the same thing (in 4.8.4). What he meant is that if he runs just 'qmake', the qt.conf that is beside the qmake executable will not be found. But if he types the '/path/to/qmake' with a qt.conf in '/path/to', it will found properly



  • the issue has been fixed meanwhile.



  • Well, there's at least an issue i still get in Qt 4.8.5 : if i have a symbolic link to qmake somewhere, and launch qmake with the path to that symbolic link, the qt.conf will apparently be looked for in the folder of the symbolic link, and the qt.conf in the folder of the real qmake binary will be ignored


Log in to reply
 

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