问题描述
这是我经常使用的几个库中的内容.例如,参见:
This has come up on a couple of libraries I work with regularly. See, for example:
- Error SSL archive symbol table (run ranlib)
- no archive symbol table (run ranlib) while building libcryptopp.a through ndk-build
在问题中,用户为OpenSSL和Crypto ++库创建了Android.mk.痛点似乎是用户在源中添加了Android.mk包装器.
In the questions, the users created an Android.mk for the OpenSSL and Crypto++ libraries. The pain point seems to be users adding the Android.mk wrapper to the sources.
在Android之外,每个项目都是基于Makefile的,每个项目都将构建一个静态档案,并且每个项目都将基于该静态档案构建一个共享库.每个项目还在静态档案上运行ranlib
. Crypto ++对ranlib
的需求特别敏感,因为它具有C ++库和一个定义规则违反行为会导致不确定的行为.
Outside of Android, each project is Makefile based, each project builds a static archive, and each project builds a shared object based on the static archive. Each project also runs ranlib
on the static archive. Crypto++ is especially sensitive to the need for ranlib
because its a C++ library and One Definition Rule violations lead to undefined behavior.
使用Android.mk构建静态档案时,如何通过Android.mk在档案上运行ranlib?
When using Android.mk to build a static archive, how do we run ranlib on an archive through Android.mk?
推荐答案
我遇到了类似的问题,并在为我修复了该网站
I was running into similar issues and found a command on this website which fixed it for me
# The -E is important. Root needs some of the user's environment
$ sudo -E make install CC=$ANDROID_TOOLCHAIN/arm-linux-androideabi-gcc RANLIB=$ANDROID_TOOLCHAIN/arm-linux-androideabi-ranlib
这篇关于如何在通过Android.mk构建的存档上运行ranlib?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!