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

clang70: error: unknown argument: '-mandroid' #35

Open
diffstorm opened this issue Oct 26, 2018 · 6 comments
Open

clang70: error: unknown argument: '-mandroid' #35

diffstorm opened this issue Oct 26, 2018 · 6 comments

Comments

@diffstorm
Copy link

diffstorm commented Oct 26, 2018

Hello,

I'm compiling openssl for Android on Linux.
I'm getting the following error:

clang70: error: unknown argument: '-mandroid'

I could not find any -mandroid tags in .sh files. How can I remove this from command line?
OR Can you share a recent release for android 32 and 64 bit libraries for latest NDK?

/home/reveng/openssl/openssl_for_ios_and_android/tools/armeabi-android-toolchain/bin/arm-linux-androideabi-gcc  -I. -Icrypto/include -Iinclude -I/home/reveng/openssl/openssl_for_ios_and_android/tools/armeabi-android-toolchain/sysroot/usr/include -DZLIB -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSL_PIC -DOPENSSLDIR="\"/home/reveng/openssl/openssl_for_ios_and_android/tools/libs/armeabi/ssl\"" -DENGINESDIR="\"/home/reveng/openssl/openssl_for_ios_and_android/tools/libs/armeabi/lib/engines-1.1\"" -Wall -O3 -pthread -mandroid -fPIC --sysroot=/home/reveng/openssl/openssl_for_ios_and_android/tools/armeabi-android-toolchain/sysroot -Wa,--noexecstack  -fPIC -DOPENSSL_USE_NODELETE -MMD -MF crypto/aes/aes_ecb.d.tmp -MT crypto/aes/aes_ecb.o -c -o crypto/aes/aes_ecb.o crypto/aes/aes_ecb.c
clang70: error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
clang70: error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
clang70: error: unknown argument: '-mandroid'
clang70: error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** [crypto/aes/aes_core.o] Error 1

@wrcgator
Copy link

wrcgator commented Dec 7, 2018

Anyone resolve this issue?

@tmetn
Copy link

tmetn commented Jan 16, 2019

following

@oncealong
Copy link

latest ndk(r18) compiler tool is clang, and gcc is removed.
Now I am finding how to compile openssl with clang too!

@AsteriskZuo
Copy link
Contributor

AsteriskZuo commented Aug 24, 2019

I had the same question about compile android on mac. I try gcc and clang are error about ‘mandroid’
if [ -z "${CLANG}" ]; then
export CC=${NDK_TOOLCHAIN_BASENAME}-gcc
export CXX=${NDK_TOOLCHAIN_BASENAME}-g++
else
export CC=${NDK_TOOLCHAIN_BASENAME}-clang
export CXX=${NDK_TOOLCHAIN_BASENAME}-clang++
fi;

I use clang80.
if use old compiler is ok?

@AsteriskZuo
Copy link
Contributor

I use one day. I try to solve this problem. I done.
I add code on tools/build-openssl4android.sh
"sed -ie 's/-mandroid//g' "Makefile""
I compile is ok.

I use clang compile .
add code on tools/_shared.sh
"CLANG="TEST""
This is ok.

Look at the branches I fork.

@okeyest
Copy link

okeyest commented Oct 31, 2019

I dropped the version of the ndk to 14b, which can be compiled complete.

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

6 participants