Simple link of Qt6::Core to my libs using qtbase and FetchContent
-
@SGaist Thanks,
I will try this. But it will be nice to link qtlibrariestargets from cmake.You still can use cmake to build your project. You just have to point it to the Qt installation.
-
thanks, @Christian-Ehrlicher
For that I am using
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
I will try to explicitly set that macro.
Although is the ugliest thing i have see on c++ and do not think is the cause the linking is failing.@Mesrine
This resulted on the same warning when configuring-- Configuring done (96.9s) CMake Warning (dev) in CMakeLists.txt: AUTOGEN: No valid Qt version found for target qpow. AUTOMOC disabled. Consider adding: find_package(Qt6 COMPONENTS Core) to your CMakeLists.txt file.
and the same errors when linking for shared in mac and windows
[812/815] Linking CXX shared library lib/QtCore.framework/Versions/A/QtCore [813/815] Linking CXX shared library _deps/qcurlp81-build/libqcurlp81.dylib [814/815] Linking CXX shared library _deps/qb1t6-build/libqb1t6.dylib [815/815] Linking CXX shared library libqpow.dylib FAILED: libqpow.dylib : && /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DNDEBUG -O2 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.6 -dynamiclib -Wl,-headerpad_max_install_names -o libqpow.dylib -install_name @rpath/libqpow.dylib CMakeFiles/qpow.dir/qpow.cpp.o -F/Users/runner/work/_temp/build/lib -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qb1t6-build -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qcurlp81-build -Wl,-rpath,/Users/runner/work/_temp/build/lib _deps/qb1t6-build/libqb1t6.dylib _deps/qcurlp81-build/libqcurlp81.dylib lib/QtCore.framework/Versions/A/QtCore -framework IOKit -framework DiskArbitration && : Undefined symbols for architecture x86_64: "qiota::qpow::nonceFinder::nonce_found(unsigned long long)", referenced from: QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_0, 1, QtPrivate::List<unsigned long long>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o "qiota::qpow::nonceFinder::nonce_not_found()", referenced from: QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_1, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o "qiota::qpow::WorkerThread::found_nonce(unsigned long long)", referenced from: qiota::qpow::WorkerThread::doWork(unsigned long long const&) in qpow.cpp.o qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o "qiota::qpow::WorkerThread::staticMetaObject", referenced from: qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o "vtable for qiota::qpow::nonceFinder", referenced from: qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for qiota::qpow::WorkerThread", referenced from: qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. Error: Process completed with exit code 1.
The missing symbols are classes that inherit from QObject and its signals .
The fact that there is not linking problem on static builds for windows, mac, and for static and shared build for linux, tell me there is no symbol without definition on my code.
And the linking problem is relate with the moc produced object. -
@Mesrine
This resulted on the same warning when configuring-- Configuring done (96.9s) CMake Warning (dev) in CMakeLists.txt: AUTOGEN: No valid Qt version found for target qpow. AUTOMOC disabled. Consider adding: find_package(Qt6 COMPONENTS Core) to your CMakeLists.txt file.
and the same errors when linking for shared in mac and windows
[812/815] Linking CXX shared library lib/QtCore.framework/Versions/A/QtCore [813/815] Linking CXX shared library _deps/qcurlp81-build/libqcurlp81.dylib [814/815] Linking CXX shared library _deps/qb1t6-build/libqb1t6.dylib [815/815] Linking CXX shared library libqpow.dylib FAILED: libqpow.dylib : && /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DNDEBUG -O2 -isysroot /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.6 -dynamiclib -Wl,-headerpad_max_install_names -o libqpow.dylib -install_name @rpath/libqpow.dylib CMakeFiles/qpow.dir/qpow.cpp.o -F/Users/runner/work/_temp/build/lib -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qb1t6-build -Wl,-rpath,/Users/runner/work/_temp/build/_deps/qcurlp81-build -Wl,-rpath,/Users/runner/work/_temp/build/lib _deps/qb1t6-build/libqb1t6.dylib _deps/qcurlp81-build/libqcurlp81.dylib lib/QtCore.framework/Versions/A/QtCore -framework IOKit -framework DiskArbitration && : Undefined symbols for architecture x86_64: "qiota::qpow::nonceFinder::nonce_found(unsigned long long)", referenced from: QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_0, 1, QtPrivate::List<unsigned long long>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o "qiota::qpow::nonceFinder::nonce_not_found()", referenced from: QtPrivate::QFunctorSlotObject<qiota::qpow::nonceFinder::calculate(QByteArray const&)::$_1, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in qpow.cpp.o "qiota::qpow::WorkerThread::found_nonce(unsigned long long)", referenced from: qiota::qpow::WorkerThread::doWork(unsigned long long const&) in qpow.cpp.o qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o "qiota::qpow::WorkerThread::staticMetaObject", referenced from: qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o "vtable for qiota::qpow::nonceFinder", referenced from: qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o qiota::qpow::nonceFinder::nonceFinder() in qpow.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for qiota::qpow::WorkerThread", referenced from: qiota::qpow::nonceFinder::calculate(QByteArray const&) in qpow.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. Error: Process completed with exit code 1.
The missing symbols are classes that inherit from QObject and its signals .
The fact that there is not linking problem on static builds for windows, mac, and for static and shared build for linux, tell me there is no symbol without definition on my code.
And the linking problem is relate with the moc produced object.As suggested above, did you point cmake to your installation of Qt 6 ?
The automoc issue means that the files are not generated for your QObject based classes.
-
As suggested above, did you point cmake to your installation of Qt 6 ?
The automoc issue means that the files are not generated for your QObject based classes.
@SGaist I understand what you say, but as initially stated on my question i do not want to install Qt.
I would like to find a pakage using cmake likefind_package(Qt6 QUIET COMPONENTS Core)
If is not present on the system make it available by using
FetchContent_Declare( qtbase GIT_REPOSITORY git://code.qt.io/qt/qtbase.git GIT_TAG 6.5.0 ) FetchContent_MakeAvailable(qtbase)
This a very reasonable design of cmake packages and targets.
Ideally this will configure moc and rcc and built them at compilation time, to them use the moc executable with the QObject macros in my source code and finaly compile my library.So again my question is this can be done at the current state of qt6.5.0 or not?
If can be done do anyone have a reference? -
@SGaist I understand what you say, but as initially stated on my question i do not want to install Qt.
I would like to find a pakage using cmake likefind_package(Qt6 QUIET COMPONENTS Core)
If is not present on the system make it available by using
FetchContent_Declare( qtbase GIT_REPOSITORY git://code.qt.io/qt/qtbase.git GIT_TAG 6.5.0 ) FetchContent_MakeAvailable(qtbase)
This a very reasonable design of cmake packages and targets.
Ideally this will configure moc and rcc and built them at compilation time, to them use the moc executable with the QObject macros in my source code and finaly compile my library.So again my question is this can be done at the current state of qt6.5.0 or not?
If can be done do anyone have a reference?@Mesrine
Regarding the warning-- Configuring done (96.9s) CMake Warning (dev) in CMakeLists.txt: AUTOGEN: No valid Qt version found for target qpow. AUTOMOC disabled. Consider adding: find_package(Qt6 COMPONENTS Core)
It seems one needs to set QT_VERSION_ variables to enable autogen according to this
if set... FetchContent_MakeAvailable(qtbase) set_directory_properties(PROPERTIES Qt6Core_VERSION_MAJOR 6 Qt6Core_VERSION_MINOR 5 Qt6Core_VERSION_PATCH 0)
CMake complains like
CMake Error: AUTOMOC for target qpow: The "moc" executable "/root/build/libexec/moc" does not exist.
Cmake use the moc executable at configuration time?
But the warning also occurs on linux (where it compiles without problems). -
@Mesrine
Regarding the warning-- Configuring done (96.9s) CMake Warning (dev) in CMakeLists.txt: AUTOGEN: No valid Qt version found for target qpow. AUTOMOC disabled. Consider adding: find_package(Qt6 COMPONENTS Core)
It seems one needs to set QT_VERSION_ variables to enable autogen according to this
if set... FetchContent_MakeAvailable(qtbase) set_directory_properties(PROPERTIES Qt6Core_VERSION_MAJOR 6 Qt6Core_VERSION_MINOR 5 Qt6Core_VERSION_PATCH 0)
CMake complains like
CMake Error: AUTOMOC for target qpow: The "moc" executable "/root/build/libexec/moc" does not exist.
Cmake use the moc executable at configuration time?
But the warning also occurs on linux (where it compiles without problems).I don't know how that function builds dependencies so I can't answer that. One of the issues I see is the amount of dependencies required to build Qt itself before building your own application, the fact that you would usually use the configure script to setup the build before using cmake to start the build. And finally, does that part end up in some cache ? Otherwise it means that you will rebuild qtbase everytime your CI runs which seems like a waste of electricity and time.
-
I don't know how that function builds dependencies so I can't answer that. One of the issues I see is the amount of dependencies required to build Qt itself before building your own application, the fact that you would usually use the configure script to setup the build before using cmake to start the build. And finally, does that part end up in some cache ? Otherwise it means that you will rebuild qtbase everytime your CI runs which seems like a waste of electricity and time.
@SGaist when using the qt install action, windows and mac compiles ok, for ubuntu i get the following error when building my library and the test executable
[1/8] Automatic MOC and UIC for target qb1t6 [2/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6_autogen/mocs_compilation.cpp.o [3/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6.cpp.o [4/8] Linking CXX shared library libqb1t6.so [5/8] Automatic MOC and UIC for target tip5 [6/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o [7/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5.cpp.o [8/8] Linking CXX executable tests/tip5 FAILED: tests/tip5 : && /usr/bin/c++ -O3 -DNDEBUG tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o tests/CMakeFiles/tip5.dir/tip5.cpp.o -o tests/tip5 -Wl,-rpath,/home/runner/work/_temp/build:/home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib libqb1t6.so /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0 && : /usr/bin/ld: warning: libicui18n.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libicuuc.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libicudata.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToLower_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getStandardName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getToUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbFromUWriteUChars_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUCountPending_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_clone_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_TO_U_CALLBACK_SUBSTITUTE_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUCountPending_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_next_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setToUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_setAttribute_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToUpper_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setFromUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneDisplayName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openCountryTimeZones_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUnicode_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZones_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_inDaylightTime_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbToUWriteUChars_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZoneIDEnumeration_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_reset_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDSTSavings_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDefaultTimeZone_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUnicode_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getFromUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_setMillis_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_strcoll_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_getSortKey_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getMaxCharSize_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneTransitionDate_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_get_56' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Error: Process completed with exit code 1.
You can see the Cmakelists.txt here
Do i need to manually install those libraries for every platform?
when trying to install bysudo apt-get install ninja-build cmake build-essential libgl1-mesa-dev libicu-dev
it says:
libicu-dev is already the newest version (70.1-2).
-
@SGaist when using the qt install action, windows and mac compiles ok, for ubuntu i get the following error when building my library and the test executable
[1/8] Automatic MOC and UIC for target qb1t6 [2/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6_autogen/mocs_compilation.cpp.o [3/8] Building CXX object CMakeFiles/qb1t6.dir/qb1t6.cpp.o [4/8] Linking CXX shared library libqb1t6.so [5/8] Automatic MOC and UIC for target tip5 [6/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o [7/8] Building CXX object tests/CMakeFiles/tip5.dir/tip5.cpp.o [8/8] Linking CXX executable tests/tip5 FAILED: tests/tip5 : && /usr/bin/c++ -O3 -DNDEBUG tests/CMakeFiles/tip5.dir/tip5_autogen/mocs_compilation.cpp.o tests/CMakeFiles/tip5.dir/tip5.cpp.o -o tests/tip5 -Wl,-rpath,/home/runner/work/_temp/build:/home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib libqb1t6.so /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0 && : /usr/bin/ld: warning: libicui18n.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libicuuc.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libicudata.so.56, needed by /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0, not found (try using -rpath or -rpath-link) /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_FROM_U_CALLBACK_SUBSTITUTE_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToLower_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getStandardName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getToUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbFromUWriteUChars_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUCountPending_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_clone_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `UCNV_TO_U_CALLBACK_SUBSTITUTE_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUCountPending_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_next_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setToUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_setAttribute_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `u_strToUpper_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_setFromUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneDisplayName_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openCountryTimeZones_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_fromUnicode_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_open_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZones_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_inDaylightTime_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `uenum_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_cbToUWriteUChars_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_openTimeZoneIDEnumeration_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_reset_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDSTSavings_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getDefaultTimeZone_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_toUnicode_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getFromUCallBack_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_setMillis_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_strcoll_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_close_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucol_getSortKey_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucnv_getMaxCharSize_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_getTimeZoneTransitionDate_56' /usr/bin/ld: /home/runner/work/Qb1t6/Qt/6.5.0/gcc_64/lib/libQt6Core.so.6.5.0: undefined reference to `ucal_get_56' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Error: Process completed with exit code 1.
You can see the Cmakelists.txt here
Do i need to manually install those libraries for every platform?
when trying to install bysudo apt-get install ninja-build cmake build-essential libgl1-mesa-dev libicu-dev
it says:
libicu-dev is already the newest version (70.1-2).
-
@SGaist Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy -
@Mesrine
I was using the action like- name: Install Qt uses: jurplel/install-qt-action@v3 with: version: '6.5.0' archives: 'qtbase'
but if you change to
- name: Install Qt uses: jurplel/install-qt-action@v3 with: version: '6.5.0'
it works
I suspect that the libraries are installed along another module but I currently don't know which one.