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
Compilation fails with android ndk r15b #3826
Comments
I suspect that adding "no-stdio" to your configuration should fix things. |
Indeed the "no-stdio" helped with older openssl version. But the 1.1.0f still complains in different place:
|
Have similar issue compiling different software, not openssl. Worked using previous Android NDK versions, but getting ../testing/DHT_test.c:208: error: undefined reference to 'stdin'
../toxcore/DHT.c:2404: error: undefined reference to 'rand'
../toxcore/DHT.c:1626: error: undefined reference to 'rand'
../toxcore/DHT.c:1629: error: undefined reference to 'rand'
../toxcore/DHT.c:1938: error: undefined reference to 'rand'
../toxcore/network.c:548: error: undefined reference to 'srand' using the latest one. Seems likely that something in Android NDK has changed, so probably not openssl issue. @deveee did you find how to fix this? |
Ok, found how to temporary fix it. When creating Android NDK toolchain using The fix is temporary because So if these |
All those undefined references should have nothing to do with headers and everything to do with libraries you're linking with. Is it possible that you need to link with some additional library you haven't specified? |
Got my issue resolved in android/ndk#445 (comment). |
Ok then |
Okay, but it looks that CFLAGS is not easy to set in openssl. And using clang gives another issue...
At least now I know the reason of these issues, thanks. |
Well, as a workaround, you could replace the gcc binary with a bash script file named gcc which calls clang instead. e.g. save #!/bin/sh
$ANDROID_TOOLCHAIN_DIR/arm-linux-androideabi-clang "$@" as If using clang doesn't work because openssl detects that it's clang and tries to use the unsupported #!/bin/sh
$ANDROID_TOOLCHAIN_DIR/arm-linux-androideabi-gcc-original -D__ANDROID_API__=$API "$@" as gcc. Don't forget to set |
Attempt to fix "undefined reference to 'stdout' by passing --deprecated-headers when creating a toolchain. ref: openssl/openssl#3826 (comment) Seems like a temporary fix. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This can compile, I not test yet. Just posting here for reference. CROSS_COMPILE=aarch64-linux-android- CC=clang ../openssl-1.1.0h/Configure --sysroot=/home/weiqi/android-ndk-r17/sysroot --sysroot=/home/weiqi/android-toolchain/sysroot --prefix=$(pwd)/prefix --openssldir=$(pwd)/prefix linux-aarch64 |
Hello guys, Well i have the same problem when i try to "make" openssl with ndk r17b released in june. so anyone know how can i fix this ? rgds |
On a note here: even when My OpenSSL version is 1.1.1b. The macro must be inside the no-stdio check: So i suggest reopening this issue, or i can create a new issue if requested |
I had the same issue.
set |
Here is the error:
I can send full log if you need it.
It was working fine with ndk r12b and r13b that I was using before.
Openssl has been configured with
where HOST=arm-linux-androideabi
Here is the build script that I'm using:
https://github.com/supertuxkart/stk-code/blob/master/android/make.sh
I tested current stable version
1.1.0f
and tbh. I checked only armv7 compilation. I will look how x86 compilation works later.The text was updated successfully, but these errors were encountered: