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

Unable to install due to errors in compilation #533

Closed
DonJayamanne opened this issue Nov 25, 2022 · 4 comments · Fixed by #512
Closed

Unable to install due to errors in compilation #533

DonJayamanne opened this issue Nov 25, 2022 · 4 comments · Fixed by #512
Labels

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Nov 25, 2022

Describe the bug
Upon running npm install zeromq@6.0.0-beta.11 I end up getting a whole bunch of errors.

Tested on

  • OS: Mac M1
  • ZeroMQ.js version: 6.0.0-beta.11

I'm assuming this is something to do with a setup at my end, if that's the case please feel free to close this issue.

2022-11-25T10_44_12_769Z-debug-0.log

Here are the logs
205 error          ^
205 error /Users/donjayamanne/temp/sampleJS/node_modules/zeromq/build/libzmq-staging/zeromq-4.3.4/src/object.hpp:149:18: note: overridden virtual function is here
205 error     virtual void process_conn_failed ();
205 error                  ^
205 error In file included from /Users/donjayamanne/temp/sampleJS/node_modules/zeromq/build/libzmq-staging/zeromq-4.3.4/src/stream_listener_base.cpp:34:
205 error In file included from /Users/donjayamanne/temp/sampleJS/node_modules/zeromq/build/libzmq-staging/zeromq-4.3.4/src/zmtp_engine.hpp:44:
205 error /Users/donjayamanne/temp/sampleJS/node_modules/zeromq/build/libzmq-staging/zeromq-4.3.4/src/stream_engine_base.hpp:76:10: warning: 'out_event' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
205 error     void out_event ();
205 error          ^
205 error /Users/donjayamanne/temp/sampleJS/node_modules/zeromq/build/libzmq-staging/zeromq-4.3.4/src/io_object.hpp:73:10: note: overridden virtual function is here
205 error     void out_event () ZMQ_OVERRIDE;
205 error          ^
205 error 2 warnings generated.
205 error ld: library not found for -lsodium
205 error clang: error: linker command failed with exit code 1 (use -v to see invocation)
205 error make: *** [Release/zeromq.node] Error 1
205 error gyp ERR! build error 
205 error gyp ERR! stack Error: `make` failed with exit code: 2
205 error gyp ERR! stack     at ChildProcess.onExit (/Users/donjayamanne/.nvm/versions/node/v16.14.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
205 error gyp ERR! stack     at ChildProcess.emit (node:events:526:28)
205 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
205 error gyp ERR! System Darwin 22.1.0
205 error gyp ERR! command "/Users/donjayamanne/.nvm/versions/node/v16.14.2/bin/node" "/Users/donjayamanne/.nvm/versions/node/v16.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
205 error gyp ERR! cwd /Users/donjayamanne/temp/sampleJS/node_modules/zeromq
205 error gyp ERR! node -v v16.14.2
205 error gyp ERR! node-gyp -v v9.0.0
205 error gyp ERR! not ok
206 verbose exit 1
207 timing npm Completed in 67590ms
208 verbose unfinished npm timer reify 1669373052861
209 verbose unfinished npm timer reify:build 1669373053358
210 verbose unfinished npm timer build 1669373053358
211 verbose unfinished npm timer build:deps 1669373053358
212 verbose unfinished npm timer build:run:install 1669373053362
213 verbose unfinished npm timer build:run:install:node_modules/zeromq 1669373053362
214 verbose code 1
215 error A complete log of this run can be found in:
215 error     /Users/donjayamanne/.npm/_logs/2022-11-25T10_44_12_769Z-debug-0.log
@trasherdk
Copy link

This 205 error ld: library not found for -lsodium indicates you don't have libsodium installed.

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Nov 25, 2022

i have installed it using brew install
do i need to setup some path variables?

@aminya
Copy link
Member

aminya commented Nov 25, 2022

Yeah, adding libzmq to the PATH should fix the issue. Alternatively, wait for #512

@sjlyoung58
Copy link

Just to add my experience on my M1 Pro Macbook Ventura 13.4.1, I appreciate this is a beta, I'm mentioning these extra steps I needed before the install worked

npm install -g cross-env
brew install pkg-config
brew install libsodium
brew install zeromq
brew install cmake

...and then the install worked...

npm install zeromq@6.0.0-beta.17

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

Successfully merging a pull request may close this issue.

4 participants