zeromq.node icon indicating copy to clipboard operation
zeromq.node copied to clipboard

Unable to build in OS X

Open vicary opened this issue 11 years ago • 11 comments

I just did npm i zmq and this error is all I've got.

Looks like it has something to do with the linking to libzmq, where should I start?

> node-gyp rebuild

Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
gyp: Call to 'pkg-config libzmq --libs' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/vicary/node_modules/zmq
gyp ERR! node -v v0.10.6
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

vicary avatar Feb 26 '14 07:02 vicary

Try to compile 0MQ before, solve the problem on my mac.

wget http://download.zeromq.org/zeromq-4.0.3.tar.gz tar zxvf zeromq-4.0.3.tar.gz && cd zeromq-4.0.3 ./configure make && make install

stumpyfr avatar Feb 26 '14 10:02 stumpyfr

Do you mean I should build zmq from source in order to have libzmq?

vicary avatar Feb 27 '14 04:02 vicary

yep, just a quick fix, interesting to look why the npm install fails but if you need it immediately...it's possible from source.

stumpyfr avatar Feb 27 '14 07:02 stumpyfr

One similar yet more convenient way to do it on osx is to use homebrew http://brew.sh/. It boils down to brew install zeromq

jorgemsrs avatar Oct 09 '14 10:10 jorgemsrs

That's what I'm trying currently, but I still have the same issue as vicary, though I tried to install via brew.

What am I missing?

SantoDE avatar Oct 10 '14 09:10 SantoDE

By the way, it doesn't make a difference if I install zmq manually or by using brew. It just won't work. I'm rather clueless :/

SantoDE avatar Oct 14 '14 11:10 SantoDE

Hi @SantoDE. can you paste the result of

ls -pal which pkg-config

and

echo $PKG_CONFIG_PATH

thanks

jorgemsrs avatar Oct 14 '14 12:10 jorgemsrs

$ which pkg-config
/usr/local/bin/pkg-config
$ echo $PKG_CONFIG_PATH

I'm able to work with this package in standard node land, this only breaks down for me when trying to set it up with electron/atom-shell.

rgbkrk avatar Apr 30 '15 06:04 rgbkrk

just use node 0.11.13 or whatever weird ass shit they picked as the node version on atom-shell

reqshark avatar Apr 30 '15 07:04 reqshark

I think the latest version of electron uses something like io.js 1.7 + V8 4.2, it should all work.

kkoopa avatar Apr 30 '15 09:04 kkoopa

Oh that's good to hear, so back when I played with it, they must have been using a strange node version and they relabeled it as node 0.13 or something so I was guessing at it as well. That's great they use iojs now and hopefully start to correctly label things

reqshark avatar Apr 30 '15 14:04 reqshark