pebbe / zmq4

A Go interface to ZeroMQ version 4
BSD 2-Clause "Simplified" License
1.17k stars 163 forks source link

Issue on OSX with Curve support #72

Closed redsofa closed 8 years ago

redsofa commented 8 years ago

I'm having a problem running the ironhouse security example here : https://github.com/pebbe/zmq4/blob/master/examples_security/ironhouse.go

It smokes on line 33 with this error : "operation not supported."

This seems to be related to the Curve support (see details below)

The docs says that Curve is not supported if ZeroMQ version < 4.1.0

See : https://godoc.org/github.com/pebbe/zmq4#HasCurve

I think I have the proper version of ZeroMQ installed.. It's 4.1.4 according to what I see.. Any pointers to help me fix this issue would be very helpful.

Some troubleshooting details :

I'm running on OSX 10.11 (EL Capitain) Issued these commands to get started :

$ brew install pkg-config $ brew install zmq $ go get github.com/pebbe/zmq4

When I run the tests. I get no errors but I get some SKIP notifications : $ go test -v

=== RUN TestAuthStart --- SKIP: TestAuthStart (0.00s) auth_test.go:12: Curve not available etc..

It's telling me Curve is not available, however when I run these commands :

$ brew install zmq

I get this warning... : Warning: zeromq-4.1.4 already installed

$ brew install libsodium I get this warning ... : Warning: libsodium-1.0.8 already installed

Has anyone encountered this already ?

Thanks in advance

redsofa commented 8 years ago

I solved my issue with these commands :

uninstall brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

re-install brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ brew install pkg-config $ brew install libsodium

Download zmq source and configure with libsodium support

$ ./configure --with-libsodium $ make $ make install $ go get github.com/pebbe/zmq4

$ go test -v === RUN TestAuthStart --- PASS: TestAuthStart (0.00s) <---------------------- now runs === RUN TestSocketEvent --- PASS: TestSocketEvent (1.01s)