-
Notifications
You must be signed in to change notification settings - Fork 268
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
NDK: Unified Headers issue #445
Comments
As far as Toxcore goes:
The only way this error is possible is if |
how did you configure your standalone toolchain? looks like you've told the compiler to aim for a recent API level (where these symbols are available) but the linker to aim for an older one (where they were inline references to other symbols). |
I build it using multiple toolchains, each targeting different architectures. It fails for all toolchains I try, while it succeeds with I create a toolchain like this export ANDROID_NDK_HOME=/opt/android-ndk
"$ANDROID_NDK_HOME/build/tools/make_standalone_toolchain.py" --arch $ARCH --api $API --install-dir "$TOOLCHAIN_DIR" --force
arm-linux-androideabi
aarch64-linux-android
x86_64-linux-android
i686-linux-android |
Here is a build log, if it's of any help. |
Ok, specifying Didn't notice this before Using clang instead of gcc also works, e.g. for autotools-based projects |
FYI, |
guys, please clarify how did you make it work with clang because |
@nurupo Can you exemplify how you built it with ndk 15b? |
If I remember it right, using |
THe CFLAGS was needed but I could got it only with a standalone toolchain not the installed NDK by android studio, will try from the scratch later and try with clang |
Standalone toolchains is what I'm using. |
Attempt to fix "undefined reference to 'stdout' by building with clang instead of GCC. ref: android/ndk#445 (comment) Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
No. It does not. We're using a
We added ping @dkhanchopoulo |
Which are you using, a standalone toolchain or CMake? What other flags are you using? How was your toolchain built? What version of the NDK are you using? There isn't nearly enough information here for me to tell you what went wrong. |
@DanAlbert We are using cmake inside of the container https://hub.docker.com/r/lakoo/android-ndk tag cmake .. \
-DCMAKE_ANDROID_API=26 \
-DANDROID_PLATFORM=android-26 \
-DANDROID_DEPRECATED_HEADERS=ON \
-DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-linux/build/cmake/android.toolchain.cmake \
-DANDROID_STL=c++_shared |
If you have a bug to report, file a new one with repro instructions. The bug in this thread was never a bug in the first place. |
Description
Android NDK's unified headers cause compile errors in OpenSSL and TokTok C-Toxcore libraries. This doesn't happen with the deprecated headers.
OpenSSL:
TokTok C-Toxcore:
Environment Details
Not all of these will be relevant to every bug, but please provide as much
information as you can.
make_standalone_toolchain.py
produces)The text was updated successfully, but these errors were encountered: