How to use prefix, extprefix, hostprefix in configure to make a proper order in target directory?
-
Hello everyone!
I am building Qt from sources and I'm wondering how should I use
-prefix,-xtprefix,-hostprefixinconfigurecommand to get the same order as here (the prebuilt Qt from the Maintance tool):
Yet I get everything (libs, binaries) placed near the source code, what is messy and makes it impossible to use with my projects. How do I separate the source code from the build?
I've seen such suggestion for Linux:
export INSTALLPATH=/home/alan/work/qt/qt_5.5.1_arm_cross_compiled ./configure ... -extprefix $INSTALLPATH/binaries -hostprefix $INSTALLPATH/toolsWould it put binaries and tools from several Qt modules to the appropriate 2 folders? Do I have to fill the lib directory myself by copying libs from each module directory in the source dir then?
-
Hello everyone!
I am building Qt from sources and I'm wondering how should I use
-prefix,-xtprefix,-hostprefixinconfigurecommand to get the same order as here (the prebuilt Qt from the Maintance tool):
Yet I get everything (libs, binaries) placed near the source code, what is messy and makes it impossible to use with my projects. How do I separate the source code from the build?
I've seen such suggestion for Linux:
export INSTALLPATH=/home/alan/work/qt/qt_5.5.1_arm_cross_compiled ./configure ... -extprefix $INSTALLPATH/binaries -hostprefix $INSTALLPATH/toolsWould it put binaries and tools from several Qt modules to the appropriate 2 folders? Do I have to fill the lib directory myself by copying libs from each module directory in the source dir then?
@bibasmall All you need is
-prefix. The other flags are more useful when cross-compiling.Here is what I do when compiling Qt to get everything nicely separated. For example let's take Qt 6.5.1:
- unpack Qt source code from zip / tarball to
qt-everywhere-src-6.5.1 - create directory
6.5.1 - create directory
6.5.1-build - cd into
6.5.1-buildand run../qt-everywhere-src-6.5.1/configurehere, with-prefix ../6.5.1 - compile
- install
Now, if all went well I can remove
6.5.1-buildandqt-everywhere-src-6.5.1, they are not necessary anymore. And folder6.5.1contains only final, installed executables and libraries, no "garbage" from compilation. - unpack Qt source code from zip / tarball to
-
@bibasmall All you need is
-prefix. The other flags are more useful when cross-compiling.Here is what I do when compiling Qt to get everything nicely separated. For example let's take Qt 6.5.1:
- unpack Qt source code from zip / tarball to
qt-everywhere-src-6.5.1 - create directory
6.5.1 - create directory
6.5.1-build - cd into
6.5.1-buildand run../qt-everywhere-src-6.5.1/configurehere, with-prefix ../6.5.1 - compile
- install
Now, if all went well I can remove
6.5.1-buildandqt-everywhere-src-6.5.1, they are not necessary anymore. And folder6.5.1contains only final, installed executables and libraries, no "garbage" from compilation.Thanks for your reply. Sadly it didn't help completely. Could the problem be that I'm calling
nmake module-qtbase? I want to build module by module to catch build errors.
Here are my directories:C:\Qt\5.15.2>ls msvc2019_64 msvc2022_64_static msvc2022_64_static-build srcAfter I called:
cd C:\Qt\5.15.2\msvc2022_64_static-build && "../src/configure" -platform win32-msvc2022 -opensource -confirm-license -release -static -static-runtime -accessibility -qt-zlib -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -prefix "../msvc2022_64_static"During configuring, I got the message:
Qt will be installed into 'C:\Qt\5.15.2\msvc2022_64_static'After that, I called:
nmake module-qtbaseBut, as the result,
C:\Qt\5.15.2\msvc2022_64_staticis empty, everything is placed inC:\Qt\5.15.2\msvc2022_64_static-build(for example, binaries are insideC:\Qt\5.15.2\msvc2022_64_static-build\qtbase\bin), though I didn't get any error during the build. - unpack Qt source code from zip / tarball to
-
Thanks for your reply. Sadly it didn't help completely. Could the problem be that I'm calling
nmake module-qtbase? I want to build module by module to catch build errors.
Here are my directories:C:\Qt\5.15.2>ls msvc2019_64 msvc2022_64_static msvc2022_64_static-build srcAfter I called:
cd C:\Qt\5.15.2\msvc2022_64_static-build && "../src/configure" -platform win32-msvc2022 -opensource -confirm-license -release -static -static-runtime -accessibility -qt-zlib -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -prefix "../msvc2022_64_static"During configuring, I got the message:
Qt will be installed into 'C:\Qt\5.15.2\msvc2022_64_static'After that, I called:
nmake module-qtbaseBut, as the result,
C:\Qt\5.15.2\msvc2022_64_staticis empty, everything is placed inC:\Qt\5.15.2\msvc2022_64_static-build(for example, binaries are insideC:\Qt\5.15.2\msvc2022_64_static-build\qtbase\bin), though I didn't get any error during the build.This is correct. Binaries are only installed after you run
nmake install. -
B bibasmall has marked this topic as solved on