交叉编译时我得到:
checking whether the /home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-g++ linker (/home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-ld) supports shared libraries... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for cppcheck... no
configure: WARNING: no cppcheck; cppcheck support disabled
checking for stdlib.h... (cached) yes
checking for archive_read_new in -larchive... no
configure: error: libarchive not found
运行时:./configure --host=ppc --build=x86_64 target=ppc --enable-epb2
设置:
export CC=/home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-gcc
export CXX=/home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-g++
export CPP=/home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-cpp
export AS=/home/ekhnshr/epb2/jenkbuild/toolchain/bin/powerpc-linux-gnu-as
我正在 x86 Ubuntu 上工作。
答案1
如果您正在为当前平台进行编译,则需要一个开发包自由档案库:
sudo apt-get install libarchive-dev
但是,如果您是交叉编译,您也许可以通过添加选项来获得合适的包-a
,例如,
sudo apt-get -a=powerpc install libarchive-dev
也可以看看:apt-get 忽略的架构参数,它指出您必须将给定的体系结构添加到 apt 的配置中。