Skip to contentSkip to conversation

alsa-lib: Unbreak native build when using TCLIBC=uclibc

PATCH In review Khem Raj 2 participants 4 messages Nov 21, 2011 – Nov 29, 2011

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 alsa-lib: Unbreak native build when using TCLIBC=uclibc

A recent change introduced EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " this change has a side effect when building alsa-lib-native using TCLIBC=uclibc the override kicks in uninvited and hence build the native package without symbol version information. This mean libasound.so which is needed by other packages from build host e.g. libSDL.so does not have required symbols and linking with libSDL fails, one such case ends in SDL support in qemu-native being silently disabled.

We make sure that override is only enabled for target recipe

---
 meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +6 -4
index 83e663d..fa96998 100644
@@ -14,7 +14,7 @@ BBCLASSEXTEND = "native nativesdk"
 #FIXME: remove the following
 ARM_INSTRUCTION_SET = "arm"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
            file://fix-tstamp-declaration.patch"
@@ -27,10 +27,12 @@ inherit autotools pkgconfig
 require alsa-fpu.inc
 EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
 
-EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python ${VERSIONEDSYMS}"
 
+VERSIONEDSYMS = ""
+VERSIONEDSYMS_libc-uclibc = "--with-versioned=no"
+VERSIONEDSYMS_virtclass-native = ""
+VERSIONEDSYMS_virtclass-nativesdk = ""
 PKGSUFFIX = ""
 PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 10 lines · Khem Raj

A recent change introduced EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " this change has a side effect when building alsa-lib-native using TCLIBC=uclibc the override kicks in uninvited and hence build the native package without symbol version information. This mean libasound.so which is needed by other packages from build host e.g. libSDL.so does not have required symbols and linking with libSDL fails, one such case ends in SDL support in qemu-native being silently disabled.

We make sure that override is only enabled for target recipe

This seems like the wrong solution to the problem. Shouldn't you be inhibiting the libc-uclibc OVERRIDE at source for native builds (assuming the host system isn't using uClibc)?

It also seems as though there ought to be a more generic place to encode the knowledge that uClibc doesn't do symbol versioning. Having to hack it into EXTRA_OECONF for every recipe seems... suboptimal.

p.

Quoted 35 lines
---
 meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +6 -4
index 83e663d..fa96998 100644
@@ -14,7 +14,7 @@ BBCLASSEXTEND = "native nativesdk"
 #FIXME: remove the following
 ARM_INSTRUCTION_SET = "arm"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
            file://fix-tstamp-declaration.patch"
@@ -27,10 +27,12 @@ inherit autotools pkgconfig
 require alsa-fpu.inc
 EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
 
-EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python ${VERSIONEDSYMS}"
 
+VERSIONEDSYMS = ""
+VERSIONEDSYMS_libc-uclibc = "--with-versioned=no"
+VERSIONEDSYMS_virtclass-native = ""
+VERSIONEDSYMS_virtclass-nativesdk = ""
 PKGSUFFIX = ""
 PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
 
author
#2 lore raw
Quoted 10 lines · Phil Blundell
Quoted 9 lines · Khem Raj

A recent change introduced EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " this change has a side effect when building alsa-lib-native using TCLIBC=uclibc the override kicks in uninvited and hence build the native package without symbol version information. This mean libasound.so which is needed by other packages from build host e.g. libSDL.so does not have required symbols and linking with libSDL fails, one such case ends in SDL support in qemu-native being silently disabled.

Quoted 5 lines
Quoted 1 line

We make sure that override is only enabled for target recipe

This seems like the wrong solution to the problem.  Shouldn't you be inhibiting the libc-uclibc OVERRIDE at source for native builds (assuming the host system isn't using uClibc)?

yes I thought of that that libc-uclibc/libc-glibc overrides should only pertain to target recipes and not extend to native/nativesdk. This would need probably redoing the overrides in native bbclass. I did not pursue it since it would need lot more testing which I could not afford atm.

Quoted 5 lines

It also seems as though there ought to be a more generic place to encode the knowledge that uClibc doesn't do symbol versioning.  Having to hack it into EXTRA_OECONF for every recipe seems... suboptimal.

while the feature is generic it does not seem to have impact on lot of recipes

Quoted 45 lines

p.

Quoted 32 lines

---
 meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb |   10 ++++++----

 1 files changed, 6 insertions(+), 4 deletions(-)
meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +0 -0
index 83e663d..fa96998 100644
@@ -14,7 +14,7 @@ BBCLASSEXTEND = "native nativesdk"
  #FIXME: remove the following

 ARM_INSTRUCTION_SET = "arm"

meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +1 -1
-PR = "r1"
+PR = "r2"

 SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
            file://fix-tstamp-declaration.patch"

meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +0 -0
@@ -27,10 +27,12 @@ inherit autotools pkgconfig

 require alsa-fpu.inc
 EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "

meta/recipes-multimedia/alsa/alsa-lib_1.0.24.1.bb +5 -3
-EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python ${VERSIONEDSYMS}"
 
+VERSIONEDSYMS = ""
+VERSIONEDSYMS_libc-uclibc = "--with-versioned=no"
+VERSIONEDSYMS_virtclass-native = ""
+VERSIONEDSYMS_virtclass-nativesdk = ""
Quoted 3 lines

 PKGSUFFIX = ""
 PKGSUFFIX_virtclass-nativesdk = "-nativesdk"

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

author
#3 lore raw
In reply to Phil Blundell
Quoted 12 lines · Phil Blundell
Quoted 10 lines · Khem Raj

A recent change introduced EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no " this change has a side effect when building alsa-lib-native using TCLIBC=uclibc the override kicks in uninvited and hence build the native package without symbol version information. This mean libasound.so which is needed by other packages from build host e.g. libSDL.so does not have required symbols and linking with libSDL fails, one such case ends in SDL support in qemu-native being silently disabled.

We make sure that override is only enabled for target recipe

Quoted 8 lines

This seems like the wrong solution to the problem.  Shouldn't you be inhibiting the libc-uclibc OVERRIDE at source for native builds (assuming the host system isn't using uClibc)?

It also seems as though there ought to be a more generic place to encode the knowledge that uClibc doesn't do symbol versioning.  Having to hack it into EXTRA_OECONF for every recipe seems... suboptimal.

I have posted another patch which is broader in impact and solves
these kind of problems
here http://lists.linuxtogo.org/pipermail/openembedded-core/2011-November/013375.html

Thanks
-Khem