| Summary: |
Host tool contamination in cmake-native (libcurl cmake files) |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Bernhard Rosenkränzer <bero> |
| Component: |
devtools / tool chain | Assignee: |
Richard Purdie <richard.purdie> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
High
|
CC: |
meta.mr.watcher, meta.watcher, randy.macleod, tim.orling
|
| Version: |
5.99 | |
|
| Target Milestone: |
4.2 M1 | |
|
| Hardware: |
All | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
No (bug/feature does not impact docs)
|
| Attachments: |
| Description |
Flags |
|
Patch
|
bero:
commit?, bero:
copyright-waived+, bero:
review?
|
|
Trying to build cmake-native on a host system where curl was built with cmake (resulting in CURLConfig.cmake and friends, which do not use the same naming schemes expected by cmake-native's build process, being installed to a system wide cmake directory like /usr/lib64/cmake/CURL) results in undefined references to all libcurl symbols. The problem is that cmake-native sees and uses the system wide /usr/lib64/cmake/CURL/CURLConfig.cmake, which defines CURL::libcurl and CURL::curl as opposed to setting ${CURL_LIBRARIES} as expected by cmake-native. find_package(CURL) (cmake-native's CMakeLists.txt, line 478) succeeds, but incorrectly uses the system wide CURLConfig.cmake, resulting CMAKE_CURL_LIBRARIES to be set to an empty string (cmake-native's CMakeLists.txt, line 484), causing the cmake-native build to miss -lcurl. find_package(CURL) in the context should prefer Modules/FindCURL.cmake (in cmake-native's source) over a system CURLConfig.cmake. As expected, the obvious workaround (removing the host curl's cmake files) works.