Discussion:
Error: unknown argument: '-mandroid'clang: when cross-compiling openssl for android64-aarch64
Paul Kalebu
2018-07-20 01:02:14 UTC
Permalink
I'm following the attached reference guide to cross-compile Amazon AVS for
an android64-aarch64 device. I run the following command to configure (as
similarly done at the end of page 5 in the guide):

../../../../Libraries/ThirdParty/openssl/Configure android64-aarch64 -DARCH=arm64
-DCROSS_COMPILE=${TOOLCHAIN_HOST}- -DMACHINE=aarch64 -DSYSTEM=android no-asm
no-comp no-dso no-dtls no-engine no-hw no-idea no-nextprotoneg no-psk no-shared
no-srp no-ssl3 no-weak-ssl-ciphers --prefix=${INSTALL_TARGET} --openssldir=$
{INSTALL_TARGET}/ssl -D_FORTIFY_SOURCE=2 -fstack-protector-strong

When I run
make all - 4

I get the following error:
clangclangclang: : : error: unknown argument: '-mandroid'clang:
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/aes/aes_core.o] Error 1
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: Leaving directory
`/Users/pkalebu/Dropbox/Akruta/Voice/alexa/android_workplace/BUILD/android-26/arm64-v8a/openssl'
make: *** [all] Error 2

I am unsure what I'm doing wrong, or how to go about fixing it.

Has anyone successfully cross-compiled openssl for android64-aarch64?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Memo Rodriguez
2018-07-20 01:14:10 UTC
Permalink
hi

I ran into the same issue when building for armv7 (openssl-1.0.2o with
ndk17), I remember I removed that argument from a configuration file. I
believe that the argument is gcc specific

thx
Memo
Post by Paul Kalebu
I'm following the attached reference guide to cross-compile Amazon AVS for
an android64-aarch64 device. I run the following command to configure (as
../../../../Libraries/ThirdParty/openssl/Configure android64-aarch64 -
DARCH=arm64 -DCROSS_COMPILE=${TOOLCHAIN_HOST}- -DMACHINE=aarch64 -DSYSTEM=android
no-asm no-comp no-dso no-dtls no-engine no-hw no-idea no-nextprotoneg no-psk
no-shared no-srp no-ssl3 no-weak-ssl-ciphers --prefix=${INSTALL_TARGET} --
openssldir=${INSTALL_TARGET}/ssl -D_FORTIFY_SOURCE=2 -fstack-protector-
strong
When I run
make all - 4
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/aes/aes_core.o] Error 1
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: Leaving directory
`/Users/pkalebu/Dropbox/Akruta/Voice/alexa/android_workplace/BUILD/android-26/arm64-v8a/openssl'
make: *** [all] Error 2
I am unsure what I'm doing wrong, or how to go about fixing it.
Has anyone successfully cross-compiled openssl for android64-aarch64?
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CANRwJTGPE-g39tEc-XAT0-jcvER4Otz7QK4Px-Mv9rqScgXhew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Paul Kalebu
2018-07-20 02:20:41 UTC
Permalink
Great, which configuration file exactly do you mean?
Post by Memo Rodriguez
hi
I ran into the same issue when building for armv7 (openssl-1.0.2o with
ndk17), I remember I removed that argument from a configuration file. I
believe that the argument is gcc specific
thx
Memo
Post by Paul Kalebu
I'm following the attached reference guide to cross-compile Amazon AVS
for an android64-aarch64 device. I run the following command to configure
../../../../Libraries/ThirdParty/openssl/Configure android64-aarch64 -
DARCH=arm64 -DCROSS_COMPILE=${TOOLCHAIN_HOST}- -DMACHINE=aarch64 -DSYSTEM
=android no-asm no-comp no-dso no-dtls no-engine no-hw no-idea no-nextprotoneg
no-psk no-shared no-srp no-ssl3 no-weak-ssl-ciphers --prefix=${
INSTALL_TARGET} --openssldir=${INSTALL_TARGET}/ssl -D_FORTIFY_SOURCE=2 -
fstack-protector-strong
When I run
make all - 4
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/aes/aes_core.o] Error 1
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: Leaving directory
`/Users/pkalebu/Dropbox/Akruta/Voice/alexa/android_workplace/BUILD/android-26/arm64-v8a/openssl'
make: *** [all] Error 2
I am unsure what I'm doing wrong, or how to go about fixing it.
Has anyone successfully cross-compiled openssl for android64-aarch64?
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/f6c323f0-e525-4889-83b3-d930710f4d5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paul Kalebu
2018-07-20 03:13:07 UTC
Permalink
Looks like it worked! But now I'm getting another error saying:

ld: symbol(s) not found for architecture x86_64

Did you happen to come across this as well?
Post by Memo Rodriguez
hi
I ran into the same issue when building for armv7 (openssl-1.0.2o with
ndk17), I remember I removed that argument from a configuration file. I
believe that the argument is gcc specific
thx
Memo
Post by Paul Kalebu
I'm following the attached reference guide to cross-compile Amazon AVS
for an android64-aarch64 device. I run the following command to configure
../../../../Libraries/ThirdParty/openssl/Configure android64-aarch64 -
DARCH=arm64 -DCROSS_COMPILE=${TOOLCHAIN_HOST}- -DMACHINE=aarch64 -DSYSTEM
=android no-asm no-comp no-dso no-dtls no-engine no-hw no-idea no-nextprotoneg
no-psk no-shared no-srp no-ssl3 no-weak-ssl-ciphers --prefix=${
INSTALL_TARGET} --openssldir=${INSTALL_TARGET}/ssl -D_FORTIFY_SOURCE=2 -
fstack-protector-strong
When I run
make all - 4
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
error: unknown argument: '-mandroid'
make[1]: *** [crypto/aes/aes_ecb.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [crypto/aes/aes_core.o] Error 1
make[1]: *** [crypto/aes/aes_cfb.o] Error 1
make[1]: *** [crypto/aes/aes_cbc.o] Error 1
make[1]: Leaving directory
`/Users/pkalebu/Dropbox/Akruta/Voice/alexa/android_workplace/BUILD/android-26/arm64-v8a/openssl'
make: *** [all] Error 2
I am unsure what I'm doing wrong, or how to go about fixing it.
Has anyone successfully cross-compiled openssl for android64-aarch64?
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/48815f73-e58d-41d1-83c4-7ad4e75836e2%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/13730c55-0809-469f-ac55-621fcb1e0304%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...