package/thrift: fix build failure on bfin
PATCH 1/2 package/thrift: fix build failure on bfin
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
--- package/thrift/thrift.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/thrift/thrift.mk +4 -0
@@ -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
Signature · 1 line
1.9.3
PATCH 2/2 package/thrift: remove tests
--- package/thrift/thrift.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
package/thrift/thrift.mk +6 -1
@@ -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)
Signature · 1 line
1.9.3
PATCH 1/2 package/thrift: fix build failure on bfin
In reply to Romain NaourDear Romain Naour,
Quoted 2 lines · Romain Naour
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 package/thrift: fix build failure on bfin
Hi Thomas,
Le 22/02/2015 22:27, Thomas Petazzoni a ?crit :
Quoted 7 lines
Dear Romain Naour,
Quoted 2 lines · Romain Naour
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
Quoted 5 lines
Thanks!
Thomas
PATCH 1/2 package/thrift: fix build failure on bfin
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