diff options
author | niko.mauno@vaisala.com <niko.mauno@vaisala.com> | 2020-04-22 16:35:28 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-04-22 12:14:44 -0700 |
commit | a7d022fe542fd77bb90bd9db2d7548c26abfc2ea (patch) | |
tree | 2ec4e1db702f3c680a8913715716e0b92cc5e715 /meta-oe/recipes-connectivity/zeromq | |
parent | e8214f11130c35b20a6a01265b0f4a9f1a5fb897 (diff) | |
download | meta-openembedded-a7d022fe542fd77bb90bd9db2d7548c26abfc2ea.tar.gz |
zeromq: Fix host-specific path issue with libsodium
Avoid propagation of full build host specific path into
WORKDIR/sysroot-destdir/usr/share/cmake/ZeroMQ/ZeroMQTargets.cmake
when building the recipe as this causes following-like breakage on
sstate cache consumer hosts (with different build host specific path,
than the host that populated sstate cache)
ninja: error: '/build/host/specific/path/to/zeromq/4.3.2-r0/recipe-sysroot/usr/lib/libsodium.so', needed by 'src/FooBar', missing and no known rule to make it
Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity/zeromq')
-rw-r--r-- | meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch | 39 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch b/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch new file mode 100644 index 000000000..eb3dee4d3 --- /dev/null +++ b/meta-oe/recipes-connectivity/zeromq/files/0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From: Niko Mauno <niko.mauno@vaisala.com> | ||
2 | Date: Wed Apr 22 09:00:00 2020 +0300 | ||
3 | Subject: CMakeLists.txt: Avoid host-specific path to libsodium | ||
4 | |||
5 | Avoid propagating full build host specific path to generated | ||
6 | ZeroMQTargets.cmake when building with libsodium, which changes the | ||
7 | content in generated ZeroMQTargets.cmake files followingly: | ||
8 | |||
9 | -INTERFACE_LINK_LIBRARIES "-lpthread;/build/host/specific/path/to/zeromq/4.3.2-r0/recipe-sysroot/usr/lib/libsodium.so;-lrt" | ||
10 | +INTERFACE_LINK_LIBRARIES "-lpthread;-lsodium;-lrt" | ||
11 | |||
12 | This change mitigates an issue stemming from reuse of build artifacts | ||
13 | where the path to libsodium.so does not match exactly between two | ||
14 | different build hosts. | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> | ||
19 | |||
20 | --- a/CMakeLists.txt | ||
21 | +++ b/CMakeLists.txt | ||
22 | @@ -1210,7 +1210,7 @@ | ||
23 | target_link_libraries(libzmq ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
24 | |||
25 | if(SODIUM_FOUND) | ||
26 | - target_link_libraries(libzmq ${SODIUM_LIBRARIES}) | ||
27 | + target_link_libraries(libzmq -lsodium) | ||
28 | # On Solaris, libsodium depends on libssp | ||
29 | if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") | ||
30 | target_link_libraries(libzmq ssp) | ||
31 | @@ -1240,7 +1240,7 @@ | ||
32 | target_link_libraries(libzmq-static ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) | ||
33 | |||
34 | if(SODIUM_FOUND) | ||
35 | - target_link_libraries(libzmq-static ${SODIUM_LIBRARIES}) | ||
36 | + target_link_libraries(libzmq-static -lsodium) | ||
37 | # On Solaris, libsodium depends on libssp | ||
38 | if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") | ||
39 | target_link_libraries(libzmq-static ssp) | ||
diff --git a/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb b/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb index 49215f2cb..02a4c04fd 100644 --- a/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb +++ b/meta-oe/recipes-connectivity/zeromq/zeromq_4.3.2.bb | |||
@@ -7,6 +7,7 @@ PACKAGECONFIG ??= "libsodium" | |||
7 | PACKAGECONFIG[libsodium] = "-DWITH_LIBSODIUM=ON,-DWITH_LIBSODIUM=OFF, libsodium" | 7 | PACKAGECONFIG[libsodium] = "-DWITH_LIBSODIUM=ON,-DWITH_LIBSODIUM=OFF, libsodium" |
8 | 8 | ||
9 | SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV}.tar.gz \ | 9 | SRC_URI = "http://github.com/zeromq/libzmq/releases/download/v${PV}/zeromq-${PV}.tar.gz \ |
10 | file://0001-CMakeLists-txt-Avoid-host-specific-path-to-libsodium.patch \ | ||
10 | file://run-ptest \ | 11 | file://run-ptest \ |
11 | " | 12 | " |
12 | SRC_URI[md5sum] = "2047e917c2cc93505e2579bcba67a573" | 13 | SRC_URI[md5sum] = "2047e917c2cc93505e2579bcba67a573" |