Skip to contentSkip to conversation

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

PATCH In review Tyler Hall 5 participants 5 messages Jan 25, 2014 – Jan 27, 2014

lore
Share & tools
lore

Tyler Hall

author
#0 lore raw

PATCH 1/1 db: Fix libtool linking against local libstdc++.so

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.

---
 meta/recipes-support/db/db_5.3.21.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/db/db_5.3.21.bb +1 -1
index 8ec8870..caf6890 100644
@@ -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".
Signature · 1 line
1.8.5.3
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tyler Hall

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.

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

Signature · 4 lines
Paul Barker

Email: [email protected]
http://www.paulbarker.me.uk
Tested-by on v1 1/1
#2 lore raw
In reply to Tyler Hall
Quoted 9 lines · Tyler Hall

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.

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

Quoted 18 lines
---
 meta/recipes-support/db/db_5.3.21.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/db/db_5.3.21.bb +1 -1
index 8ec8870..caf6890 100644
@@ -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".
Tested-by Philip Balister
#3 lore raw

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: [email protected] [mailto:[email protected]] On Behalf Of Philip Balister
Sent: Sunday, January 26, 2014 5:57 PM
To: Tyler Hall
Cc: [email protected]
Subject: Re: [OE-core] [PATCH] db: Fix libtool linking against local libstdc++.so

Quoted 10 lines · Tyler Hall

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.

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

Quoted 17 lines
---
 meta/recipes-support/db/db_5.3.21.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/db/db_5.3.21.bb +0 -0
index 8ec8870..caf6890 100644
@@ -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"

meta/recipes-support/db/db_5.3.21.bb +1 -1
-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 
Quoted 2 lines

default - "POSIX/pthreads/library".

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
In reply to Tyler Hall
Quoted 18 lines · Tyler Hall

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.

---
  meta/recipes-support/db/db_5.3.21.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/db/db_5.3.21.bb +0 -0
index 8ec8870..caf6890 100644

meta/recipes-support/db/db_5.3.21.bb FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so" · line 69

Quoted 8 lines
meta/recipes-support/db/db_5.3.21.bb +1 -1
@@ -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.