android - 尝试为 android arm64 交叉编译 libnl 时出错
问题描述
我以前使用我的独立 aarch64-linux-android 工具链为我的 android 手机交叉编译项目。
在尝试交叉编译 libnl(3.2.25 和旧版本)时,我在制作时不断收到此错误 -
CCLD nf-ct-list
../src/lib/.libs/libnl-cli-3.so: undefined reference to `getsubopt'
collect2: error: ld returned 1 exit status
我的设置环境 -
#!/bin/bash
# Add the standalone toolchain to the search path.
export PATH=$PATH:/home/john/toolchain-gcc/bin
# Tell configure what tools to use.
target_host=aarch64-linux-android
export AR=$target_host-ar
#export AS=$target_host-gcc
export CC=$target_host-gcc
export CXX=$target_host-g++
export LD=$target_host-ld
export STRIP=$target_host-strip
# Tell configure what flags Android requires.
export CFLAGS="-fPIE -fPIC"
export LDFLAGS="-pie"
据我搜索,我认为 getsubopt 是标准库的一部分。它不是已经包含在我的工具链中了吗?奇怪的是我已经使用我的工具链编译了项目,但是 libnl 失败了。
任何想法如何解决这个问题?:(
解决方案
推荐阅读
- swiftui - 没有披露指示器的 SwiftUI NavigationButton?
- javascript - 更新 Vuex 商店中二维数组中的项目
- c - 如何在risc-v中实现printf函数?
- docker - Stilliard/pure-ftpd:允许其他 docker 容器的 ftp?
- c++ - 这两个中哪一个是实现标头的正确方法?
- c - 父进程在挂起时仍然收到信号
- python - 为什么我的 Python 正则表达式不匹配查询字符串的一部分?
- amazon-web-services - %matplotlib 内联魔术命令无法从 AWS-EMR Jupyterhub Notebook 中的先前单元格读取变量
- javascript - 如何将程序从从 onload 开始更改为从 Space press 开始?
- android - 为什么应用程序的所有本地化都不起作用?