meet a problem when attempting to promote imported target "Threads::Threads" to global scope
-
I ran into a problem when cross-building Qt 6.4.2 from source by following Cross-Compile_Qt_6_for_Raspberry_Pi.
the cmake produced the following output.
CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:257 (set_property): Attempt to promote imported target "Threads::Threads" to global scope (by setting IMPORTED_GLOBAL) which is not built in this directory. Call Stack (most recent call first): qtbase/cmake/QtFindPackageHelpers.cmake:180 (__qt_internal_promote_target_to_global) qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package) -
Can you try with a more recent version of Qt ?
While I understand the motivation of staying on certain version, these kind of issue might have already been solved later. -
I got sysroot from latest RPi OS image.
In the sysroot, the file /usr/lib/aarch64-linux-gnu/cmake/zstd/zstdConfig.cmake has the following code,
include(CMakeFindDependencyMacro) if(ON AND "1") find_dependency(Threads) endif() include("${CMAKE_CURRENT_LIST_DIR}/zstdTargets.cmake") check_required_components("zstd") -
Hi,
Might be a silly question but did you properly use two separate build folders ?
Also why Qt 6.4.2 rather than a current version ? -
Hi,
Might be a silly question but did you properly use two separate build folders ?
Also why Qt 6.4.2 rather than a current version ? -
You did not answer about the use of an outdated version of Qt.
-
Can you try with a more recent version of Qt ?
While I understand the motivation of staying on certain version, these kind of issue might have already been solved later. -
N novum has marked this topic as solved
-
Excellent !
Good luck :-)