Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Default install directory cannot be changed
wolf. last edited by
I want to control where Qt 4.8.5 is installed on my development box (Centos 6.2), but it appears that the -prefix switch for ./configure is being ignored. When ./configure is finished it advertises that Qt will be installed into my desired directory, but when I actually execute "gmake install" Qt gets installed to the default "/usr/local/Trolltech/Qt-4.8.5". I've never had this trouble customizing any other app with the ./configure process, just this one time with Qt. (Note: I installed the previous version of Qt [6.4.2] on my box using "yum", so ./configure wasn't necessary).
The syntax for prefixing the install path (./configure --help) is:
- ./configure -prefix /opt/qt4.8.5
but I tried other variations just to test it out. It turns out the old style
- ./configure --prefix=/opt/qt4.8.5
is still accepted as correct syntax too. In either case ./configure finishes with
- Qt will be installed into /opt/qt4.8.5
but all the Makefiles, qdoc files, and html files still have "/usr/local/Trolltech/Qt-4.8.5" in them. And if I execute "make install", that's just where they go.
Usually when something "should just work" and it doesn't, the problem is either me or it's a bug (usually it's me). All the Qt install documentation (official and unofficial) claims the prefix switch "should just work", so I'm hoping it's not me this time.
Has anyone else tackled this problem?
wolf. last edited by
While I didn't find "the reason" why ./configure is behaving this way, I did find a way to move on with my life. I invoked every switch that takes a path as a parameter and gave it my install path. I couldn't tell if all these switches were a total summation of the prefix switch, so I used them in conjunction with it to cover all the bases and increase the chance of success. The result is success.
This approach overrides whatever obstacle was getting in the way of the prefix switch.
I'd still love to understand why -prefix alone does not work as advertised, so please feel free to comment if you can share some insight. Other than that, I wanted to share what helped get me through this very sad and difficult time. Hope it helps someone else.
There might be a bug in the configure script. Did you check the "bug report system":http://bugreports.qt-project.org/issues to see if it's a known issue ?
If not you could open a new report