1

I tried this command to configure thrift,

./configure CXX=arm-linux-gnueabi-g++ CC=arm-linux-gnueabi-gcc --prefix=/arms/thrift --host=arm-linux-gnueabi --with-cpp --with-boost=/path-to-boost-for-arm

and met the following error msg

checking for boostlib >= 1.40.0... yes checking for libevent >= 1.0... configure: error: in `/arms/thrift-0.9.0': configure: error: cannot run test program while cross compiling

Is there any solution?

CoderDake
  • 1,497
  • 2
  • 15
  • 30

2 Answers2

0

You get the error because a dependency it's trying to find is missing. So first cross compile all the dependency it's searching for.

./configure --help

Here you find how to include dependencies.

--with-(dependency)=path-to-compiled-bin
sth
  • 222,467
  • 53
  • 283
  • 367
vinay hunachyal
  • 3,781
  • 2
  • 20
  • 31
0

Thrift 0.9.0 is BROKEN for cross-compile. Part of the problems you're seeing are because they have static paths for at least a few (if not all) of the stuff that doesn't offer pkg-config stuff answers for things. It's looking outside of your sysroot for all sorts of things right now.

There's an issue logged in their Jira, but the position they take is "have you set your --includedir parameter?" (Uh, --includedir is specifying where things are within my sysroot, and you're supposed to honor things like turning off PHP builds (it doesn't right now...sigh...) and a --with-libtool-sysroot that prefixes everything so you can cross-compile.) So, I don't think help will be forthcoming anytime in the immediate future.

tauran
  • 7,986
  • 6
  • 41
  • 48
Svartalf
  • 2,512
  • 2
  • 14
  • 14