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

Building an app based on a dev (manual) build of Qt



  • Hi,
    I built Qt 5.15.3 from git using the manual on the website and set up a kit in developer mode. Now, I want to build an app using my manual Qt build instead of the system/Online installer version. For the online installer version, I use DCMAKE_PREFIX_PATH=/home/teecee/Qt/5.15.2/gcc_64 , which worked just fine. However, I am unable to do the same with my manual Qt installation. I added the top level directory of both qt5 and qt5-build, but both aren't recognized. Then I tried /home/teecee/qt5-build/qtbase/lib/cmake/Qt5/Qt5Config.cmake, which also failed. Is there any solution for this problem?



  • Sorry to post it so late, but I built it again without developer-build , and now adding the path to the explicit install directory somewhat solved my problem.


  • Lifetime Qt Champion

    @tcee_14007 Where did you install your Qt build (make install)



  • I ran the command in the build folder itself


  • Lifetime Qt Champion

    @tcee_14007 But where did "make install" install it?



  • I'm sorry, but I'm unable to find it.
    However, I have attached the bash output here: https://pastebin.com/Y4ZEVtDr
    could you please take a look at it ?



  • It seems like what was pasted into pastebin was from a subsequent (not original) run of "make install". There is a bunch of output like "Nothing to be done", which indicates that things were already installed. During an initial run I would expect to see a bunch of cp action showing things being copied to some destination.

    Unless you, @tcee_14007 explicitly used the -prefix argument when you ran configure, then things probably installed to a system folder.

    If you run ./configure --help you should see what the default prefix is.

    On my system, it shows:

      -prefix <dir> ...... The deployment directory, as seen on the target device.
                           [/usr/local/Qt-$QT_VERSION; qtbase build directory if
                           -developer-build]
    

    If you think that the -prefix argument was used, then look at the config.log file (wherever you ran configure & make) and you should be able to retrieve the arguments from config.log (try searching the log for the phrase "Command line")



  • I had added -developer-build to the configure command, and it said that I shouldn't run make install. I ran it for the first time after @jsulm asked me to, so the problem might be different. And I checked, I didn't add -prefix.



  • Interesting!

    I had never paid any attention to that option. (although I now see that in the snippet of help text I posted for prefix earlier, there is a mention of developer-build, too!)

    I found this mailing list entry "What does '-developer-build' actually do":
    https://lists.qt-project.org/pipermail/qt-interest-old/2010-April/021593.html

    As @jsulm has already highlighted, the key thing is still to figure out where on earth your manually-compiled binaries got "installed" to.

    For developer-build they are supposedly in $PWD (of wherever you ran make, I guess)?

    Maybe just try to find where it put qmake:

    cd $WHEREVER_YOU_PUT_YOUR_MANUAL_QT_STUFF
    find  . -type f -name qmake
    


  • When I say that I have never paid attention to developer-build, I suppose I should be explicit about what I normally do do.

    I often build debug versions of Qt, and occasionally even experiment with editing the source and rebuilding with my changes included.

    When I do that I simply run configure with the -prefix argument pointing at some special folder that won't pollute my global /usr/ or /usr/local areas.

    And of course I add the -debug flag so that I get debug symbols.

    Full example here.

    When using -prefix and then make && make install, the ultimate installation location is controlled by whatever I chose to specify as prefix.

    This isn't necessarily better than using developer-build !!

    Just explaining how those of us who were ignorant of developer-build have been doing this ;)



  • Sorry to post it so late, but I built it again without developer-build , and now adding the path to the explicit install directory somewhat solved my problem.



  • @tcee_14007 said in Building an app based on a dev (manual) build of Qt:

    Sorry to post it so late, but I built it again without developer-build , and now adding the path to the explicit install directory somewhat solved my problem.

    I don't think you are posting late :)

    There was no deadline. I'm glad to hear back about what worked.

    Maybe someone who knows more about developer-build can comment about how to successfully use DCMAKE_PREFIX_PATH with a Qt "install" that was created with developer-build.


  • Lifetime Qt Champion

    Hi,

    The developer-build option is for people wanting to hack on Qt itself so it should not be used for deployment purpose nor development other than Qt itself. IIRC, there are some difference in the set of options and flags used for the compilers.

    It's an "in-place" build so there's nothing to install.


  • Banned

    This post is deleted!

Log in to reply