Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
Static build of Qt 5.12.3 - errors when building against it
I want to build a static version of my program, and so am trying to build a static version of Qt. I have a CentOS 7 machine, and I've downloaded the Qt source, built it using the following command (although I've also tried many other options, and none have an effect)
./configure -opensource -confirm-license -recheck-all -silent -static -prefix /Qt/static/5.12.3 -release -nomake tests -nomake examples -skip qtwebengine -sql-mysql -qt-libjpeg -qt-libpng
Qt builds and installs without error. When I build my program against the static build of Qt, using QtCreator, I get warnings and errors
warning: libicui18n.so.56, needed by //Qt/5.12.3/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link) warning: libicuuc.so.56, needed by //Qt/5.12.3/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link) warning: libicudata.so.56, needed by //Qt/5.12.3/gcc_64/lib/libQt5Core.so.5, not found (try using -rpath or -rpath-link) /Qt/5.12.3/gcc_64/lib/libQt5Core.so.5:-1: error: undefined reference to 'u_strToLower_56' /Qt/5.12.3/gcc_64/lib/libQt5Core.so.5:-1: error: undefined reference to 'ucnv_getStandardName_56' ... 30 more errors ...
I've read some bug reports about Qt static builds not working with ICU, but I can't replicate their work-arounds.
You should share the bug report you read.
The warning you get does not seem to come from your static build but from another one. See:
On a side note, installing your build in '/Qt/static' is rather a bad idea. You are messing with the standard file system layout.
I'm looking for the bug report now, but I can't find it.
So, where does the error come from? QtCreator does seem to be linking to a dynamic version of Qt. That path is part of the Qt installation, but the static QtVersion/Kit points to the one that I built.
Check your Qt versions and your Kits to ensure they are properly configured.
And also check your project to ensure the right kit is in use.
Here's the bug report that most closely matched my issue: https://bugreports.qt.io/browse/QTBUG-53865
The first thing you should do is check that your static build is installed properly. From the build output your are not using the Qt version you built yourself.
@SGaist That sounds good. How would I check to see if the static build is installed properly? gmake install ran without problem, and Qt Creator seems to recnognize everything from the /Qt/static/5.13.2/qmake path.
You can try to build your project from a console/terminal.