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?
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
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.