All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin
@ 2015-02-22 21:25 Romain Naour
  2015-02-22 21:25 ` [Buildroot] [PATCH 2/2] package/thrift: remove tests Romain Naour
  2015-02-22 21:27 ` [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Romain Naour @ 2015-02-22 21:25 UTC (permalink / raw)
  To: buildroot

Libtool append the sysroot path (lt_sysroot) with the libdir value found in
the libstdc++.la file only with bfin toolchain.

Path/to/sysroot/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.3.5/libstdc++.so

Set lt_cv_aix_libpath__CXX to /usr/lib allow to overwrite the libdir value
from libstdc++.la.

Fixes:
http://autobuild.buildroot.net/results/ae2/ae274693b953dd569c3ff63c532e2fc9553b5002/

And many more

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 package/thrift/thrift.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/thrift/thrift.mk b/package/thrift/thrift.mk
index 559bd28..1215aed 100644
--- a/package/thrift/thrift.mk
+++ b/package/thrift/thrift.mk
@@ -26,6 +26,10 @@ ifeq ($(BR2_STATIC_LIBS),y)
 THRIFT_CONF_ENV += LIBS=-lz
 endif
 
+# Libtool append the sysroot path (lt_sysroot) with the libdir value found in
+# the libstdc++.la file only on certain toolchain.
+THRIFT_CONF_OPTS = lt_cv_aix_libpath__CXX="/usr/lib"
+
 # Language selection
 # The generator (host tool) works with all of them regardless
 # This is just for the libraries / bindings
-- 
1.9.3

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

* [Buildroot] [PATCH 2/2] package/thrift: remove tests
  2015-02-22 21:25 [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Romain Naour
@ 2015-02-22 21:25 ` Romain Naour
  2015-02-22 21:27 ` [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Romain Naour @ 2015-02-22 21:25 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 package/thrift/thrift.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/thrift/thrift.mk b/package/thrift/thrift.mk
index 1215aed..eb1af7e 100644
--- a/package/thrift/thrift.mk
+++ b/package/thrift/thrift.mk
@@ -55,7 +55,12 @@ define THRIFT_TOOL_NO_HARDCODE
 	$(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D)/tutorial/Makefile.am
 endef
 
-THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE
+# Tests in lib/cpp/test are not disabled by --disabe-tests
+define THRIFT_REMOVE_CPP_TEST
+	$(SED) "s:test::" $(@D)/lib/cpp/Makefile.am
+endef
+
+THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE THRIFT_REMOVE_CPP_TEST
 
 define THRIFT_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C $(@D)
-- 
1.9.3

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

* [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin
  2015-02-22 21:25 [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Romain Naour
  2015-02-22 21:25 ` [Buildroot] [PATCH 2/2] package/thrift: remove tests Romain Naour
@ 2015-02-22 21:27 ` Thomas Petazzoni
  2015-02-22 21:46   ` Romain Naour
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-02-22 21:27 UTC (permalink / raw)
  To: buildroot

Dear Romain Naour,

On Sun, 22 Feb 2015 22:25:06 +0100, Romain Naour wrote:
> Libtool append the sysroot path (lt_sysroot) with the libdir value found in
> the libstdc++.la file only with bfin toolchain.

And to you know why ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin
  2015-02-22 21:27 ` [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Thomas Petazzoni
@ 2015-02-22 21:46   ` Romain Naour
  2015-02-23 23:39     ` Romain Naour
  0 siblings, 1 reply; 5+ messages in thread
From: Romain Naour @ 2015-02-22 21:46 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Le 22/02/2015 22:27, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
> 
> On Sun, 22 Feb 2015 22:25:06 +0100, Romain Naour wrote:
>> Libtool append the sysroot path (lt_sysroot) with the libdir value found in
>> the libstdc++.la file only with bfin toolchain.
> 
> And to you know why ?

Not really...

I found a sed expression in ltmain.sh which seems to set libdir with libdir from libstdc++.la
"eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`"

Then the sysroot is appended right after that:
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"

So I tried to find from where the sed expression come from.
And I found lt_aix_libpath_sed in configure which is use to set lt_cv_aix_libpath__CXX.

"lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`"

So I added lt_cv_aix_libpath__CXX in THRIFT_CONF_OPTS.

In not sure if we need to do that for other architecture/toolchain.

I hope this will further investigation.

Best regards,
Romain
> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin
  2015-02-22 21:46   ` Romain Naour
@ 2015-02-23 23:39     ` Romain Naour
  0 siblings, 0 replies; 5+ messages in thread
From: Romain Naour @ 2015-02-23 23:39 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

This patch is wrong since THRIFT_CONF_OPTS is overwritten here (missing +)
THRIFT_CONF_OPTS = lt_cv_aix_libpath__CXX="/usr/lib"

So previous THRIFT_CONF_OPTS were discarded:
THRIFT_CONF_OPTS = --with-sysroot=$(STAGING_DIR) \
	--with-boost=$(STAGING_DIR) \
	--disable-tests \
	--disable-tutorial

That why the tests were build...

But the issue seems to be related to --with-boost=$(STAGING_DIR) option.
There is no error if you remove this option.

So I used --with-boost-libdir=$(STAGING_DIR)/usr/lib to override boost libraries
path detection.

Please give a try to the new patch:
http://patchwork.ozlabs.org/patch/442702/

Best regards,
Romain

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

end of thread, other threads:[~2015-02-23 23:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-22 21:25 [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Romain Naour
2015-02-22 21:25 ` [Buildroot] [PATCH 2/2] package/thrift: remove tests Romain Naour
2015-02-22 21:27 ` [Buildroot] [PATCH 1/2] package/thrift: fix build failure on bfin Thomas Petazzoni
2015-02-22 21:46   ` Romain Naour
2015-02-23 23:39     ` Romain Naour

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.