| Summary: |
Meson >= 59.0 fails to find Threads dependency using CMake |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Toni Lammi <toni.lammi> |
| Component: |
devtools / tool chain | Assignee: |
Unassigned <unassigned> |
| Status: |
RESOLVED
INVALID
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Undecided
|
CC: |
meta.mr.watcher, meta.watcher, randy.macleod
|
| Version: |
4.0.2 | |
|
| Target Milestone: |
--- | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
Meson fails when searching for Threads dependency using cmake: dependency('Threads', method: 'cmake', modules: ['Threads::Threads']) This issue was likely caused by an update to how Meson manages CMake dependencies: https://github.com/mesonbuild/meson/pull/8812 See also issue in meson: https://github.com/mesonbuild/meson/issues/10384 The issue only occurs with meson >= 59.0 I studied this issue a bit and found a couple workarounds for this in Yocto: First one is to modify cmake_toolchain_file in SDK's meson.cross from cmake_toolchain_file='<sdkpath>/usr/share/cmake/OEToolchainConfig.cmake' to cmake_toolchain_file='<sdkpath>/usr/share/cmake/cortexa53-crypto-<distro>-toolchain.cmake' Another one is to modify OEToolchainConfig.cmake from file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" ) to file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_DIR}/*toolchain.cmake" ) To me it looks like the SDK's configuration is a bit off and meson therefore fails to get the correct information from the environment. I'm wondering if this behavior is a bug or if I'm doing something wrong here.