1
I'm trying to run a Qt project with CMake in an ubuntu 18.04-based docker container. When I run the cmake
and make
commands for my project, I get the following errors.
/usr/local/Qt-5.12.0/lib/libQt5Core.a(qregularexpression.o): In function `QThreadStorage<QPcreJitStackPointer*>::deleteData(void*)':
qregularexpression.cpp:(.text._ZN14QThreadStorageIP20QPcreJitStackPointerE10deleteDataEPv[_ZN14QThreadStorageIP20QPcreJitStackPointerE10deleteDataEPv]+0x12): undefined reference to `pcre2_jit_stack_free_16'
/usr/local/Qt-5.12.0/lib/libQt5Core.a(qregularexpression.o): In function `safe_pcre2_match_16(pcre2_real_code_16 const*, unsigned short const*, int, int, int, pcre2_real_match_data_16*, pcre2_real_match_context_16*)':
qregularexpression.cpp:(.text._ZL19safe_pcre2_match_16PK18pcre2_real_code_16PKtiiiP24pcre2_real_match_data_16P27pcre2_real_match_context_16+0x32): undefined reference to `pcre2_match_16'
... these undefined references keep on going...
/usr/local/Qt-5.12.0/lib/libQt5Core.a(qlibrary_unix.o): In function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text._ZN15QLibraryPrivate8load_sysEv+0x628): undefined reference to `dlopen'
collect2: error: ld returned 1 exit status
CMakeFiles/db.dir/build.make:123: recipe for target 'db' failed
make[2]: *** [db] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/db.dir/all' failed
make[1]: *** [CMakeFiles/db.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I tried changing my CMakeLists.txt file to see if it was causing the problem, adding directories and paths but it doesn't seem to be the cause. I'm trying to change LIBRARY_PATH but I have no results. Is there any other approach to fix this problem?