Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] ncurses-native: install to libdir, not base_libdir
@ 2012-01-10 19:51 Christopher Larson
  2012-01-12  9:37 ` Martin Jansa
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Christopher Larson @ 2012-01-10 19:51 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

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.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-core/ncurses/ncurses.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index 8321d7b..43303b7 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -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
-- 
1.7.8.rc4




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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-10 19:51 [PATCH] ncurses-native: install to libdir, not base_libdir Christopher Larson
@ 2012-01-12  9:37 ` Martin Jansa
  2012-01-12 14:25 ` Enrico Scholz
  2012-01-17 19:32 ` Saul Wold
  2 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2012-01-12  9:37 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

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

On Tue, Jan 10, 2012 at 01:51:18PM -0600, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> 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!

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

> 
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/recipes-core/ncurses/ncurses.inc |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
> index 8321d7b..43303b7 100644
> --- a/meta/recipes-core/ncurses/ncurses.inc
> +++ b/meta/recipes-core/ncurses/ncurses.inc
> @@ -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
> -- 
> 1.7.8.rc4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-10 19:51 [PATCH] ncurses-native: install to libdir, not base_libdir Christopher Larson
  2012-01-12  9:37 ` Martin Jansa
@ 2012-01-12 14:25 ` Enrico Scholz
  2012-01-16 15:32   ` Chris Larson
  2012-01-17 19:32 ` Saul Wold
  2 siblings, 1 reply; 8+ messages in thread
From: Enrico Scholz @ 2012-01-12 14:25 UTC (permalink / raw)
  To: openembedded-core

Christopher Larson <kergoth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
writes:

> --- a/meta/recipes-core/ncurses/ncurses.inc
> +++ b/meta/recipes-core/ncurses/ncurses.inc
> ...
> +# 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



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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-12 14:25 ` Enrico Scholz
@ 2012-01-16 15:32   ` Chris Larson
  2012-01-16 17:45     ` Saul Wold
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Larson @ 2012-01-16 15:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Thu, Jan 12, 2012 at 7:25 AM, Enrico Scholz
<enrico.scholz@sigma-chemnitz.de> wrote:
> Christopher Larson <kergoth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> writes:
>
>> --- a/meta/recipes-core/ncurses/ncurses.inc
>> +++ b/meta/recipes-core/ncurses/ncurses.inc
>> ...
>> +# 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.

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.
-- 
Christopher Larson



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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-16 15:32   ` Chris Larson
@ 2012-01-16 17:45     ` Saul Wold
  2012-01-16 19:09       ` Joshua Lock
  2012-01-16 21:27       ` Chris Larson
  0 siblings, 2 replies; 8+ messages in thread
From: Saul Wold @ 2012-01-16 17:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Chris Larson

On 01/16/2012 07:32 AM, Chris Larson wrote:
> On Thu, Jan 12, 2012 at 7:25 AM, Enrico Scholz
> <enrico.scholz@sigma-chemnitz.de>  wrote:
>> Christopher Larson<kergoth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> writes:
>>
>>> --- a/meta/recipes-core/ncurses/ncurses.inc
>>> +++ b/meta/recipes-core/ncurses/ncurses.inc
>>> ...
>>> +# 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.
>
> 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!



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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-16 17:45     ` Saul Wold
@ 2012-01-16 19:09       ` Joshua Lock
  2012-01-16 21:27       ` Chris Larson
  1 sibling, 0 replies; 8+ messages in thread
From: Joshua Lock @ 2012-01-16 19:09 UTC (permalink / raw)
  To: openembedded-core

On 16/01/12 09:45, Saul Wold wrote:
> On 01/16/2012 07:32 AM, Chris Larson wrote:
>> On Thu, Jan 12, 2012 at 7:25 AM, Enrico Scholz
>> <enrico.scholz@sigma-chemnitz.de> wrote:
>>> Christopher Larson<kergoth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> writes:
>>>
>>>> --- a/meta/recipes-core/ncurses/ncurses.inc
>>>> +++ b/meta/recipes-core/ncurses/ncurses.inc
>>>> ...
>>>> +# 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.
>>
>> 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
-- 
Joshua Lock
         Yocto Project "Johannes factotum"
         Intel Open Source Technology Centre



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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-16 17:45     ` Saul Wold
  2012-01-16 19:09       ` Joshua Lock
@ 2012-01-16 21:27       ` Chris Larson
  1 sibling, 0 replies; 8+ messages in thread
From: Chris Larson @ 2012-01-16 21:27 UTC (permalink / raw)
  To: Saul Wold; +Cc: Patches and discussions about the oe-core layer

On Mon, Jan 16, 2012 at 10:45 AM, Saul Wold <sgw@linux.intel.com> wrote:
> On 01/16/2012 07:32 AM, Chris Larson wrote:
>>
>> On Thu, Jan 12, 2012 at 7:25 AM, Enrico Scholz
>> <enrico.scholz@sigma-chemnitz.de>  wrote:
>>>
>>> Christopher Larson<kergoth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> writes:
>>>
>>>> --- a/meta/recipes-core/ncurses/ncurses.inc
>>>> +++ b/meta/recipes-core/ncurses/ncurses.inc
>>>> ...
>>>> +# 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.
>>
>>
>> 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.
-- 
Christopher Larson



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

* Re: [PATCH] ncurses-native: install to libdir, not base_libdir
  2012-01-10 19:51 [PATCH] ncurses-native: install to libdir, not base_libdir Christopher Larson
  2012-01-12  9:37 ` Martin Jansa
  2012-01-12 14:25 ` Enrico Scholz
@ 2012-01-17 19:32 ` Saul Wold
  2 siblings, 0 replies; 8+ messages in thread
From: Saul Wold @ 2012-01-17 19:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

On 01/10/2012 11:51 AM, Christopher Larson wrote:
> From: Christopher Larson<chris_larson@mentor.com>
>
> 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.
>
> Signed-off-by: Christopher Larson<chris_larson@mentor.com>
> ---
>   meta/recipes-core/ncurses/ncurses.inc |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
> index 8321d7b..43303b7 100644
> --- a/meta/recipes-core/ncurses/ncurses.inc
> +++ b/meta/recipes-core/ncurses/ncurses.inc
> @@ -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
Merged into OE-Core along with Enrico's Patch.

Thanks
	Sau!



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

end of thread, other threads:[~2012-01-17 19:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 19:51 [PATCH] ncurses-native: install to libdir, not base_libdir Christopher Larson
2012-01-12  9:37 ` Martin Jansa
2012-01-12 14:25 ` Enrico Scholz
2012-01-16 15:32   ` Chris Larson
2012-01-16 17:45     ` Saul Wold
2012-01-16 19:09       ` Joshua Lock
2012-01-16 21:27       ` Chris Larson
2012-01-17 19:32 ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox