Patchwork db: Fix libtool linking against local libstdc++.so

login
register
mail settings
Submitter Tyler Hall
Date Jan. 25, 2014, 4:14 a.m.
Message ID <1390623243-28674-1-git-send-email-tylerwhall@gmail.com>
Download mbox | patch
Permalink /patch/65795/
State New
Headers show

Comments

Tyler Hall - Jan. 25, 2014, 4:14 a.m.
Building the C++ bindings in a484b35b818768487ff27cf06b8c5d4e128126af
introduced this error on systems with /usr/lib/libstdc++.so present:

    /usr/lib/libstdc++.so: file not recognized: File format not recognized

The shipped libtool is sysroot aware, so pass --with-sysroot so it will
extract the sysroot from the compiler.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
---
 meta/recipes-support/db/db_5.3.21.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Paul Barker - Jan. 25, 2014, 11:24 a.m.
On 25 January 2014 04:14, Tyler Hall <tylerwhall@gmail.com> wrote:
> Building the C++ bindings in a484b35b818768487ff27cf06b8c5d4e128126af
> introduced this error on systems with /usr/lib/libstdc++.so present:
>
>     /usr/lib/libstdc++.so: file not recognized: File format not recognized
>
> The shipped libtool is sysroot aware, so pass --with-sysroot so it will
> extract the sysroot from the compiler.
>
> Signed-off-by: Tyler Hall <tylerwhall@gmail.com>

This fixes the issue I was having, I can now build db without having
to revert the previous patch to enable C++ bindings.

Tested-by: Paul Barker <paul@paulbarker.me.uk>
Philip Balister - Jan. 26, 2014, 3:57 p.m.
On 01/24/2014 11:14 PM, Tyler Hall wrote:
> Building the C++ bindings in a484b35b818768487ff27cf06b8c5d4e128126af
> introduced this error on systems with /usr/lib/libstdc++.so present:
> 
>     /usr/lib/libstdc++.so: file not recognized: File format not recognized
> 
> The shipped libtool is sysroot aware, so pass --with-sysroot so it will
> extract the sysroot from the compiler.
> 
> Signed-off-by: Tyler Hall <tylerwhall@gmail.com>

Tested-by: Philip Balister <philip@balister.org>

It didn't seem to break anything on my build. (Which worked already)
Packaging looks OK still.

> ---
>  meta/recipes-support/db/db_5.3.21.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/db/db_5.3.21.bb b/meta/recipes-support/db/db_5.3.21.bb
> index 8ec8870..caf6890 100644
> --- a/meta/recipes-support/db/db_5.3.21.bb
> +++ b/meta/recipes-support/db/db_5.3.21.bb
> @@ -63,7 +63,7 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
>  # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
>  DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
>  
> -EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx"
> +EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
>  
>  # Override the MUTEX setting here, the POSIX library is
>  # the default - "POSIX/pthreads/library".
>
Cristian Iorga - Jan. 27, 2014, 12:01 p.m.
Hello,

This fixes YB5759 if included in Build Appliance poky repo.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5759

Regards,
Cristian Iorga
YP
Intel

-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Philip Balister
Sent: Sunday, January 26, 2014 5:57 PM
To: Tyler Hall
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] db: Fix libtool linking against local libstdc++.so

On 01/24/2014 11:14 PM, Tyler Hall wrote:
> Building the C++ bindings in a484b35b818768487ff27cf06b8c5d4e128126af
> introduced this error on systems with /usr/lib/libstdc++.so present:
> 
>     /usr/lib/libstdc++.so: file not recognized: File format not 
> recognized
> 
> The shipped libtool is sysroot aware, so pass --with-sysroot so it 
> will extract the sysroot from the compiler.
> 
> Signed-off-by: Tyler Hall <tylerwhall@gmail.com>

Tested-by: Philip Balister <philip@balister.org>

It didn't seem to break anything on my build. (Which worked already) Packaging looks OK still.

> ---
>  meta/recipes-support/db/db_5.3.21.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/db/db_5.3.21.bb 
> b/meta/recipes-support/db/db_5.3.21.bb
> index 8ec8870..caf6890 100644
> --- a/meta/recipes-support/db/db_5.3.21.bb
> +++ b/meta/recipes-support/db/db_5.3.21.bb
> @@ -63,7 +63,7 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
>  # All the --disable-* options replace --enable-smallbuild, which 
> breaks a bunch of stuff (eg. postfix)  DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
>  
> -EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx"
> +EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
>  
>  # Override the MUTEX setting here, the POSIX library is  # the 
> default - "POSIX/pthreads/library".
>
dv - Jan. 27, 2014, 12:17 p.m.
On 2014-01-25 05:14, Tyler Hall wrote:
> Building the C++ bindings in a484b35b818768487ff27cf06b8c5d4e128126af
> introduced this error on systems with /usr/lib/libstdc++.so present:
>
>      /usr/lib/libstdc++.so: file not recognized: File format not recognized
>
> The shipped libtool is sysroot aware, so pass --with-sysroot so it will
> extract the sysroot from the compiler.
>
> Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
> ---
>   meta/recipes-support/db/db_5.3.21.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/db/db_5.3.21.bb b/meta/recipes-support/db/db_5.3.21.bb
> index 8ec8870..caf6890 100644
> --- a/meta/recipes-support/db/db_5.3.21.bb
> +++ b/meta/recipes-support/db/db_5.3.21.bb
> @@ -63,7 +63,7 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
>   # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
>   DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
>   
> -EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx"
> +EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
>   
>   # Override the MUTEX setting here, the POSIX library is
>   # the default - "POSIX/pthreads/library".

Works fine for me, thanks.

Patch

diff --git a/meta/recipes-support/db/db_5.3.21.bb b/meta/recipes-support/db/db_5.3.21.bb
index 8ec8870..caf6890 100644
--- a/meta/recipes-support/db/db_5.3.21.bb
+++ b/meta/recipes-support/db/db_5.3.21.bb
@@ -63,7 +63,7 @@  FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
 # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
 DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
 
-EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx"
+EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
 
 # Override the MUTEX setting here, the POSIX library is
 # the default - "POSIX/pthreads/library".