Skip to contentSkip to conversation

czmq: Fix install conflict when enable multilib.

PATCH New [email protected] 1 participant 2 messages Feb 2, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 czmq: Fix install conflict when enable multilib.

From: Wang Mingyu <[email protected]>

Error: Transaction test error:
file /usr/share/cmake/czmq/czmqConfigVersion.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57 file /usr/share/cmake/czmq/czmqTargets-release.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57 file /usr/share/cmake/czmq/czmqTargets.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57

The differences of czmqConfigVersion.cmake are as follows:
@@ -31,13 +31,13 @@

 # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
   return()
 endif()
 # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4")
-  math(EXPR installedBits "4 * 8")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
+  math(EXPR installedBits "8 * 8")
   set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
   set(PACKAGE_VERSION_UNSUITABLE TRUE)
 endif()

The differences of czmqTargets-release.cmake are as follows:
@@ -8,22 +8,22 @@
# Import target "czmq" for configuration "Release" set_property(TARGET czmq APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_target_properties(czmq PROPERTIES
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libczmq.so.4.2.1"
+ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib64/libczmq.so.4.2.1" IMPORTED_SONAME_RELEASE "libczmq.so.4"
)

list(APPEND _cmake_import_check_targets czmq )
-list(APPEND _cmake_import_check_files_for_czmq "${_IMPORT_PREFIX}/lib/libczmq.so.4.2.1" ) +list(APPEND _cmake_import_check_files_for_czmq "${_IMPORT_PREFIX}/lib64/libczmq.so.4.2.1" )

# Import target "czmq-static" for configuration "Release" set_property(TARGET czmq-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_target_properties(czmq-static PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
- IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libczmq.a"
+ IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib64/libczmq.a"
)

list(APPEND _cmake_import_check_targets czmq-static )
-list(APPEND _cmake_import_check_files_for_czmq-static "${_IMPORT_PREFIX}/lib/libczmq.a" ) +list(APPEND _cmake_import_check_files_for_czmq-static "${_IMPORT_PREFIX}/lib64/libczmq.a" )

The differences of czmqTargets.cmake are as follows:
@@ -60,7 +60,7 @@

set_target_properties(czmq PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libcurl.so"
+ INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libcurl.so"
)

# Create imported target czmq-static
@@ -69,7 +69,7 @@
set_target_properties(czmq-static PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CZMQ_STATIC"
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
- INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libcurl.so"
+ INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libcurl.so"
)

---
 meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb +5 -1
index ce9d758d9..32be9cd09 100644
@@ -15,9 +15,13 @@ inherit cmake pkgconfig
 
 PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-staticdev ${PN} ${PN}-dbg"
 
+EXTRA_OECMAKE = " \
+    -DCMAKECONFIG_INSTALL_DIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/') + "/cmake/"} \
+"
+
 FILES:${PN} = "${bindir}/*"
 FILES:lib${BPN} = "${libdir}/*.so.*"
-FILES:lib${BPN}-dev = "${libdir}/*.so ${libdir}/pkgconfig ${includedir} ${datadir}/cmake"
+FILES:lib${BPN}-dev = "${libdir}/*.so ${libdir}/pkgconfig ${includedir} ${libdir}/cmake"
 FILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
 
 RDEPENDS:lib${BPN}-dev = "zeromq-dev"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 czmq: Fix buildpaths warning.

From: Wang Mingyu <[email protected]>

WARNING: czmq-4.2.1-r0 do_package_qa: QA Issue: File /usr/lib64/cmake/czmqTargets.cmake in package libczmq-dev contains reference to TMPDIR [buildpaths]

---
 meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-connectivity/zeromq/czmq_4.2.1.bb +1 -0
index 32be9cd09..5ae72df86 100644
@@ -37,4 +37,5 @@ PACKAGECONFIG[uuid] = "-DCZMQ_WITH_UUID=ON,-DCZMQ_WITH_UUID=OFF,util-linux"
 do_install:append() {
         mkdir -p ${D}/${includedir}/${BPN}
         mv ${D}/${includedir}/sha1.h ${D}/${includedir}/${BPN}/.
+        sed -i -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/czmqTargets.cmake
 }
Signature · 1 line
2.34.1