[zeromq-dev] Android UnsatisfiedLinkError

Will Heger will.heger at gmail.com
Thu Aug 23 17:47:43 CEST 2012


First an update, I tried the 2.2 build from a virgin machine (also Debian
64bit) yesterday.  I encountered strange build problems along the way, I
think automake related, but I was able to copy config/config.sub files from
my original attempt and finally...

I got a working .so and .jar!!!!
I'm sorry to anyone who finds this thread, but I can't yet explain why it
works now.

Second, yeah, I've been posting on Min's jeromq thread.  I wanted to do my
diligence on this thread since I raised the problem AND jeromq is presently
3.2.x I think and it will take time before 2.x compatibility comes through.
 For now, looks like quite a few other language bindings are 2.2 based if
I'm not mistaken.

So here's my question: Can the binaries just be posted?  It's not ideal,
but the .so and .jar are presumably the same for everyone.  The downside is
updating for new ZeroMQ releases, particularly on the 3.x side, but that's
not so frequent.  Combine that with jeromq, and now the android support
page looks like:

Here is the .so and .jar files for 2.2 and 3.3
...and...
Here is how to build them
...and...
Here is a jeromq

Lot of Android support,
-Will



On Thu, Aug 23, 2012 at 4:39 AM, <jonas.adler at epiq.se> wrote:

> 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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120823/4e37eae0/attachment.htm>


More information about the zeromq-dev mailing list