Skip to contentSkip to conversation

ncurses-native: install to libdir, not base_libdir

PATCH Applied Christopher Larson 6 participants 8 messages Jan 10, 2012 – Jan 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ncurses-native: install to libdir, not base_libdir

From: Christopher Larson <[email protected]>

For target, both base_libdir and libdir in sysroot can be used, as we pass --sysroot to the toolchain. For native, we don't do this, and we also only add -L<sysroot>/${libdir}, not -L<sysroot>/${base_libdir}, resulting in other native recipes (like readline-native) failing to find the ncurses libraries.

readline-native only built successfully on hosts where it could fall back to their ncurses/termcap rather than the one in the sysroot.

---
 meta/recipes-core/ncurses/ncurses.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +3 -3
index 8321d7b..43303b7 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_virtclass-native = ""
-INC_PR = "r3"
+INC_PR = "r4"
 
 inherit autotools binconfig multilib_header
 
@@ -26,8 +26,8 @@ ENABLE_WIDEC ?= "true"
 # builds.
 BUILD_CPPFLAGS += "-D_GNU_SOURCE"
 
-# tic from the -native build cannot run without setting this explicitly
-BUILD_LDFLAGS_virtclass-native += "-Wl,-rpath,${base_libdir}"
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"
 
 # Helper function for do_configure to allow multiple configurations
 # $1 the directory to run configure in
Signature · 1 line
1.7.8.rc4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Christopher Larson

From: Christopher Larson <[email protected]>

For target, both base_libdir and libdir in sysroot can be used, as we pass --sysroot to the toolchain. For native, we don't do this, and we also only add -L<sysroot>/${libdir}, not -L<sysroot>/${base_libdir}, resulting in other native recipes (like readline-native) failing to find the ncurses libraries.

readline-native only built successfully on hosts where it could fall back to their ncurses/termcap rather than the one in the sysroot.

Fixes issues I'm seeing while rebuilding from scratch, thanks!

Quoted 38 lines
---
 meta/recipes-core/ncurses/ncurses.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +3 -3
index 8321d7b..43303b7 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_virtclass-native = ""
-INC_PR = "r3"
+INC_PR = "r4"
 
 inherit autotools binconfig multilib_header
 
@@ -26,8 +26,8 @@ ENABLE_WIDEC ?= "true"
 # builds.
 BUILD_CPPFLAGS += "-D_GNU_SOURCE"
 
-# tic from the -native build cannot run without setting this explicitly
-BUILD_LDFLAGS_virtclass-native += "-Wl,-rpath,${base_libdir}"
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"
 
 # Helper function for do_configure to allow multiple configurations
 # $1 the directory to run configure in
Signature · 7 lines
1.7.8.rc4


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
In reply to Christopher Larson

Christopher Larson <[email protected]>

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 30

Quoted 5 lines · writes:
meta/recipes-core/ncurses/ncurses.inc +2 -0
...
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"

I do not think that this should be done per recipe (afais, at least libusb is affected by the same issue).

Adding '-L<baselibdir>' and the '-Wl,-rpath-link' + '-Wl,-rpath' options to BUILD_LDFLAGS would be a more general solution.

Enrico

#3 lore raw
Quoted 12 lines · Enrico Scholz

Christopher Larson <[email protected]>

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 30

Quoted 5 lines · writes:
meta/recipes-core/ncurses/ncurses.inc +2 -0
...
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"

I do not think that this should be done per recipe (afais, at least libusb is affected by the same issue).

Quoted 2 lines

Adding '-L<baselibdir>' and the '-Wl,-rpath-link' + '-Wl,-rpath' options to BUILD_LDFLAGS would be a more general solution.

Alternatively, could simplify the layout of the native sysroot and adjust things in the native class. It could make a certain amount of sense, as it makes more sense for our structure for native to match the host than it does the target.

Signature · 1 line
Christopher Larson
#4 lore raw
Quoted 14 lines · Chris Larson
Quoted 12 lines · Enrico Scholz

Christopher Larson<[email protected]>

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 30

Quoted 5 lines · writes:
meta/recipes-core/ncurses/ncurses.inc +2 -0
...
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"

I do not think that this should be done per recipe (afais, at least libusb is affected by the same issue).

