Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unbound variable #36

Open
ZhangKuixun opened this issue Dec 13, 2018 · 9 comments
Open

unbound variable #36

ZhangKuixun opened this issue Dec 13, 2018 · 9 comments

Comments

@ZhangKuixun
Copy link

ZhangKuixun commented Dec 13, 2018

$ sh ./build-openssl4android.sh
./_shared.sh: line 20: 1: unbound variable

if [ "${1}" == "cURL" ]; then // 这是第20行
ANDROID_API=${ANDROID_API:-21}
else
ANDROID_API=${ANDROID_API:-16}
fi
ARCHS=("android" "android-armeabi" "android-x86" "android-mips")
ABIS=("armeabi" "armeabi-v7a" "x86" "mips")

@ZhangKuixun
Copy link
Author

ZhangKuixun commented Dec 13, 2018

我想构建ssl.so动态库,执行命令出错:$ sh ./build-openssl4android.sh 。 error:./_shared.sh: line 20: 1: unbound variable
我使用的是 mac os。构建android ssl.so
@leenjewel

@leenjewel
Copy link
Owner

尾部加个参数

$bash ./build-openssl4android.sh  openssl

@ZhangKuixun
Copy link
Author

ZhangKuixun commented Dec 13, 2018

尾部加个参数

$bash ./build-openssl4android.sh  openssl

还是有错
./_shared.sh: line 30: ANDROID_NDK: unbound variable @leenjewel

@leenjewel
Copy link
Owner

你得用 export 先设置你自己的环境变量,要指明你本机的 NDK 地址,把 NDK 的路径 export 到环境变量 ANDROID_NDK 上面来

@ZhangKuixun
Copy link
Author

ZhangKuixun commented Dec 13, 2018

我的ndk环境变量是配置好了的

@ZhangKuixun
Copy link
Author

ZhangKuixun commented Dec 13, 2018

在_shared.sh文件中需要更改第30行吗?
NDK=${ANDROID_NDK}//源代码
NDK=${ANDROID_NDK}:/Users/zhangkuixun/Library/Android/sdk/ndk-bundle//更改后
@leenjewel

改成这个样子好了:
NDK=${PATH}:/Users/zhangkuixun/Library/Android/sdk/ndk-bundle

#但是又有一个错:

./build-openssl4android.sh: line 25: wget: command not found

@ZhangKuixun
Copy link
Author

./build-openssl4android.sh: line 25: wget: command not found

@leenjewel
Copy link
Owner

用 brew 安装一个 wget

@dourgulf
Copy link
Contributor

dourgulf commented Jun 3, 2019

在build-openssl4android.sh改一下更好

source ./_shared.sh openssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants