Re: [OE-core] [PATCH 1/3] libsdl: support native compilation

2015-10-22 Thread Dmitry Eremin-Solenikov
Hello,

2015-10-19 17:44 GMT+03:00 Mark Hatle :
> On 10/19/15 9:17 AM, Dmitry Eremin-Solenikov wrote:
>> qemu-native can use SDL backend for graphical output. Currently it is
>> expected to use libsdl provided by the host. However this can lead to
>> library incompatibilities between host and target. Make libsdl recipe
>> support native compilation.
>
> I don't object to the patch.. but we did have multiple problems in the past
> where libsdl (native) did not work with the host systems X11 or what-ever.
>
> Various failure conditions about not linking, linking to the wrong libsdl, or
> execution failing are what made us prefer the host system's libsdl -- or 
> simply
> disabling libsdl altogether.

The issue that get me to this patch was an issue with linking of qemu.
Debian provides versioned symbols in libdbus, OE does not. Libdbus
from sysroot overrode system one. So system libsdl which used system-wide
libpulse* (which expected libdbus with versioned symbols) could not be linked
to the qemu.

Richard: this was tested on my system only. If you don't want to break things
before release, what about merging them after next Yocto/OE-Core release?

>
> --Mark
>
>> Signed-off-by: Dmitry Eremin-Solenikov 
>> ---
>>  meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb 
>> b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
>> index c0d5c6a..c9f3e00 100644
>> --- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
>> +++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
>> @@ -17,6 +17,7 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 
>> 'directfb', 'directfb', '', d
>> ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 
>> libxext libxrandr libxrender', '', d)} \
>> ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', 
>> '', d)} \
>> tslib"
>> +DEPENDS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
>> 'virtual/libx11-native libxrandr-native libxrender-native libxext-native', 
>> '', d)}"
>>  DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
>> 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender 
>> nativesdk-libxext', '', d)}"
>>
>>  PR = "r3"
>> @@ -65,4 +66,4 @@ do_configure_prepend() {
>>  export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
>>  }
>>
>> -BBCLASSEXTEND = "nativesdk"
>> +BBCLASSEXTEND = "native nativesdk"
>>
>



-- 
With best wishes
Dmitry
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] libsdl: support native compilation

2015-10-19 Thread Dmitry Eremin-Solenikov
qemu-native can use SDL backend for graphical output. Currently it is
expected to use libsdl provided by the host. However this can lead to
library incompatibilities between host and target. Make libsdl recipe
support native compilation.

Signed-off-by: Dmitry Eremin-Solenikov 
---
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb 
b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
index c0d5c6a..c9f3e00 100644
--- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -17,6 +17,7 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 
'directfb', 'directfb', '', d
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 
libxext libxrandr libxrender', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', '', 
d)} \
tslib"
+DEPENDS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
'virtual/libx11-native libxrandr-native libxrender-native libxext-native', '', 
d)}"
 DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender 
nativesdk-libxext', '', d)}"
 
 PR = "r3"
@@ -65,4 +66,4 @@ do_configure_prepend() {
 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
 }
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.6.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] libsdl: support native compilation

2015-10-19 Thread Mark Hatle
On 10/19/15 9:17 AM, Dmitry Eremin-Solenikov wrote:
> qemu-native can use SDL backend for graphical output. Currently it is
> expected to use libsdl provided by the host. However this can lead to
> library incompatibilities between host and target. Make libsdl recipe
> support native compilation.

I don't object to the patch.. but we did have multiple problems in the past
where libsdl (native) did not work with the host systems X11 or what-ever.

Various failure conditions about not linking, linking to the wrong libsdl, or
execution failing are what made us prefer the host system's libsdl -- or simply
disabling libsdl altogether.

--Mark

> Signed-off-by: Dmitry Eremin-Solenikov 
> ---
>  meta/recipes-graphics/libsdl/libsdl_1.2.15.bb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb 
> b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> index c0d5c6a..c9f3e00 100644
> --- a/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> +++ b/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
> @@ -17,6 +17,7 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 
> 'directfb', 'directfb', '', d
> ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 
> libxext libxrandr libxrender', '', d)} \
> ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', 
> '', d)} \
> tslib"
> +DEPENDS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
> 'virtual/libx11-native libxrandr-native libxrender-native libxext-native', 
> '', d)}"
>  DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
> 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender 
> nativesdk-libxext', '', d)}"
>  
>  PR = "r3"
> @@ -65,4 +66,4 @@ do_configure_prepend() {
>  export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
>  }
>  
> -BBCLASSEXTEND = "nativesdk"
> +BBCLASSEXTEND = "native nativesdk"
> 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] libsdl: support native compilation

2015-10-19 Thread Richard Purdie
On Mon, 2015-10-19 at 09:44 -0500, Mark Hatle wrote:
> On 10/19/15 9:17 AM, Dmitry Eremin-Solenikov wrote:
> > qemu-native can use SDL backend for graphical output. Currently it is
> > expected to use libsdl provided by the host. However this can lead to
> > library incompatibilities between host and target. Make libsdl recipe
> > support native compilation.
> 
> I don't object to the patch.. but we did have multiple problems in the past
> where libsdl (native) did not work with the host systems X11 or what-ever.
> 
> Various failure conditions about not linking, linking to the wrong libsdl, or
> execution failing are what made us prefer the host system's libsdl -- or 
> simply
> disabling libsdl altogether.

This is my big worry too. I remember a lot of problems trying to build a
libsdl that worked on all of the different linux distros someone might
run on. Previously we found that assuming a working libsdl or disabling
it was much easier.

How wide has the testing if this patch series been?

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core