[zeromq-dev] Publish/subscribe example "Operation not supported by device"

Michael Glaesemann grzm at seespotcode.net
Tue Apr 6 05:59:51 CEST 2010


I'm trying out 0MQ on Mac OS X 10.6.3. I've installed 0MQ 2.0.6 (beta).
I've pulled the jzmq bindings from git (http://github.com/sustrik/jzmq) and made some slight modifications to get them to build:

$ git diff
diff --git a/autogen.sh b/autogen.sh
index 2b954af..51b70f8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -26,7 +26,7 @@ if  [ $? -ne 0 ]; then
    exit 1

-libtool --version > /dev/null 2>&1
+command -v libtool > /dev/null 2>&1
if  [ $? -ne 0 ]; then
    echo "Could not find libtool, libtool.m4 macro is probably not installed."
diff --git a/configure.in b/configure.in
index ab7083d..6d43df7 100644
--- a/configure.in
+++ b/configure.in
@@ -104,6 +104,9 @@ case "${host_os}" in
        CPPFLAGS="$CPPFLAGS -I${JAVA_HOME}/include/linux"
+    *darwin*)
+        CPPFLAGS="$CPPFLAGS -I${JAVA_HOME}/include/"
+    ;;
        AC_MSG_ERROR([don't know how to find jni_md.h on this platform])

I'm trying out the Publish/subscribe example from the documentation. <http://www.zeromq.org/area:docs-v20#toc3>

$ javac -cp /Users/grzm/Desktop/lisp/clj/src/maid/lib/Zmq.jar publisherApp.java 
$ java -Djava.library.path=/usr/local/lib -cp /Users/grzm/Desktop/lisp/clj/src/maid/lib/Zmq.jar:. publisherApp
Exception in thread "main" java.lang.Exception: Operation not supported by device
	at org.zmq.Socket.bind(Native Method)
	at publisherApp.main(publisherApp.java:12)

I'm pretty new to Java as well. I've grepped both the 0MQ and the jzmq source for the string "Operation not supported by device" in an attempt to figure out what exactly that error means, but didn't find them. I suspect it's ENODEV, but I'm not quite sure where to go from here.

What am I doing wrong? Any help or suggestions appreciated.

Michael Glaesemann
grzm seespotcode net

More information about the zeromq-dev mailing list