summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorJaeyoon Jung <jaeyoon.jung@lge.com>2025-01-16 20:57:55 +0900
committerKhem Raj <raj.khem@gmail.com>2025-01-16 14:56:27 -0800
commita519f89ea7624d5051f2257cf0f5f33aee14ede1 (patch)
tree39ffdd11a51e51c4c44711424cbffb2791eb803a /meta-oe/recipes-extended
parent402e49afd19da6dcb947af075d7ad45797f5bcb2 (diff)
downloadmeta-openembedded-a519f89ea7624d5051f2257cf0f5f33aee14ede1.tar.gz
jansson: fix a symbol clash when building with cmake
It exports all symbols globally which results in a symbol clash, for example "hashtable_del" of ulogd2. It has been revealed because the recipe inherits cmake over autotools since Langdale. This fixes it by specifying visibility scope of symbols in its version script which matches what is given with the libtool flag '-export-symbols-regex' in Makefile.am. Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/jansson/jansson/0001-Only-export-symbols-starting-with-json_-and-jansson_.patch30
-rw-r--r--meta-oe/recipes-extended/jansson/jansson_2.14.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/jansson/jansson/0001-Only-export-symbols-starting-with-json_-and-jansson_.patch b/meta-oe/recipes-extended/jansson/jansson/0001-Only-export-symbols-starting-with-json_-and-jansson_.patch
new file mode 100644
index 0000000000..30b30b8850
--- /dev/null
+++ b/meta-oe/recipes-extended/jansson/jansson/0001-Only-export-symbols-starting-with-json_-and-jansson_.patch
@@ -0,0 +1,30 @@
1From e5c38614fb7e0bdbcaec6db6133fa62cfed62818 Mon Sep 17 00:00:00 2001
2From: Jaeyoon Jung <jaeyoon.jung@lge.com>
3Date: Wed, 15 Jan 2025 22:11:54 +0900
4Subject: [PATCH] Only export symbols starting with "json_" and "jansson_" for
5 cmake
6
7It's already done by the commit 7c707a7 and bcb6b6f, but not for cmake.
8This makes symbols in the same visibility as built with libtool.
9
10Upstream-Status: Submitted [https://github.com/akheron/jansson/pull/704]
11Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
12---
13
14 CMakeLists.txt | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/CMakeLists.txt b/CMakeLists.txt
18index 3394236..52b9934 100644
19--- a/CMakeLists.txt
20+++ b/CMakeLists.txt
21@@ -325,6 +325,9 @@ if(JANSSON_BUILD_SHARED_LIBS)
22 # some linkers may only support --version-script
23 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/jansson.sym" "JANSSON_${JANSSON_SOVERSION} {
24 global:
25+ json_*;
26+ jansson_*;
27+ local:
28 *;
29 };
30 ")
diff --git a/meta-oe/recipes-extended/jansson/jansson_2.14.bb b/meta-oe/recipes-extended/jansson/jansson_2.14.bb
index 9f5cdcf4c0..4ac30c4dba 100644
--- a/meta-oe/recipes-extended/jansson/jansson_2.14.bb
+++ b/meta-oe/recipes-extended/jansson/jansson_2.14.bb
@@ -8,6 +8,7 @@ SRC_URI = "https://github.com/akheron/${BPN}/releases/download/v${PV}/${BP}.tar.
8 file://0001-Fix-overwriting-linker-flags.patch \ 8 file://0001-Fix-overwriting-linker-flags.patch \
9 file://0001-Honour-multilib-paths.patch \ 9 file://0001-Honour-multilib-paths.patch \
10 file://0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch \ 10 file://0001-add-back-JSON_INTEGER_IS_LONG_LONG-for-cmake.patch \
11 file://0001-Only-export-symbols-starting-with-json_-and-jansson_.patch \
11 " 12 "
12SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9" 13SRC_URI[sha256sum] = "fba956f27c6ae56ce6dfd52fbf9d20254aad42821f74fa52f83957625294afb9"
13 14