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

An error occurred while building OpenSSL for Android #2862

Closed
solomode0001 opened this issue Apr 26, 2024 · 5 comments
Closed

An error occurred while building OpenSSL for Android #2862

solomode0001 opened this issue Apr 26, 2024 · 5 comments

Comments

@solomode0001
Copy link

How do I fix this? Please help me.

FM@DESKTOP-ADDG61L MINGW64 ~/Desktop/td-master/example/android
$ ./build-openssl.sh
Downloading OpenSSL sources...
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-arm64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
llvm-ar.exe: warning: creating apps/libapps.a
llvm-ar.exe: warning: creating libcrypto.a
llvm-ar.exe: warning: creating libssl.a
llvm-ar.exe: warning: creating test/libtestutil.a
process_begin: CreateProcess(NULL, aarch64-linux-android21-clang -I. -Iinclude -Iapps -pie -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -ffunction-sections -fdata-sections -U__ANDROID_API__ -DNDEBUG -D__ANDROID_API__=21 -MMD -MF apps/asn1pars.d.tmp -MT apps/asn1pars.o -c -o apps/asn1pars.o apps/asn1pars.c, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [apps/asn1pars.o] Error 2
make: *** [all] Error 2

@levlam
Copy link
Contributor

levlam commented Apr 26, 2024

Did you install a supported Android SDK to the directory SDK using ./fetch-sdk.sh script?

@solomode0001
Copy link
Author

Yes, I use the SDK and OpenSSL that are downloaded through the script.

image

@solomode0001
Copy link
Author

solomode0001 commented Apr 26, 2024

I just redownloaded everything but it's still an error.

image


FM@DESKTOP-ADDG61L MINGW64 ~/Desktop/TD/td/example/android (master)
$ ./check-environment.sh

FM@DESKTOP-ADDG61L MINGW64 ~/Desktop/TD/td/example/android (master)
$ ./fetch-sdk.sh
Downloading SDK Manager...
Installing required SDK tools...
Warning: Errors during XML parse:
Warning: Additionally, the fallback loader failed to parse the XML.
Warning: Errors during XML parse:
Warning: Additionally, the fallback loader failed to parse the XML.

FM@DESKTOP-ADDG61L MINGW64 ~/Desktop/TD/td/example/android (master)
$ ./build-openssl.sh
Downloading OpenSSL sources...
Configuring OpenSSL version 1.1.1t (0x1010114fL) for android-arm64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
makefile:577: target `tags' given more than once in the same rule.
llvm-ar.exe: warning: creating apps/libapps.a
llvm-ar.exe: warning: creating libcrypto.a
llvm-ar.exe: warning: creating libssl.a
llvm-ar.exe: warning: creating test/libtestutil.a
process_begin: CreateProcess(NULL, aarch64-linux-android21-clang -I. -Iinclude -Iapps -pie -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -ffunction-sections -fdata-sections -U__ANDROID_API__ -DNDEBUG -D__ANDROID_API__=21 -MMD -MF apps/asn1pars.d.tmp -MT apps/asn1pars.o -c -o apps/asn1pars.o apps/asn1pars.c, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [apps/asn1pars.o] Error 2
make: *** [all] Error 2

@levlam
Copy link
Contributor

levlam commented Apr 27, 2024

Check that you have the file td/example/android/SDK/ndk/23.2.8568313/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang.

Alternatively, try building using the provided Dockerfile, which should be easier on Windows.

@solomode0001
Copy link
Author

Yes, I have it, but it still errors when running build-openssl.sh
I will try it using Docker

image

@levlam levlam closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
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

2 participants