[oe] [PATCH] alsa-utils: fix linking against host libc.so/libm.so

Denys Dmytriyenko denis at denix.org
Fri Jun 12 19:14:59 UTC 2009


Caused by expecting ncurses library in /usr/lib.

For some people it's just a warning:
ld: warning: library search path "/usr/lib" is unsafe for cross-compilation
ld: skipping incompatible /usr/lib/libm.so when searching for -lm

And for some people it breaks the build:
ld: warning: library search path "/usr/lib" is unsafe for cross-compilation
/usr/lib/libm.so: file not recognized: File format not recognized
---
 recipes/alsa/alsa-utils_1.0.18.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/recipes/alsa/alsa-utils_1.0.18.bb b/recipes/alsa/alsa-utils_1.0.18.bb
index 2931545..40718b5 100644
--- a/recipes/alsa/alsa-utils_1.0.18.bb
+++ b/recipes/alsa/alsa-utils_1.0.18.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.alsa-project.org"
 SECTION = "console/utils"
 LICENSE = "GPL"
 DEPENDS = "alsa-lib ncurses"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
            file://alsa-utils-automake.patch;patch=1 \
@@ -20,6 +20,7 @@ inherit autotools
 do_configure_append() {
 	for i in $(find ${S} -name Makefile) ; do
 		sed -i -e s:/usr/include/ncurses:${STAGING_INCDIR}/ncurses:g $i
+		sed -i -e 's:-L/usr/lib -lncurses:-L${STAGING_LIBDIR} -lncurses:g' $i
 	done
 }
 
-- 
1.6.0.6





More information about the Openembedded-devel mailing list