我正在尝试为Android构建ltrace。我遵循了以下命令:
export SYS_ROOT="/home/pedro/Android/Sdk/ndk-bundle/platforms/android-19/arch-x86"
export CC="/home/pedro/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-gcc --sysroot=$SYS_ROOT"
export PATH="/home/pedro/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/:$PATH"然后:
./configure --host=i686-linux但是我收到了这个错误:
checking gelf.h usability... no
checking gelf.h presence... no
checking for gelf.h... no
configure: error: *** libelf.h or gelf.h not found on your system我也尝试过:
./configure --host=i686-linux --with-libelf=/usr/local并接收到:
checking gelf.h usability... no
checking gelf.h presence... yes
checking for gelf.h... no
configure: error: *** libelf.h or gelf.h not found on your system我在这里发现了一个类似/相同的问题,ltrace for Android build,但由于没有人回复,而且是几个月前,我再次提出了这个问题。我希望没有问题。有没有人可以帮我解决这个问题,或者用另一种方法,让我可以为Android构建ltrace?谢谢。
发布于 2016-08-17 23:31:55
ltrace依赖于libelf。这意味着您还需要为Android交叉编译libelf,并使用--with-libelf将ltrace构建指向交叉编译的libelf。当您指定--with-libelf=/usr/local时,将把ltrace构建指向为您的主机构建的libelf版本。
https://stackoverflow.com/questions/38985924
复制相似问题