I’m trying to compile a project which consumes rust-zmq. It compiles fine on Fedora, CentOS and Ubuntu, but won’t compile on OS X or FreeBSD. When I run cargo build I get:
note: /usr/bin/ld: cannot find -lzmq
ZeroMQ is installed and the header file is in /usr/local/include.
I’ve tried modifying Cargo.toml as suggested on Reddit but haven’t got anywhere. My changes are:
[package] links = "zmq" build = "build.rs" [target.x86_64-unknown-freebsd.zmq] rustc-link-search = ["/usr/local/include"] rustc-link-lib = ["zmq"]
This doesn’t make a scrap of difference to the error I’m getting and “/usr/local/include” doesn’t seem to be added to the linker args as it’s supposed to (??). Note that build.rs is blank. I only included it at all because Cargo complained when I didn’t have it specified.
Could it be that OS X and FreeBSD both use Clang while Linux uses GNU?
I’d really appreciate a hand!