-
Notifications
You must be signed in to change notification settings - Fork 163
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
ZMQ version mismatch #126
Comments
also note: I have tried this on every possible machine I have available here. All ubuntu machines. same outcome.
|
Do you have experimental repositories added to your apt-get? Here is my run with Xenial (in Docker) with Go installed, but without ZeroMQ:
|
my
so to answer your question:
no as you can see above, I am only using one repository. and that is the official zmq repository hosted on opensuse. also: if we run
is what you once told me in another issue #124. so in this example, we should find version 4.2.3 in the header file, right? let's see. so if I check that header file for version info I see the following:
if I can't find any package referencing version 4.2.4 on my system. I think you should be able to reproduce my outcome if you follow the bash invocations of my opening post. |
also, when I do what you did: running the version example in this repository, I get the following output:
|
Why are you downloading from opensuse on Ubuntu?
You need libzmq3-dev, not libczmq-dev |
because the ubuntu packages are too old for my application. I need at least version >4.2. ubuntu by default comes with version 4.1.
but libzmq3-dev is installed as I have shown in the previous comments:
the only difference is, that my version of libzmq3-dev is newer than yours (because you are using the ubuntu repos. I am using zmq's official repos, providing me with >4.2v). |
I just did what you did. I removed the opensuse from my repos and installed zmq from ubuntu. only libzmq3-dev. now I get the following error when building my application:
so if you want to know the reason why I need to use version >4.2v of zmq. I am using curve zmq. which ubuntu does not provide. ubuntu packages are too old.
this is the header file with ubuntu's packages. |
oh pebbe, look what I've found:
|
I have found another zmq.h header file in /usr/local/include. I guess this is coming from back then when I was building zmq from source (I had indeed built zmq version 4.2.4 once back then). so it ended up in /usr/local/include. the package repos place the header file in /usr/include instead. so what does this mean for
if so, then it is my fault for placing another header file there with v4.2.4 into /usr/local/include which takes precedence over /usr/include. |
I don't know the internals of how the C toolchain works. but I guess pkgconfig and the like have contributed to this. so basically the zmq.h in /usr/local/include was reported to pebbe/zmq4 during after removing the zmq.h file in /usr/local/include and having the zmq.h file in /usr/include placed by the opensuse repo, now it works. I no more get the error:
thank you pebbe for helping me find the right path. thanks. |
With
If these commands don't list a path to the header or library files, then it's up to the build system to find the right location. If By the way, when I build a curve application on Xenial, it works fine:
Perhaps you need to install the package |
Ah, I see you have |
yes. I had installed libsodium already. but the error occured because when I switched to ubuntu packages I still had this one header file located in /usr/local/include stating version 4.2.4. and I guess version 4.2.4 was then incompatible with the libsodium version I already installed from the ubuntu repos for testing. so it was this one zmq.h in /usr/local/include messing up everything.
so basically this happened, yes.
this is an important information to me. so maybe I don't need v4.2 at all to run my application, which would make things a little bit more easier. for example, distribution of binaries or deployments, since I am not depended on the opensuse repository anymore. thanks for that. I am happy that everything works now. |
~$ grep VERSION /usr/include/zmq.h ~$ grep VERSION /usr/local/include/zmq.h zmq4 was installed with ZeroMQ version 4.1.4, but the application links with version 4.2.5 |
Hi pebbe,
I am inclined to say that something is broken with the way pebbe/zqm4 is checking for zmq lib versions or I am really overlooking something here. any help is appreciated.
please have a look at this. I will give you the whole workflow I do here.
let's start with a clean go environment:
so far so good. zmq4 is missing libzmq package. which is right. because I have none installed yet.
so let's do that:
notice that I am downloading from official zmq repository for debian9.0/ubuntu like said on http://czmq.zeromq.org/page:get-the-software
now let's check if we really have no libzmq libs installed:
now let's install libczmq-dev finally:
check again:
5.1.3 stands for version 4.2.3 here.
now let's see what pkgconfig would say to pebbe/zmq4 if pebbe/zmq4 were to ask for it when we go get this repository:
notice: it says you will find the libzmq packages/libs in
/usr/lib/x86_64-linux-gnu/
with version4.2.3
.so far so good. let's continue to go get this repository finally:
worked. now let's continue to build our go application:
worked.
now let's run the just created binary:
so at first sight, it seems to work. but that's just an illusion. this is only
flags
doing it's job and returning due to missing arguments. we never really ran the app. so now let's give the application some working cli arguments to see what really happens:there you go. the app does not start because it's complaining about zmq.
now here is my question:
How can this even be? As you can see we installed libczmq version 4.2.3. and all it's dependencies for version 4.2.3. Why should this ever happen that
zmq4
is thinking we had version 4.2.4 during the time we rango get github.com/pebbe/zmq4
? You see what pkgconfig said which version we have installed and I assume that is the same informationzmq4
is getting.so where does version 4.2.4 come from?
thanks.
The text was updated successfully, but these errors were encountered: