diff options
| author | Bernhard Rosenkränzer <bero@baylibre.com> | 2022-10-27 20:58:54 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-09 17:42:08 +0000 |
| commit | 994831eac1ab925da85914a10221ac63a79a4028 (patch) | |
| tree | d98957af04d3081fec2c02334ea7963279e799d8 /meta/recipes-devtools | |
| parent | 75be860f340504d4368a9f59259bc8d6685735de (diff) | |
| download | poky-994831eac1ab925da85914a10221ac63a79a4028.tar.gz | |
cmake-native: Fix host tool contamination (Bug: 14951)
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.
The simplest fix is to let cmake know the right value for
CURL_LIBRARIES. Making it -lcurl should always work with libcurl-native
in recipe-sysroot-native.
(From OE-Core rev: 0896d76a167dc9a64d69717ba66f12e7e1c41a77)
Signed-off-by: Bernhard Rosenkränzer <bero@baylibre.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/cmake/cmake-native_3.22.3.bb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.22.3.bb b/meta/recipes-devtools/cmake/cmake-native_3.22.3.bb index ee1f7761c4..45ea78ae00 100644 --- a/meta/recipes-devtools/cmake/cmake-native_3.22.3.bb +++ b/meta/recipes-devtools/cmake/cmake-native_3.22.3.bb | |||
| @@ -32,6 +32,7 @@ CMAKE_EXTRACONF = "\ | |||
| 32 | -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \ | 32 | -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \ |
| 33 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ | 33 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ |
| 34 | -DHAVE_SYS_ACL_H=0 \ | 34 | -DHAVE_SYS_ACL_H=0 \ |
| 35 | -DCURL_LIBRARIES=-lcurl \ | ||
| 35 | " | 36 | " |
| 36 | 37 | ||
| 37 | do_configure () { | 38 | do_configure () { |
