Patchwork coreutils: fix search paths for libstdbuf.so

login
register
mail settings
Submitter chunrong guo
Date March 25, 2014, 10:37 a.m.
Message ID <1395743836-17276-1-git-send-email-B40290@freescale.com>
Download mbox | patch
Permalink /patch/69147/
State New
Headers show

Comments

chunrong guo - March 25, 2014, 10:37 a.m.
*fix the following error:
        |stdbuf: failed to find 'libstdbuf.so'
        *PKGLIBEXECDIR is the search paths for libstdbuf.so
        |PKGLIBEXECDIR='$(pkglibexecdir)'
        |pkglibexecdir='${libexecdir}/${PACKAGE}'

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 meta/recipes-core/coreutils/coreutils_8.22.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Richard Purdie - March 25, 2014, 10:55 a.m.
On Tue, 2014-03-25 at 18:37 +0800, Chunrong Guo wrote:
>         *fix the following error:
>         |stdbuf: failed to find 'libstdbuf.so'
>         *PKGLIBEXECDIR is the search paths for libstdbuf.so
>         |PKGLIBEXECDIR='$(pkglibexecdir)'
>         |pkglibexecdir='${libexecdir}/${PACKAGE}'
> 
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
>  meta/recipes-core/coreutils/coreutils_8.22.bb | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb b/meta/recipes-core/coreutils/coreutils_8.22.bb
> index a26aa02..ed5fc84 100644
> --- a/meta/recipes-core/coreutils/coreutils_8.22.bb
> +++ b/meta/recipes-core/coreutils/coreutils_8.22.bb
> @@ -71,8 +71,6 @@ do_install_append() {
>  	# in update-alternatives to fail, therefore use lbracket - the name used
>  	# for the actual source file.
>  	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
> -	install -d ${D}${libdir}/coreutils
> -	mv ${D}${libexecdir}/coreutils/libstdbuf.so ${D}${libdir}/coreutils
>  }
>  
>  inherit update-alternatives
> @@ -101,3 +99,4 @@ python __anonymous() {
>  }
>  
>  BBCLASSEXTEND = "native"
> +FILES_${PN}-dbg += "${libexecdir}/coreutils/.debug/*"

Khem added this back in 2011:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/meta/recipes-core/coreutils?h=rpurdie/t2&id=eee0b5aadba34130080df8aebc7e8dd57c7d5ccb

Khem: Any idea what this was for?

Cheers,

Richard
Khem Raj - March 25, 2014, 5:24 p.m.
On Tue, Mar 25, 2014 at 3:55 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Khem added this back in 2011:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/meta/recipes-core/coreutils?h=rpurdie/t2&id=eee0b5aadba34130080df8aebc7e8dd57c7d5ccb
>
> Khem: Any idea what this was for?

coreutils changed this back in 8.13 timeframe to appease automake
which stopped accepting pkglib_PROGRAMS
and it was moved to pkglibexec_PROGRAMS list since this library is
special where you do not link to it directly
but preload it to divert stdio buffers coreutils devs did not
classifiy it to be installed in libdir but in libexecdir
instead and if you look stdbuf program which sets up this preloading
is hardwired to look into libexecdir and modifies the preload search
path to include libexecdir in search path, so
if we specify --libexecdir=.. to configure and make sure that this .so
lands in same directory on target then we are ok. did we change global
libexecdir ?
chunrong guo - March 28, 2014, 9:52 a.m.
Hello,

I set "---libexecdir=${libdir}" in bb file.

I submit new patch for this issue .

Please review it .

Thanks,
chunrong


-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Wednesday, March 26, 2014 1:24 AM
To: Richard Purdie
Cc: Guo Chunrong-B40290; Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH] coreutils: fix search paths for libstdbuf.so

On Tue, Mar 25, 2014 at 3:55 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> Khem added this back in 2011:
>
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/meta/recipes-
> core/coreutils?h=rpurdie/t2&id=eee0b5aadba34130080df8aebc7e8dd57c7d5cc
> b
>
> Khem: Any idea what this was for?

coreutils changed this back in 8.13 timeframe to appease automake which stopped accepting pkglib_PROGRAMS and it was moved to pkglibexec_PROGRAMS list since this library is special where you do not link to it directly but preload it to divert stdio buffers coreutils devs did not classifiy it to be installed in libdir but in libexecdir instead and if you look stdbuf program which sets up this preloading is hardwired to look into libexecdir and modifies the preload search path to include libexecdir in search path, so if we specify --libexecdir=.. to configure and make sure that this .so lands in same directory on target then we are ok. did we change global libexecdir ?

Patch

diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb b/meta/recipes-core/coreutils/coreutils_8.22.bb
index a26aa02..ed5fc84 100644
--- a/meta/recipes-core/coreutils/coreutils_8.22.bb
+++ b/meta/recipes-core/coreutils/coreutils_8.22.bb
@@ -71,8 +71,6 @@  do_install_append() {
 	# in update-alternatives to fail, therefore use lbracket - the name used
 	# for the actual source file.
 	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-	install -d ${D}${libdir}/coreutils
-	mv ${D}${libexecdir}/coreutils/libstdbuf.so ${D}${libdir}/coreutils
 }
 
 inherit update-alternatives
@@ -101,3 +99,4 @@  python __anonymous() {
 }
 
 BBCLASSEXTEND = "native"
+FILES_${PN}-dbg += "${libexecdir}/coreutils/.debug/*"