Quoted 7 lines
Quoted 2 lines

Adding '-L<baselibdir>' and the '-Wl,-rpath-link' + '-Wl,-rpath' options to BUILD_LDFLAGS would be a more general solution.

Alternatively, could simplify the layout of the native sysroot and adjust things in the native class. It could make a certain amount of sense, as it makes more sense for our structure for native to match the host than it does the target.

So, Chris, are you going to implement this and do we drop the ncurses patch for now?

Sau!

#5 lore raw
Quoted 18 lines · Saul Wold
Quoted 17 lines · Chris Larson
Quoted 14 lines · Enrico Scholz

Christopher Larson<[email protected]>

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 30

Quoted 5 lines · writes:
meta/recipes-core/ncurses/ncurses.inc +2 -0
...
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"

I do not think that this should be done per recipe (afais, at least libusb is affected by the same issue).

Adding '-L<baselibdir>' and the '-Wl,-rpath-link' + '-Wl,-rpath' options to BUILD_LDFLAGS would be a more general solution.

Quoted 7 lines
Quoted 4 lines

Alternatively, could simplify the layout of the native sysroot and adjust things in the native class. It could make a certain amount of sense, as it makes more sense for our structure for native to match the host than it does the target.

So, Chris, are you going to implement this and do we drop the ncurses patch for now?

We need to merge something to resolve this issue sooner rather than later, I had to apply this change in order to build on a system without ncurses installed.

Cheers,
Joshua

Signature · 3 lines
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre
#6 lore raw
In reply to Saul Wold
Quoted 22 lines · Saul Wold
Quoted 21 lines · Chris Larson
Quoted 16 lines · Enrico Scholz

Christopher Larson<[email protected]>

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 30

Quoted 5 lines · writes:
meta/recipes-core/ncurses/ncurses.inc +2 -0
...
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"

I do not think that this should be done per recipe (afais, at least libusb is affected by the same issue).

Adding '-L<baselibdir>' and the '-Wl,-rpath-link' + '-Wl,-rpath' options to BUILD_LDFLAGS would be a more general solution.

Quoted 8 lines
Quoted 4 lines

Alternatively, could simplify the layout of the native sysroot and adjust things in the native class. It could make a certain amount of sense, as it makes more sense for our structure for native to match the host than it does the target.

So, Chris, are you going to implement this and do we drop the ncurses patch for now?

Enrico sent his general change in a patch series already. Someone will need to make the call on the preferred long term solution.

Signature · 1 line
Christopher Larson
Applied
#7 lore raw
In reply to Christopher Larson
Quoted 29 lines · Christopher Larson

From: Christopher Larson<[email protected]>

For target, both base_libdir and libdir in sysroot can be used, as we pass --sysroot to the toolchain. For native, we don't do this, and we also only add -L<sysroot>/${libdir}, not -L<sysroot>/${base_libdir}, resulting in other native recipes (like readline-native) failing to find the ncurses libraries.

readline-native only built successfully on hosts where it could fall back to their ncurses/termcap rather than the one in the sysroot.

---
  meta/recipes-core/ncurses/ncurses.inc |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-core/ncurses/ncurses.inc +1 -1
index 8321d7b..43303b7 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
  SECTION = "libs"
  DEPENDS = "ncurses-native"
  DEPENDS_virtclass-native = ""
-INC_PR = "r3"
+INC_PR = "r4"
 
  inherit autotools binconfig multilib_header
 

meta/recipes-core/ncurses/ncurses.inc ENABLE_WIDEC ?= "true" · line 33

Quoted 10 lines
meta/recipes-core/ncurses/ncurses.inc +2 -2
@@ -26,8 +26,8 @@ ENABLE_WIDEC ?= "true"
  # builds.
  BUILD_CPPFLAGS += "-D_GNU_SOURCE"
 
-# tic from the -native build cannot run without setting this explicitly
-BUILD_LDFLAGS_virtclass-native += "-Wl,-rpath,${base_libdir}"
+# natives don't generally look in base_libdir
+base_libdir_virtclass-native = "${libdir}"
 
  # Helper function for do_configure to allow multiple configurations
  # $1 the directory to run configure in

Merged into OE-Core along with Enrico's Patch.

Thanks
Sau!