Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

host MacOS failed build for android NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124. #119

Open
Kanfudza opened this issue Jun 4, 2021 · 3 comments

Comments

@Kanfudza
Copy link

Kanfudza commented Jun 4, 2021

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

@vgorloff
Copy link
Owner

vgorloff commented Jun 4, 2021

You can look on issue #105. Maybe that will help somehow.

@Kanfudza
Copy link
Author

Kanfudza commented Jun 4, 2021

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

@vgorloff
Copy link
Owner

vgorloff commented Jun 8, 2021

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.

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

No branches or pull requests

2 participants