[zeromq-dev] Android UnsatisfiedLinkError

jonas.adler at epiq.se jonas.adler at epiq.se
Thu Aug 23 10:39:15 CEST 2012


I worked on getting zmq working on android using jeromq today, and i got
it working perfectly with no issues using the latest sources from git
("tcp://els-mifr-00:61723"). Simply add the sources to a android project
and compile, worked on second try (forgot internet permissions on first,
doh).

I highly recommend trying this if you have had issues using the java
bindings...

> Yes you're right... I'm finally quite tired with those incompatibilities,
> version numbering, configure script tricks and such... I'll be happy to
> use
> jeromq with Android; if you can report your findings on the wiki, I'll
> really be happy !
>
> regards,
>
> On Tue, Aug 21, 2012 at 5:25 PM, Will Heger <will.heger at gmail.com> wrote:
>
>> Thank you for the fast response Victor.   I saw something similar to
>> this
>> in an ffmpeg ndk linking problem, so yes, I will fiddle with it and
>> report
>> back my findings.
>>
>> I'm in over my head with ndk, so if I'm unsuccessful I'll probably try
>> to
>> switch to the all Java (jeromq) version that was just posted and report
>> how
>> that goes for anyone who might want to skip the shared object.
>>
>> Best regards,
>> -Will
>>
>>
>> On Tue, Aug 21, 2012 at 11:09 AM, Victor Perron
>> <victor at iso3103.net>wrote:
>>
>>> Dear Will,
>>>
>>> I recall having had some issues with unresolved C++ symbols. The issue
>>> is
>>> that depending on the Android OS version, it may be embedded different
>>> versions of the libstdc++ also. I thought that using my method (
>>> --enable-static --disable-shared configure line ) did actually
>>> statically
>>> import those symbols into the final binary; since you're one of the
>>> first
>>> to report this since a long time.
>>>
>>> I can't test that on Android 2.3.5 unfortunately, but both versions
>>> have
>>> been tested on AOSP 4.0+ and 2.3.7 without much issues.
>>> I've seen kind of a fix for the same issue, could you try it ?
>>>
>>> Here is the link :
>>> http://stackoverflow.com/questions/6224163/android-ndk-r5b-external-build-and-supc-link-problem
>>>
>>> If that doesn't solve the issue, I'll take a look, but that could take
>>> some time since I'm quite busy atm.
>>>
>>> Best regards,
>>>
>>> On Tue, Aug 21, 2012 at 4:37 PM, Will Heger <will.heger at gmail.com>
>>> wrote:
>>>
>>>> When deploying to both a Motorola Photon (2.3.5) and Galaxy Player 4.0
>>>> (also 2.3.5 android) I get an error like this in my zmq.jar/libjzmq.so
>>>> linked project.
>>>>
>>>> Caused by: java.lang.UnsatisfiedLinkError: Cannot load library:
>>>> reloc_library[1312]: 80 cannot locate '__cxa_begin_catch'...
>>>> Full trace is here:
>>>> http://pastebin.com/0ZXY1hwE
>>>>
>>>>
>>>> The jar and so were built by following these instructions:
>>>> http://www.zeromq.org/build:android#toc2 (3.x)
>>>>
>>>> I noticed no problems during make.
>>>>
>>>> They are included in the project this way:
>>>> ./libs/armeabi
>>>> ./libs/armeabi/libjzmq.so
>>>> ./libs/zmq.jar
>>>>
>>>>
>>>> The jar was compiled with Sun/Oracle Java 6 (something I had wrong the
>>>> first time with 1.7) on a Debian machine via Eclipse.  Moving the
>>>> libjzmq.so somewhere wrong (or into a jni folder with an Android.mk
>>>> file)
>>>> threw the same exception but with a "can't locate file" value, so I
>>>> believe
>>>> the app is finding the .so file correctly in the above pastebin'd
>>>> error.
>>>>
>>>> Thanks in advance, any help is greatly very appreciated.
>>>>
>>>> Best regards,
>>>> -Will
>>>>
>>>>
>>>> _______________________________________________
>>>> zeromq-dev mailing list
>>>> zeromq-dev at lists.zeromq.org
>>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Victor
>>>
>>>
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>
>
>
> --
> Victor
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>




More information about the zeromq-dev mailing list