Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3 #168

Open
sea-erkin opened this issue Nov 17, 2020 · 2 comments

Comments

@sea-erkin
Copy link

I'm struggling to resolve the error I received above running tests for zmq4 or when trying to use the zmq.Newsocket function. I've tried to clear everything out and re-install but still receive the version 4.2.5 link error.

First I clear out any references to old code
rm -rf $GOPATH/src/github.com/pebbe/
rm -rf $GOPATH/pkg/mod/github.com/pebbe/
rm -rf $GOPATH/pkg/linux_amd64/github.com/pebbe/

Install zeromq package for Arch which provides libzmq
pacman -Q zeromq shows zeromq 4.3.3-2

Check libzmq

pkg-config --modversion libzmq
4.3.3
ls -la /usr/lib64/libzmq.*
-rw-r--r-- 1 root root 2445914 Sep 17 09:31 /usr/lib64/libzmq.a
lrwxrwxrwx 1 root root      15 Sep 17 09:31 /usr/lib64/libzmq.so -> libzmq.so.5.2.3
lrwxrwxrwx 1 root root      15 Sep 17 09:31 /usr/lib64/libzmq.so.5 -> libzmq.so.5.2.3
-rwxr-xr-x 1 root root  739144 Sep 17 09:31 /usr/lib64/libzmq.so.5.2.3

Install zmq4
go get github.com/pebbe/zmq4

Run tests

cd $GOPATH/src/github.com/pebbe/zmq4/ && go test

--- FAIL: TestAuthStart (0.00s)
    auth_test.go:44: AuthStart: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestSocketEvent (0.00s)
    socketevent_test.go:58: NewSocket: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestVersion (0.00s)
    zmq4_test.go:21: Expected major version 4, got 0
--- FAIL: TestMultipleContexts (0.00s)
    zmq4_test.go:59: NewContext: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestAbstractIpc (0.00s)
    zmq4_test.go:254: NewSocket: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestConflate (0.00s)
    zmq4_test.go:312: SetIoThreads(1): zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestConnectResolve (0.00s)
    zmq4_test.go:381: NewSocket: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
--- FAIL: TestCtxOptions (0.00s)
    zmq4_test.go:422: GetMaxSockets: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
    zmq4_test.go:425: MaxSockets != MaxSocketsDflt: 0 != 1023
    zmq4_test.go:430: GetIoThreads: zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
    zmq4_test.go:433: IoThreads != IoThreadsDflt: 0 != 1
    zmq4_test.go:438: GetIpv6 1: expected false <nil>, got false zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
    zmq4_test.go:445: GetIpv6 2: expected true <nil>, got false zmq4 was installed with ZeroMQ version 4.2.5, but the application links with version 4.3.3
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x51f466]

goroutine 15 [running]:
testing.tRunner.func1.1(0x55a020, 0x662bd0)
        /usr/lib/go/src/testing/testing.go:1072 +0x30d
testing.tRunner.func1(0xc00012ca80)
        /usr/lib/go/src/testing/testing.go:1075 +0x41a
panic(0x55a020, 0x662bd0)
        /usr/lib/go/src/runtime/panic.go:969 +0x1b9
github.com/pebbe/zmq4.(*Socket).getInt(0x0, 0x2a, 0x5b10e0, 0xc000046690, 0x2)
        /home/erkin/go/src/github.com/pebbe/zmq4/socketget.go:57 +0x26
github.com/pebbe/zmq4.(*Socket).GetIpv6(...)
        /home/erkin/go/src/github.com/pebbe/zmq4/socketget.go:274
github.com/pebbe/zmq4_test.TestCtxOptions(0xc00012ca80)
        /home/erkin/go/src/github.com/pebbe/zmq4/zmq4_test.go:449 +0x2f2
testing.tRunner(0xc00012ca80, 0x58bcc0)
        /usr/lib/go/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
        /usr/lib/go/src/testing/testing.go:1168 +0x2b3
exit status 2
FAIL    github.com/pebbe/zmq4   0.007s

Go version is go version go1.15.5 linux/amd64

Go env output

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/erkin/.cache/go-build"
GOENV="/home/erkin/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/erkin/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/erkin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build262922974=/tmp/go-build -gno-record-gcc-switches"

Any help is greatly appreciated.

@sea-erkin
Copy link
Author

I was able to resolve my issues by running go build -a main.go although I'm not sure why. Any insight is appreciated.

@ryancurrah
Copy link

Thanks this helped me resolved the same issue! Now I can get some sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants