swift-everywhere-toolchain
swift-everywhere-toolchain copied to clipboard
host MacOS failed build for android NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124.
my build script
export ANDROID_NDK_HOME=../NDK/android-ndk-r21e
OPENSSL_CONFIG=android-arm
OPEN_SSL_INSTALL_PATH=../armeabi-v7a
ANDROID_API=16
UNAME=uname
ANDROID_TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$UNAME-x86_64/bin export PATH=$PATH:$ANDROID_TOOLCHAIN
echo $PATH
./Configure ${OPENSSL_CONFIG} -D__ANDROID_API__=$ANDROID_API no-ui-console no-zlib no-psk no-asm no-shared no-tests --prefix=${OPEN_SSL_INSTALL_PATH}
make
result: Configuring OpenSSL version 1.1.1j (0x101010afL) for android-arm Using os-specific seed configuration
Failure! build file wasn't produced. Please read INSTALL and associated NOTES files. You may also have to look over your available compiler tool chain or change your configuration.
no NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124. make: *** No targets specified and no makefile found. Stop.
perl configdata.pm --dump Can't open perl script "configdata.pm": No such file or directory
in Linux the same script works fine
You can look on issue #105. Maybe that will help somehow.
it is very strage, but i solved my problem when change one line from
export PATH=$PATH:$ANDROID_TOOLCHAIN
to
export PATH=$ANDROID_TOOLCHAIN:$PATH
May be it is conflict with xcode clang I found that whan add to script
echo ""
$ANDROID_TOOLCHAIN/clang --version
echo ""
clang --version
echo ""
and get result
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: ........./NDK/android-ndk-r21e/toolchains/llvm/prebuilt/darwin-x86_64/bin
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Usually you need to prepend custom location into PATH variable.
Thus, the variant export PATH=$ANDROID_TOOLCHAIN:$PATH in most cases is a correct one.