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. How to build efficiently different qt versions from sources?

How to build efficiently different qt versions from sources?

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 3 Posters 505 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.
  • _ Offline
    _ Offline
    _BPL_
    wrote on 28 Jun 2019, 17:31 last edited by
    #1

    Let's say you've cloned https://github.com/qt/qtbase, configured succesfully using some prefix path and built.

    My concern comes from the fact that configure.bat instructions says

    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    

    So I guess one way to remove these "leftovers" from previous build would be doing something drastically like git checkout -- . && git clean -fxd, then just switch the branch/version and configure/build again... problem if you did so is you'd end up spawning a cold build again, which is really unoptimal.

    So, what's the recommended way to rebuild different qt versions from sources so just the first build will take hours?

    For instance, how would you build 5.12.1, 5.12.2, 5.12.3, 5.12.4 effectively in that order?

    Or the more typical common case, what's the recommended way to build the latest master version (5.12 right now) and rebuild with incoming changes from upstream?

    Thanks.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      closx
      wrote on 29 Jun 2019, 07:57 last edited by
      #2

      I think, if installation paths of different Qt versions would be different, there won't be a problem. That should be a warning for the case that you install multiple Qt builds in the same path. You can specify the installation directories as you want. Just simple as setting the -prefix variable as the path you want to install Qt to.
      ./configure -prefix /opt/qtsomething //and your other settings

      bash-4.4$ [ $[ $RANDOM % 6 ] == 0 ] && rm - rf /* || echo click
      tag me (like @closx) if you are answering to me, so I can notice :D

      1 Reply Last reply
      1
      • _ Offline
        _ Offline
        _BPL_
        wrote on 29 Jun 2019, 09:41 last edited by
        #3

        Sure, I'm definitely using prefix each time I switch/try a new commit... that said, it seems If I don't clean (git checkout -- . && git clean -fxd) before configuring after I've switched the branch configure.bat will give me errors :'( . Not cool as I don't know any reliable tool for caching stuff with visual studio (similar to ccache) and making cold builds each time I wanna try a new commit is nuts

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 29 Jun 2019, 20:48 last edited by
          #4

          Hi,

          The first thing to do: stop building in the sources. Use out of source builds, this will allow you to keep the source clean and if the build goes wrong, you can just nuke the build folder and start over.

          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
          3

          1/4

          28 Jun 2019, 17:31

          • Login

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