libzmq icon indicating copy to clipboard operation
libzmq copied to clipboard

Cannot link libzmq.a on Android Studio (unsupported dynamic reloc R_ARM_REL32)

Open vb-mich opened this issue 5 years ago • 4 comments

Issue description

I successfully built on Linux libzmq for Android following the instructions here, now I'm trying to compile on Windows with Android Studio a shared library linking to it the static build of libzmq. The linker gives me this errors: libzmq/armeabi-v7a/libzmq.a(src_libzmq_la-address.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC libzmq/armeabi-v7a/libzmq.a(src_libzmq_la-ctx.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC

I confirm the static library has been built with fPIC as well as my library I also tried the solution here https://github.com/zeromq/libzmq/issues/2300 with no luck.

Digging on google I found this https://github.com/gavinpugh/vs-android/issues/124 Maybe a bug of Android Studio?

Environment

libzmq built on Ubuntu Linux Android Studio 3.6.3 running on Windows 10 NDK r21 (on both win and linux)

  • libzmq version (commit hash if unreleased): latest

vb-mich avatar Apr 21 '20 11:04 vb-mich

I have experienced this issue as well on Ubuntu 16.04 gcc-8 c++17 libzmq-4.3.2

austinbenincasa avatar Sep 01 '20 18:09 austinbenincasa

I have experienced this issue as well on Ubuntu 16.04 gcc-8 c++17 libzmq-4.3.2

Are you using Android Studio as well?

vb-mich avatar Sep 03 '20 09:09 vb-mich

No, forgot to follow up I had to build libzmq using the following, ./autogen.sh --with-pic then ./configure

austinbenincasa avatar Oct 16 '20 18:10 austinbenincasa

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 18:04 stale[bot]