Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Default install directory cannot be changed
QtWS25 Last Chance

Default install directory cannot be changed

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 2.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wolf.
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • W Offline
      W Offline
      wolf.
      wrote on last edited by
      #2

      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.
      @
      ./configure
      -prefix /opt/qt4.8.5
      -bindir /opt/qt4.8.5
      -libdir /opt/qt4.8.5
      -docdir /opt/qt4.8.5
      -headerdir /opt/qt4.8.5
      -plugindir /opt/qt4.8.5
      -importdir /opt/qt4.8.5
      -datadir /opt/qt4.8.5
      -translationdir /opt/qt4.8.5
      -sysconfdir /opt/qt4.8.5
      -examplesdir /opt/qt4.8.5
      -demosdir /opt/qt4.8.5
      @

      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.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved