Skip to contentSkip to conversation

libsdl2: Make libunwind dependency optional for native builds

PATCH Carlos Rafael Giani 1 participant 1 message Mar 7, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

This is another attempt at fixing/circumventing the existing libsdl problems. It adds another patch file that is on top of the existing optional-libunwind-generic.patch since this new patch file is only needed for native builds. I was able to successfully build core-image-weston with this on an Ubuntu 21.10 host.

Quoted 69 lines · Carlos Rafael Giani via lists.openembedded.org
---
  ...ependency-optional-for-native-libsdl.patch | 37 +++++++++++++++++++
  .../libsdl2/libsdl2_2.0.20.bb                 |  1 +
  2 files changed, 38 insertions(+)

create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch

meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch new file +37 -0
new file mode 100644
index 0000000000..00f3486194
@@ -0,0 +1,37 @@
+From 78078bcf00f0ad13d93b1dc525ee0a666c30f246 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani<[email protected]>
+Date: Mon, 7 Mar 2022 05:09:08 +0100
+Subject: [PATCH] Make libunwind dependency optional for native libsdl2 OE
+ build
+
+This is a workaround for this build error:
+
+| -- Checking for one of the modules 'libunwind'
+| CMake Error at [...]/build/tmp/work/x86_64-linux/libsdl2-native/2.0.20-r0/recipe-sysroot-native/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:890 (message):
+|   None of the required 'libunwind' found
+| Call Stack (most recent call first):
+|   CMakeLists.txt:1367 (pkg_search_module)
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Carlos Rafael Giani<[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 64f9fbf..eda3112 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1364,7 +1364,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS AND NOT HAIKU)
+
+       if(HAVE_LIBUNWIND_H)
+         # We've already found the header, so REQUIRE the lib to be present
+-        pkg_search_module(UNWIND REQUIRED libunwind)
++        pkg_search_module(UNWIND libunwind)
+         pkg_search_module(UNWIND_GENERIC libunwind-generic)
+         list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
+       endif()
+--
+2.32.0
+
meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb +0 -0
index 90724ab8b7..d8211165d4 100644
@@ -20,6 +20,7 @@ SRC_URI ="http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ 

file://optional-libunwind-generic.patch \ file://0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch \ " +SRC_URI:append:class-native =" file://0001-Make-libunwind-dependency-optional-for-native-libsdl.patch "

  S = "${WORKDIR}/SDL2-${PV}"

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162798):https://lists.openembedded.org/g/openembedded-core/message/162798 Mute This Topic:https://lists.openembedded.org/mt/89607589/3617253
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-