私は x86 で、armhf 用に C++ で書かれた apache thrift プログラムをクロスコンパイルしようとしています。と をインストールgcc-arm-linux-gnueabihf
しg++-arm-linux-gnueabihf
ましapt-get
たが、それらを使用してプログラムをコンパイルすると、
skipping incompatible /usr/local/lib/libthrift.so when searching for -lthrift
そこで、このガイドを使用して armhf 互換の libthrift.so をコンパイルするように thrift を構成しようとしたので、bash で:
./configure CXX=arm-linux-gnueabihf-g++ CC=arm-linux-gnueabihf-gcc --prefix=/BBB/thrift --host=arm-linux-gnueabihf --with-cpp CFLAGS="-g -O2 -I$DIR/include" LDFLAGS="-L$DIR/lib
しかし、私は得ました:
checking for libevent >= 1.0... configure: error: in 'home/xic/thrift-0.9.0': configure: error: cannot run test program while cross compiling
そのため、 libeventを正常にコンパイルしましたが、それでも機能しません。リサイクルショップを調べてみるとconfig.log
、なるほど
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
どうやらフレックスもクロスコンパイルする必要があります。これは本当にこれを行うための最良の方法ですか、それともより高速/簡単な方法はありますか?
ps。armhf を使用する Beaglebone Black のクロスコンパイルを行っています。