aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-18 09:26:38 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-18 09:35:23 -0700
commitaef9af7697671d68632740342f22efa674d73405 (patch)
tree5223a8516339003823d5be27e6afebc2ca462bcb /meta-oe/recipes-extended
parentfa9f26ee02e26280b30aac8bdf018af2f2630b6a (diff)
downloadmeta-openembedded-aef9af7697671d68632740342f22efa674d73405.tar.gz
minifi-cpp: Fix linking with libxml2
when libxml2-native is staged, then on x86 it starts to detect that for target and fail to build Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/minifi-cpp/files/0001-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch39
-rw-r--r--meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb3
2 files changed, 41 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch b/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
new file mode 100644
index 0000000000..d813b37f99
--- /dev/null
+++ b/meta-oe/recipes-extended/minifi-cpp/files/0001-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch
@@ -0,0 +1,39 @@
+From 609e1745d26d6f42d426018a4dd8d2342d6fc170 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 18 Aug 2020 08:37:57 -0700
+Subject: [PATCH] Add -lxml2 to linker cmdline of xml is found
+
+When cross compiling for systems where static libs
+for libxml are not available cmake's detection mechanism
+resort to linking with libxml.so but doesnt use -lxml2
+liblldbHost.a however requires libxml on linker
+cmdline _after_ itself so its use of symbols from libxml2
+can be resolved. Here check for libxml2 being detected and
+add it if its found.
+
+Fixes
+minifi-cpp/0.7.0-r0/recipe-sysroot-native/usr/lib/libxml2.so is incompatible with elf32-i386
+| clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ thirdparty/libarchive-3.3.2/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/thirdparty/libarchive-3.3.2/CMakeLists.txt b/thirdparty/libarchive-3.3.2/CMakeLists.txt
+index 0c1ea6f7..cde0cc51 100644
+--- a/thirdparty/libarchive-3.3.2/CMakeLists.txt
++++ b/thirdparty/libarchive-3.3.2/CMakeLists.txt
+@@ -1031,7 +1031,7 @@ ENDIF()
+ IF(LIBXML2_FOUND)
+ CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
+ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
+- LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES})
++ LIST(APPEND ADDITIONAL_LIBS xml2)
+ SET(HAVE_LIBXML2 1)
+ # libxml2's include files use iconv.h
+ SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
+--
+2.28.0
+
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index 92baa98314..37036ebbb4 100644
--- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -7,7 +7,7 @@ SECTION = "console/network"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9534eb5f4ab800b573a37bffc62f3a7"
-DEPENDS = "virtual/crypt expat flex python3 bison-native"
+DEPENDS = "virtual/crypt expat flex python3 bison-native libxml2"
RDEPENDS_${PN} = "python3-core"
SRCREV = "aa42957a2e227df41510047cece3cd606dc1cb6a"
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \
file://fix-osspuuid-musl-compile.patch \
file://fix-rocksdb-cross-compile.patch \
file://remove_const_due_to_std_lock_guard.patch \
+ file://0001-Add-lxml2-to-linker-cmdline-of-xml-is-found.patch \
file://minifi.service \
file://systemd-volatile.conf \
file://sysvinit-volatile.conf \