jansson: Honour multilib paths
PATCH 1/3 jansson: Honour multilib paths
When multilib is enabled, builds fail during package_qa:
ERROR: jansson-2.14-r0 do_package: QA Issue: jansson: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/libjansson.a
/usr/lib/pkgconfig
/usr/lib/cmake
/usr/lib/pkgconfig/jansson.pc
/usr/lib/cmake/jansson
/usr/lib/cmake/jansson/janssonTargets-noconfig.cmake
/usr/lib/cmake/jansson/janssonConfig.cmake
/usr/lib/cmake/jansson/janssonConfigVersion.cmake
/usr/lib/cmake/jansson/janssonTargets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
jansson: 10 installed and not shipped files. [installed-vs-shipped]
ERROR: jansson-2.14-r0 do_package: Fatal QA errors were found, failing task.
--- .../jansson/0001-Honour-multilib-paths.patch | 63 +++++++++++++++++++ .../recipes-extended/jansson/jansson_2.14.bb | 4 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patch
meta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patch new file +63 -0
@@ -0,0 +1,63 @@ +From e66885e66a2ce7fd916933b12d1ba523a25141e4 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <[email protected]> +Date: Mon, 3 Oct 2022 13:25:05 +0100 +Subject: [PATCH] Honour multilib paths + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <[email protected]> +--- + CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad365f78..bf297e936a72 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,8 @@ endif () + + # Set some nicer output dirs. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(JANSSON_TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp) + + # Give the debug version a different postfix for windows, +@@ -573,14 +573,14 @@ endif () + # + + # Allow the user to override installation directories. +-set(JANSSON_INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") ++set(JANSSON_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries") + set(JANSSON_INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables") + set(JANSSON_INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") + + if(WIN32 AND NOT CYGWIN) + set(DEF_INSTALL_CMAKE_DIR cmake) + else() +- set(DEF_INSTALL_CMAKE_DIR lib/cmake/jansson) ++ set(DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/jansson) + endif() + + set(JANSSON_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") +@@ -633,8 +633,8 @@ option(JANSSON_INSTALL "Generate installation target" ON) + if (JANSSON_INSTALL) + install(TARGETS jansson + EXPORT janssonTargets +- LIBRARY DESTINATION "lib" +- ARCHIVE DESTINATION "lib" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "include") + +@@ -644,7 +644,7 @@ if (JANSSON_INSTALL) + # Install the pkg-config. + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + # Install the configs. + install(FILES
meta-oe/recipes-extended/jansson/jansson_2.14.bb +3 -1
@@ -4,7 +4,9 @@ BUGTRACKER = "https://github.com/akheron/jansson/issues" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" -SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2" +SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ + file://0001-Honour-multilib-paths.patch \ + " SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" UPSTREAM_CHECK_URI = "https://github.com/akheron/${BPN}/releases"
Signature · 1 line
2.35.1
PATCH 2/3 jansson: Backport linker flag fixes
Fix overwriting linker flags.
--- .../0001-Fix-overwriting-linker-flags.patch | 29 +++++++++++++++++++ .../recipes-extended/jansson/jansson_2.14.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 meta-oe/recipes-extended/jansson/jansson/0001-Fix-overwriting-linker-flags.patch
meta-oe/recipes-extended/jansson/jansson/0001-Fix-overwriting-linker-flags.patch new file +29 -0
@@ -0,0 +1,29 @@ +From fe6e8eec7e7df4f1e72f0c9d9337b1fe11236687 Mon Sep 17 00:00:00 2001 +From: Thomas Heinrichs <[email protected]> +Date: Thu, 28 Apr 2022 17:36:54 +0200 +Subject: [PATCH] Fix overwriting linker flags + +Upstream-Status: Backport +[https://github.com/akheron/jansson/commit/fe6e8eec7e7df4f1e72f0c9d9337b1fe11236687] +Signed-off-by: Alex Kiernan <[email protected]> + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad365f78..ed33e3c47f70 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -342,7 +342,7 @@ if(JANSSON_BUILD_SHARED_LIBS) + ) + list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") + if (VSCRIPT_WORKS) +- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") ++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") + endif() + endif() + +-- +2.35.1 +
meta-oe/recipes-extended/jansson/jansson_2.14.bb +1 -0
@@ -5,6 +5,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ + file://0001-Fix-overwriting-linker-flags.patch \ file://0001-Honour-multilib-paths.patch \ " SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9"
Signature · 1 line
2.35.1
PATCH 3/3 jansson: Default to shared builds
In reply to Alex KiernanThe change to cmake changed the default to static builds (there doesn't appear to be a way to ask for both).
--- meta-oe/recipes-extended/jansson/jansson_2.14.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/jansson/jansson_2.14.bb +2 -0
@@ -15,4 +15,6 @@ UPSTREAM_CHECK_REGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)\.tar" inherit cmake pkgconfig +EXTRA_OECMAKE = "-DJANSSON_BUILD_SHARED_LIBS=${@ 'OFF' if d.getVar('DISABLE_STATIC') == '' else 'ON' }" + BBCLASSEXTEND = "native"
Signature · 1 line
2.35.1
Should it be using GNUInstallDirs cmake module I wonder
Quoted 121 lines · Alex Kiernan
When multilib is enabled, builds fail during
package_qa:ERROR: jansson-2.14-r0
do_package: QA Issue: jansson: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/libjansson.a
/usr/lib/pkgconfig
/usr/lib/cmake
/usr/lib/pkgconfig/jansson.pc
/usr/lib/cmake/jansson
/usr/lib/cmake/jansson/janssonTargets-noconfig.cmake
/usr/lib/cmake/jansson/janssonConfig.cmake
/usr/lib/cmake/jansson/janssonConfigVersion.cmake
/usr/lib/cmake/jansson/janssonTargets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them withindo_install.
jansson: 10 installed and not shipped files. [installed-vs-shipped]
ERROR: jansson-2.14-r0do_package: Fatal QA errors were found, failing task.Signed-off-by Alex Kiernan <[email protected]>--- .../jansson/0001-Honour-multilib-paths.patch | 63 +++++++++++++++++++ .../recipes-extended/jansson/jansson_2.14.bb | 4 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patchmeta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patch new file +63
-0@@ -0,0 +1,63 @@ +From e66885e66a2ce7fd916933b12d1ba523a25141e4 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <[email protected]> +Date: Mon, 3 Oct 2022 13:25:05 +0100 +Subject: [PATCH] Honour multilib paths + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <[email protected]> +--- + CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad365f78..bf297e936a72 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,8 @@ endif () + + # Set some nicer output dirs. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(JANSSON_TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp) + + # Give the debug version a different postfix for windows, +@@ -573,14 +573,14 @@ endif () + # + + # Allow the user to override installation directories. +-set(JANSSON_INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") ++set(JANSSON_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries") + set(JANSSON_INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables") + set(JANSSON_INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") + + if(WIN32 AND NOT CYGWIN) + set(DEF_INSTALL_CMAKE_DIR cmake) + else() +- set(DEF_INSTALL_CMAKE_DIR lib/cmake/jansson) ++ set(DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/jansson) + endif() + + set(JANSSON_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") +@@ -633,8 +633,8 @@ option(JANSSON_INSTALL "Generate installation target" ON) + if (JANSSON_INSTALL) + install(TARGETS jansson + EXPORT janssonTargets +- LIBRARY DESTINATION "lib" +- ARCHIVE DESTINATION "lib" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "include") + +@@ -644,7 +644,7 @@ if (JANSSON_INSTALL) + # Install the pkg-config. + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + # Install the configs. + install(FILESmeta-oe/recipes-extended/jansson/jansson_2.14.bb +3
-2@@ -4,7 +4,9 @@ BUGTRACKER = "https://github.com/akheron/jansson/issues" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" -SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2" +SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ + file://0001-Honour-multilib-paths.patch \ + " SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" UPSTREAM_CHECK_URI = "https://github.com/akheron/${BPN}/releases" --2.35.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#99040): https://lists.openembedded.org/g/openembedded-devel/message/99040
Mute This Topic: https://lists.openembedded.org/mt/94095620/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Probably, only cmake scares me every time I have to touch it :) When I was digging through all of this, I wondered if going back to autotools would be preferable and fixing up the lld case (the --default-symver test exists in CMakeLists.txt, but not configure.ac).
Quoted 125 lines · Khem Raj
Should it be using GNUInstallDirs cmake module I wonder
Quoted 121 lines · Alex Kiernan
When multilib is enabled, builds fail during
package_qa:ERROR: jansson-2.14-r0
do_package: QA Issue: jansson: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/libjansson.a
/usr/lib/pkgconfig
/usr/lib/cmake
/usr/lib/pkgconfig/jansson.pc
/usr/lib/cmake/jansson
/usr/lib/cmake/jansson/janssonTargets-noconfig.cmake
/usr/lib/cmake/jansson/janssonConfig.cmake
/usr/lib/cmake/jansson/janssonConfigVersion.cmake
/usr/lib/cmake/jansson/janssonTargets.cmake
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them withindo_install.
jansson: 10 installed and not shipped files. [installed-vs-shipped]
ERROR: jansson-2.14-r0do_package: Fatal QA errors were found, failing task.Signed-off-by Alex Kiernan <[email protected]>--- .../jansson/0001-Honour-multilib-paths.patch | 63 +++++++++++++++++++ .../recipes-extended/jansson/jansson_2.14.bb | 4 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patchmeta-oe/recipes-extended/jansson/jansson/0001-Honour-multilib-paths.patch new file +63
-0@@ -0,0 +1,63 @@ +From e66885e66a2ce7fd916933b12d1ba523a25141e4 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan <[email protected]> +Date: Mon, 3 Oct 2022 13:25:05 +0100 +Subject: [PATCH] Honour multilib paths + +Upstream-Status: Pending +Signed-off-by: Alex Kiernan <[email protected]> +--- + CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad365f78..bf297e936a72 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,8 @@ endif () + + # Set some nicer output dirs. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) + set(JANSSON_TEMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/tmp) + + # Give the debug version a different postfix for windows, +@@ -573,14 +573,14 @@ endif () + # + + # Allow the user to override installation directories. +-set(JANSSON_INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries") ++set(JANSSON_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries") + set(JANSSON_INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables") + set(JANSSON_INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") + + if(WIN32 AND NOT CYGWIN) + set(DEF_INSTALL_CMAKE_DIR cmake) + else() +- set(DEF_INSTALL_CMAKE_DIR lib/cmake/jansson) ++ set(DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/jansson) + endif() + + set(JANSSON_INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") +@@ -633,8 +633,8 @@ option(JANSSON_INSTALL "Generate installation target" ON) + if (JANSSON_INSTALL) + install(TARGETS jansson + EXPORT janssonTargets +- LIBRARY DESTINATION "lib" +- ARCHIVE DESTINATION "lib" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "bin" + INCLUDES DESTINATION "include") + +@@ -644,7 +644,7 @@ if (JANSSON_INSTALL) + # Install the pkg-config. + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc +- DESTINATION lib/pkgconfig) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + + # Install the configs. + install(FILESmeta-oe/recipes-extended/jansson/jansson_2.14.bb +3
-2@@ -4,7 +4,9 @@ BUGTRACKER = "https://github.com/akheron/jansson/issues" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=afd92c4cfc08f4896003251b878cc0bf" -SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2" +SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ + file://0001-Honour-multilib-paths.patch \ + " SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" UPSTREAM_CHECK_URI = "https://github.com/akheron/${BPN}/releases" --2.35.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#99040): https://lists.openembedded.org/g/openembedded-devel/message/99040
Mute This Topic: https://lists.openembedded.org/mt/94095620/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 1 line
Alex Kiernan