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

Libzmq Android build fails with NDK r27 #4744

Open
benjdero opened this issue Sep 26, 2024 · 1 comment
Open

Libzmq Android build fails with NDK r27 #4744

benjdero opened this issue Sep 26, 2024 · 1 comment

Comments

@benjdero
Copy link
Member

Issue description

Android build fails with latest NDK version r27.

Environment

  • libzmq version (commit hash if unreleased): Latest commit on master 90b4f41
  • OS: Ubuntu 24.04

Minimal test code / Steps to reproduce the issue

  1. Setup Android build environment
  2. Set export NDK_VERSION="android-ndk-r27b"
  3. Run libzmq/builds/android/ci_build.sh

What's the actual result? (include assertion message & call stack if applicable)

Linking fails due to this error:

ld.lld: error: non-exported symbol '__aeabi_uldivmod' in '/tmp/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/18/lib/linux/libclang_rt.builtins-arm-android.a(aeabi_uldivmod.S.o)' is referenced by DSO 'src/.libs/libzmq.so'
ld.lld: error: non-exported symbol '__aeabi_uldivmod' in '/tmp/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/18/lib/linux/libclang_rt.builtins-arm-android.a(aeabi_uldivmod.S.o)' is referenced by DSO 'src/.libs/libzmq.so'
ld.lld: error: non-exported symbol '__aeabi_idiv' in '/tmp/android-ndk-r27b/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/18/lib/linux/libclang_rt.builtins-arm-android.a(divsi3.S.o)' is referenced by DSO 'src/.libs/libzmq.so'
[...]

What's the expected result?

It can be fixed by replacing -lc++_shared by -static-libstdc++ in the LDFLAGS there

I'm not sure if this is the right solution, as it is far beyond my C++ knowledge.

Android NDK r27 changelog mention dropping "unused libclang" (last line of changelog)

This open issue on NDK github page mention reintroducing libclang properly.

What should we do? @bluca @sappo

@rbebb
Copy link

rbebb commented Nov 4, 2024

Just wanted to leave a comment saying that it would be great to have support for NDK 27😄

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