[
https://issues.apache.org/jira/browse/THRIFT-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917917#comment-13917917
]
Roger Meier commented on THRIFT-2127:
-------------------------------------
I use Thrift since years on the arm platform, we do this within bitbake recipie:
{noformat}
do_configure_prepend () {
sed -e '/AC_CONFIG_SUBDIRS/d' -i ${S}/configure.ac
}
{noformat}
which does remove the thrift php extension:
{noformat}
diff --git a/configure.ac b/configure.ac
index 7eea98f..101263b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -255,7 +255,6 @@ AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes)
if test "$with_php_extension" = "yes"; then
AC_PATH_PROG([PHP_CONFIG], [php-config])
if test -n "$PHP_CONFIG" ; then
- AC_CONFIG_SUBDIRS([lib/php/src/ext/thrift_protocol])
have_php_extension="yes"
fi
fi
{noformat}
we also have this patch changing AC_RUN_IFELSE to AC_LINK_IFELSE :
{noformat}
diff -Nurp thrift-0.9.1.orig/aclocal/ax_lib_event.m4
thrift-0.9.1/aclocal/ax_lib_event.m4
--- thrift-0.9.1.orig/aclocal/ax_lib_event.m4 2013-08-15 16:04:29.000000000
+0200
+++ thrift-0.9.1/aclocal/ax_lib_event.m4 2013-12-04 15:03:18.319179501
+0100
@@ -75,7 +75,7 @@ AC_DEFUN([AX_LIB_EVENT_DO_CHECK],
AC_LANG_PUSH([C])
dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling,
dnl but then the version cannot be checked.
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <event.h>
]], [[
diff -Nurp thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4
thrift-0.9.1/aclocal/ax_lib_zlib.m4
--- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 2013-08-15 16:04:29.000000000
+0200
+++ thrift-0.9.1/aclocal/ax_lib_zlib.m4 2013-12-04 15:04:57.424865834 +0100
@@ -73,7 +73,7 @@ AC_DEFUN([AX_LIB_ZLIB_DO_CHECK],
# (defined in the library).
AC_LANG_PUSH([C])
dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling.
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <zlib.h>
#if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION
#else
{noformat}
I guess we should just add an additional parameter to AC_RUN_IFELSE
(action-if-cross-compiling), see
http://www.gnu.org/software/autoconf/manual/autoconf.html#Runtime
> Autoconf scripting does not properly account for cross-compile
> --------------------------------------------------------------
>
> Key: THRIFT-2127
> URL: https://issues.apache.org/jira/browse/THRIFT-2127
> Project: Thrift
> Issue Type: Bug
> Components: Build Process
> Affects Versions: 0.9
> Environment: Ubuntu 12.04 running OpenEmbedded Dylan
> Reporter: Frank Earl
> Assignee: Jake Farrell
> Attachments: fix_autoconf_crosscompile_leaks.patch
>
>
> Trying to get Thrift to Cross-compile within OpenEmbedded to get an ARM based
> build combined with a full-on SDK for our embedded target. So far, I'm
> getting this:
> configure:16347: checking for boostlib >= 1.40.0
> configure:16401: arm-poky-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork
> -mfloat-abi=softfp -mfpu=neon
> --sysroot=/home/fearl/git/dc_image_build/poky/build/tmp/sysroots/beaglebone
> -c -O2 -pipe -g -feliminate-unused-debug-types -fpermissive
> -fvisibility-inlines-hidden -I/usr/include conftest.cpp >&5
> cc1plus: warning: include location "/usr/include" is unsafe for
> cross-compilation [-Wpoison-system-directories]
> configure:16401: $? = 0
> This means it's grabbing from outside the sysroot- which can present bad
> results on the cross-compile pass.
--
This message was sent by Atlassian JIRA
(v6.2#6252)