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

Cannot cross-compile to x86_64-pc-windows-gnu #372

Open
TabulateJarl8 opened this issue Apr 8, 2023 · 2 comments
Open

Cannot cross-compile to x86_64-pc-windows-gnu #372

TabulateJarl8 opened this issue Apr 8, 2023 · 2 comments

Comments

@TabulateJarl8
Copy link

Hey! I am trying to cross-compile a program using zmq to x86_64-pc-windows-gnu on Arch Linux. I get errors that it can't find libraries such as sys/socket.h, netdb.h, sys/socket.h, sys/epoll.h, and SOCKET. I had installed the mingw version of libzmq, and I tried to point to it with the arguments PKG_CONFIG_PATH=/mingw64/lib/pkgconfig/ PKG_CONFIG_ALLOW_CROSS=1, but that didn't fix anything. How do I solve this problem?

@TabulateJarl8
Copy link
Author

Since this repository seems to be lacking activity, I switched to nanomsg with these Rust bindings

@AgentRev
Copy link

It appears that the zeromq-src library relied upon by zmq-sys is not that well adapted for cross-compilation. I had the same errors when compiling on Windows using MinGW, and it required applying some fixes to this file; under the target.contains("windows") section, I commented out the wepoll stuff and build.define("ZMQ_HAVE_IPC", "1"); then added build.define("ZMQ_HAVE_WINDOWS", "1");. This allowed me to successfully compile via MinGW with MSYS2.

I'm not exactly sure why zmq doesn't try to dynamically link libzmq first before attempting to compile ZeroMQ from source. It seems that was the case up to v0.9, but no longer in v0.10.

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