| Summary: | meson having hard time finding cmake dependencies | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Toni Lammi <toni.lammi> |
| Component: | devtools / tool chain | Assignee: | Toni Lammi <toni.lammi> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, randy.macleod, ross.burton |
| Version: | 5.0.8 | ||
| Target Milestone: | 6.1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Toni Lammi
2025-05-22 06:20:55 UTC
Inheriting both cmake and meson in the same recipe seems a little heavy-handed. I wonder how minimal a cmake toolchain file needs to be, considering it's only used for finding the module scripts? Looked into this a bit more. All the cmake dependencies I've been having bad time with have a dependency to openssl which depends on threads. The build config fails when cmake's threads module tries to check if the compiler compiler supports -pthread flag. The build can be fixed by simply adding ``` set( CMAKE_CXX_COMPILER some-prefix-g++) ``` to the toolchain file. A similar setting is probably needed for C if the project uses that. Meson sets the same variable in its internal cmake toolchain but the value is an absolute path to the compiler. No idea who is at fault here: meson, cmake or FindOpenSSL.cmake. You'd think an absolute path would be fine... This enhancement is apparently not implemented so bump to 6.1. |