zeromq / jzmq

Java binding for ZeroMQ
http://www.zeromq.org
GNU General Public License v3.0
590 stars 364 forks source link

Which version of jzmq should be used for zeromq 4.1.4 #440

Open jivk opened 8 years ago

jivk commented 8 years ago

Hi we are using zeromq version 4.1.4 in the C++ components of our System and wish to use this same version for Java. However, we are not sure how the version scheme for the zeromq and jzmq is supposed to work.

When I built (Linux) the HEAD of the master branch a few days ago, it produced all the expected artifacts. The version number assigned was 3.1.1-SNAPSHOT as that is what appears in the pom. However, we are unsure what the compatibility constraints are for the jni library. Allthough the maven package step produces a JAR containing the JNI native library, jzmq, this is also installed by the make step when you run the native build steps but no version number seems to be assigned.

Does the major version number of jzmq have to match the major number of zeromq to ensure compatibility? The most recent release of jzmq is 3.1.0 but we don't think this one is compatible with zeromq version 4.1.4 when compiling for Windows. We are likely to drop support for Windows and move to pure Linux only but would still like a definitive answer on compatibility.

Our preference is to use a released version of jzmq rather than build from source. This leads to the following questions:

  1. It has been a long time since this product was last release; when can you package/release version 3.1.1?
  2. jcenter contains only the Java binaries of version 3.1.0 . Where can I find the Linux distribution for this same version? We do not want to have to build the native code from source but obtain the Java code from an officeal release repo as that would be asymmetric.
trevorbernard commented 8 years ago

JZMQ and libzmq have independent version numbers.

  1. Historically, I have been the release manager for JZMQ and we release when there is sufficient interest from the community.
  2. Central should include a binary with the libjzmq.so shared lib, but it's only for linux.
jivk commented 8 years ago

Thanks for the reply Trevor.

  1. :+1:
  2. I've found it via jcenter now - it did not come up in the search I originally did.
sjlnk commented 8 years ago

JZMQ and libzmq have independent version numbers.

What if I build JNI parts using one version of libzmq and then run using another version of libzmq? I suppose this should not be done, right?

jivk commented 8 years ago

That does sound rather dodgy since you won't be able to guarantee the two are binary compatible.

jivk commented 8 years ago

@trevorbernard could you please let me know which libzmq version that libjzmq 3.1.0 is binary compatible with?

trevorbernard commented 8 years ago

It's compatible with with libzmq 3.2.x and above

jivk commented 8 years ago

@trevorbernard does that mean even where major version of libzmq is 4? I believe we tried to use 3.1.0 libjzmq against 4.1.4 libzmq and it didn't work.

trevorbernard commented 8 years ago

Have you tried the latest master? If it does work, then it's unfortunately it's a bug somewhere in 3.1.0

jivk commented 8 years ago

Yes, the HEAD code in master branch is fine. According to my colleague, version 3.1.0 of jzmq-jni does not build against version 4.1.4 of libzmq.

Therefore in the absence of a version 3.1.1, we need to build/package ourselves based on HEAD. So what I'm planning to do is take a fork of the repo into my organization and then build the HEAD. When the artifacts are confirmed as good we will set version numbers appropriately and then rebuild. This gives us framework for repeatable builds and to push the artefacts from those builds to our organization's artifact repo (JFrog).

Looking forward to any better suggestions.

trevorbernard commented 8 years ago

Would you be interested in become a maintainer and creating the new release yourself?

jivk commented 8 years ago

Hi @trevorbernard - potentially, although I'm not sure as I don't really know what that being maintainer means.

trevorbernard commented 8 years ago

It's all defined in the C4 rfc.

jivk commented 8 years ago

I read the doc, let me have a think. I couldn't make out how much coordination I would need to do in order to create a new release. I'm working under some immediate project pressures so need to manage my time effectively.

paulvi commented 7 years ago

yes, an on-boarding new dependency that has to be build manually for all OSes we use, is the lest effective time spending for Java team.

omaralvarez commented 7 years ago

Any news on this? I am trying to run 4.2.2 and getting the following error:

java.lang.UnsatisfiedLinkError: /tmp/libjzmq-3808439845432288388.lib: libzmq.so.3: cannot open