All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
       [not found] <16DA0ACF872045DF.28939@lists.openembedded.org>
@ 2022-03-07  8:10 ` Carlos Rafael Giani
  0 siblings, 0 replies; 7+ messages in thread
From: Carlos Rafael Giani @ 2022-03-07  8:10 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3708 bytes --]

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.

On 07.03.22 09:07, Carlos Rafael Giani via lists.openembedded.org wrote:
> Signed-off-by: Carlos Rafael Giani<crg7475@mailbox.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
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> new file mode 100644
> index 0000000000..00f3486194
> --- /dev/null
> +++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> @@ -0,0 +1,37 @@
> +From 78078bcf00f0ad13d93b1dc525ee0a666c30f246 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani<crg7475@mailbox.org>
> +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<crg7475@mailbox.org>
> +---
> + 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
> +
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> index 90724ab8b7..d8211165d4 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> @@ -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:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [crg7475@mailbox.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>

[-- Attachment #2: Type: text/html, Size: 5194 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
  2022-03-18 11:35         ` Richard Purdie
@ 2022-03-18 20:10           ` Carlos Rafael Giani
  0 siblings, 0 replies; 7+ messages in thread
From: Carlos Rafael Giani @ 2022-03-18 20:10 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]

I can't do (a) at the moment since I do not have CentOS set up here. As 
for (b), I think that if disabling libunwind in the libsdl2-native build 
only, the impact is minimized, since libsdl2-native is used only for 
other native tools like QEMU.

On 18.03.22 12:35, Richard Purdie wrote:
> On Fri, 2022-03-18 at 12:08 +0100, Carlos Rafael Giani via
> lists.openembedded.org wrote:
>> I am preparing a patch for this. I am somewhat uncertain though if this is
>> considered an OK approach or a hack, since we could in theory add libunwind-
>> native as a libsdl2-native dependency, but libunwind-native itself has build
>> issues, as seen here:
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/91/builds/5624/steps/12/logs/stdio
>> To me, it seems that the "clean" solution would be to fix libunwind-native
>> then. But that may take longer (just guessing here, I have no idea about
>> libunwind).
>> Thoughts?
> The key questions are:
>
> a) Can we fix unwind-native to work on centos7 where it breaks? If so, that is
> the best solution.
>
> b) What functionality do we lose if we disable unwind in libsdl? Is it minor
> debugging info or something we really do need?
>
> I'm afraid I don't know the answers to those questions so it makes the correct
> course of action hard to see.
>
> Cheers,
>
> Richard
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#163447):https://lists.openembedded.org/g/openembedded-core/message/163447
> Mute This Topic:https://lists.openembedded.org/mt/89607589/3617253
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [crg7475@mailbox.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>

[-- Attachment #2: Type: text/html, Size: 3063 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
  2022-03-18 11:08       ` Carlos Rafael Giani
@ 2022-03-18 11:35         ` Richard Purdie
  2022-03-18 20:10           ` Carlos Rafael Giani
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2022-03-18 11:35 UTC (permalink / raw)
  To: crg7475, openembedded-core

On Fri, 2022-03-18 at 12:08 +0100, Carlos Rafael Giani via
lists.openembedded.org wrote:
> I am preparing a patch for this. I am somewhat uncertain though if this is
> considered an OK approach or a hack, since we could in theory add libunwind-
> native as a libsdl2-native dependency, but libunwind-native itself has build
> issues, as seen here:
> https://autobuilder.yoctoproject.org/typhoon/#/builders/91/builds/5624/steps/12/logs/stdio
> To me, it seems that the "clean" solution would be to fix libunwind-native
> then. But that may take longer (just guessing here, I have no idea about
> libunwind).
> Thoughts?

The key questions are:

a) Can we fix unwind-native to work on centos7 where it breaks? If so, that is
the best solution.

b) What functionality do we lose if we disable unwind in libsdl? Is it minor
debugging info or something we really do need?

I'm afraid I don't know the answers to those questions so it makes the correct
course of action hard to see.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
  2022-03-07 22:39     ` Richard Purdie
@ 2022-03-18 11:08       ` Carlos Rafael Giani
  2022-03-18 11:35         ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Carlos Rafael Giani @ 2022-03-18 11:08 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

I am preparing a patch for this. I am somewhat uncertain though if this 
is considered an OK approach or a hack, since we could in theory add 
libunwind-native as a libsdl2-native dependency, but libunwind-native 
itself has build issues, as seen here:

https://autobuilder.yoctoproject.org/typhoon/#/builders/91/builds/5624/steps/12/logs/stdio

To me, it seems that the "clean" solution would be to fix 
libunwind-native then. But that may take longer (just guessing here, I 
have no idea about libunwind).

