Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0
-
None
-
85b30fda7ceccecfd3938703979b3431bdedc9a2
Description
I want to link statically the Qt dependencies of my Qt build. Therefore i build icu statically and provided the -icu configuration flag. Using icu as a shared lib runs fine, but in the static case the Qt build configuration fails with the following message:
ERROR: Feature 'icu' was enabled, but the pre-condition 'libs.icu' failed.
I looked up the specific configuration test location in qt5/qtbase/config.tests/unix/icu. Running the already correctly configured make shows the following errors:
/home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dl_open_57: error: undefined reference to 'dlopen' /home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dl_close_57: error: undefined reference to 'dlclose' /home/myUser/.conan/data/icu/57.1/annulen/stable/package/4cc931e24e37948d83aaaf638aeca02991ff6d08/lib/libicuuc.a(putil.ao):putil.cpp:function uprv_dlsym_func_57: error: undefined reference to 'dlsym' collect2: Fehler: ld gab 1 als Ende-Status zurück
I searched for the missing symbol problem and found this stack overflow post:
http://stackoverflow.com/questions/956640/linux-c-error-undefined-reference-to-dlopen
Using the additional -ldl flag for the LIBS in the preconfigured makefile seems to fix the problem and the build process exits without any warning or error.
So my specific questions are:
- Is Qt able to handle static icu linking into the Qt lib?
- Is only the config test broken by the missing -ldl flag for the static case?
- What should i do to be able to statically link every Qt dependency into the Qt itself?