[QT LTS 6.5.2] - Cmake build does not install include files into prefix path
-
Hey folks,
since ever I'm compiling my QT LTS versions from Source and installing with help of
--prefix
. My software is using those installed libraries and includes during compilation, linking and run. I only use theQtBase
package as this is absolutely enough for my case.Now comes my problem, I'm trying to compile the latest QT LTS 6.5.2, all fine no issue with that. Also the installation succeeded but it misses all include files.
Here are the steps I do for years:
- Downloading the QtBase package
$ wget http://download.qt.io/archive/qt/6.5/6.5.2/submodules/qtbase-everywhere-src-6.5.2.tar.xz
- Call configure after extracting the tarball as followed
$ ./configure -platform linux-g++-64 -prefix /services/lib/qt_6.5.2-0 -release -no-opengl -nomake tests -nomake examples -confirm-license -opensource
- Compile the QtBase Sources
$ cmake --build . --parallel
- And finally install it in my defined target folder /services/lib/qt_6.5.2-0
cmake --install .
If I now check the installed data I'm missing all include files. As an example take the
QString
class which requires theqstring.h
. In the--prefix
path you do not find it:$ ls qt_6.5.2-0/include/QtCore/QString qt_6.5.2-0/include/QtCore/QString
$ cat qt_6.5.2-0/include/QtCore/QString #include "qstring.h"
$ ls qt_6.5.2-0/include/QtCore/*.h qt_6.5.2-0/include/QtCore/qtcoreversion.h
The include file exists in source folder but was not installed into defined
--prefix
path.find qtbase-everywhere-src-6.5.2/ -name qstring.h qtbase-everywhere-src-6.5.2/src/corelib/text/qstring.h qtbase-everywhere-src-6.5.2/include/QtCore/qstring.h
This issue exists for all other classes as well. Did I missed something? Any ideas welcome.
Thanks in advance
Sven -
Hi and welcome to devnet,
It might be related to the fact that you are doing an in source build. At the very least you should create a build folder and call configure from within it. I usually do a completely out of source build so I am sure I don't have any stray file that might wreak havoc in there.
-
Hello and good morning @SGaist,
thanks for your feedback. I tried your proposal and build the QT Sources from a seperate build folder. It's the very same picture: Configuring and build no issue, the installation succeed into my defined
-prefix
path, but still not as expected. The include files are not released into target folder.$ find /services/lib/qt_6.5.2-0/ -name qstring.h !!! NO RESULT
I repeated the same steps with QT LTS 6.2.4, did not observed a problem. All as expected and complete. The include files are all present in target folder:
$ find /services/lib/qt_6.2.4-0/ -name qstring.h /services/lib/qt_6.2.4/include/QtCore/qstring.h
The difference is clearly visible with simple counting
QT 6.5$ find /services/lib/qt_6.5.2-0/ -name *.h | wc -l 901
vs. QT 6.2
$ find /services/lib/qt_6.2.4-0/ -name *.h | wc -l 2006
-
Hello and good morning @SGaist,
thanks for your feedback. I tried your proposal and build the QT Sources from a seperate build folder. It's the very same picture: Configuring and build no issue, the installation succeed into my defined
-prefix
path, but still not as expected. The include files are not released into target folder.$ find /services/lib/qt_6.5.2-0/ -name qstring.h !!! NO RESULT
I repeated the same steps with QT LTS 6.2.4, did not observed a problem. All as expected and complete. The include files are all present in target folder:
$ find /services/lib/qt_6.2.4-0/ -name qstring.h /services/lib/qt_6.2.4/include/QtCore/qstring.h
The difference is clearly visible with simple counting
QT 6.5$ find /services/lib/qt_6.5.2-0/ -name *.h | wc -l 901
vs. QT 6.2
$ find /services/lib/qt_6.2.4-0/ -name *.h | wc -l 2006
You may have found a bug then :-)
Did you already check the bug report system ? -
As proposed, I've created a bug ticket
https://bugreports.qt.io/browse/QTBUG-116137Thanks for the support.
-