Thoughts?

On 07.03.22 23:39, Richard Purdie wrote:
> On Mon, 2022-03-07 at 10:31 +0100, Alexander Kanavin wrote:
>> Also, is this going to cause non-deterministic builds?
> Yes, it would break if sstate is reused from a system with to a system without
> libunwind.
>
> Can we just disable libunwind for native?
>
> Cheers,
>
> Richard
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#162869):https://lists.openembedded.org/g/openembedded-core/message/162869
> Mute This Topic:https://lists.openembedded.org/mt/89607589/3617253
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [crg7475@mailbox.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>

[-- Attachment #2: Type: text/html, Size: 2781 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
  2022-03-07  9:31   ` Alexander Kanavin
@ 2022-03-07 22:39     ` Richard Purdie
  2022-03-18 11:08       ` Carlos Rafael Giani
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2022-03-07 22:39 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Carlos Rafael Giani, OE-core

On Mon, 2022-03-07 at 10:31 +0100, Alexander Kanavin wrote:
> Also, is this going to cause non-deterministic builds?

Yes, it would break if sstate is reused from a system with to a system without
libunwind.

Can we just disable libunwind for native?

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
       [not found] ` <16DA0F4A680FB7A0.15718@lists.openembedded.org>
@ 2022-03-07  9:31   ` Alexander Kanavin
  2022-03-07 22:39     ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2022-03-07  9:31 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Carlos Rafael Giani, OE-core

Also, is this going to cause non-deterministic builds?

Alex

On Mon, 7 Mar 2022 at 10:30, Alexander Kanavin via
lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org>
wrote:
>
> This needs to be better explained, particularly why the patch is
> inappropriate for upstream submission.
>
> Alex
>
> On Mon, 7 Mar 2022 at 09:08, Carlos Rafael Giani via
> lists.openembedded.org <crg7475=mailbox.org@lists.openembedded.org>
> wrote:
> >
> > Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.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
> >
> > diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> > new file mode 100644
> > index 0000000000..00f3486194
> > --- /dev/null
> > +++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> > @@ -0,0 +1,37 @@
> > +From 78078bcf00f0ad13d93b1dc525ee0a666c30f246 Mon Sep 17 00:00:00 2001
> > +From: Carlos Rafael Giani <crg7475@mailbox.org>
> > +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 <crg7475@mailbox.org>
> > +---
> > + 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
> > +
> > diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> > index 90724ab8b7..d8211165d4 100644
> > --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> > +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> > @@ -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}"
> >
> > --
> > 2.32.0
> >
> >
> >
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#162801): https://lists.openembedded.org/g/openembedded-core/message/162801
> Mute This Topic: https://lists.openembedded.org/mt/89607589/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds
  2022-03-07  8:07 Carlos Rafael Giani
@ 2022-03-07  9:30 ` Alexander Kanavin
       [not found] ` <16DA0F4A680FB7A0.15718@lists.openembedded.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Kanavin @ 2022-03-07  9:30 UTC (permalink / raw)
  To: Carlos Rafael Giani; +Cc: OE-core

This needs to be better explained, particularly why the patch is
inappropriate for upstream submission.

Alex

On Mon, 7 Mar 2022 at 09:08, Carlos Rafael Giani via
lists.openembedded.org <crg7475=mailbox.org@lists.openembedded.org>
wrote:
>
> Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.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
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> new file mode 100644
> index 0000000000..00f3486194
> --- /dev/null
> +++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-Make-libunwind-dependency-optional-for-native-libsdl.patch
> @@ -0,0 +1,37 @@
> +From 78078bcf00f0ad13d93b1dc525ee0a666c30f246 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <crg7475@mailbox.org>
> +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 <crg7475@mailbox.org>
> +---
> + 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
> +
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> index 90724ab8b7..d8211165d4 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.20.bb
> @@ -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}"
>
> --
> 2.32.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> 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/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-18 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <16DA0ACF872045DF.28939@lists.openembedded.org>
2022-03-07  8:10 ` [OE-core] [PATCH] libsdl2: Make libunwind dependency optional for native builds Carlos Rafael Giani
2022-03-07  8:07 Carlos Rafael Giani
2022-03-07  9:30 ` [OE-core] " Alexander Kanavin
     [not found] ` <16DA0F4A680FB7A0.15718@lists.openembedded.org>
2022-03-07  9:31   ` Alexander Kanavin
2022-03-07 22:39     ` Richard Purdie
2022-03-18 11:08       ` Carlos Rafael Giani
2022-03-18 11:35         ` Richard Purdie
2022-03-18 20:10           ` Carlos Rafael Giani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.