Navigation Menu

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

multiple undefined references (Cygwin) #1639

Closed
nowox opened this issue Nov 10, 2015 · 3 comments
Closed

multiple undefined references (Cygwin) #1639

nowox opened this issue Nov 10, 2015 · 3 comments

Comments

@nowox
Copy link

nowox commented Nov 10, 2015

I am trying to install pyzmq on Cygwin32 or Cygwin64 and I tried this command given here:

$ gcc -shared -o cygzmq.dll -Wl,--out-implib=libzmq.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive .libs/libzmq.a -Wl,--no-whole-archive -lstdc++
.libs/libzmq.a(libzmq_la-ctx.o): In function `zmq::ctx_t::~ctx_t()':
/usr/src/zeromq-4.1.3/src/ctx.cpp:117: undefined reference to `randombytes_close'
/usr/src/zeromq-4.1.3/src/ctx.cpp:117:(.text+0xe83): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `randombytes_close'
...
/usr/src/zeromq-4.1.3/src/curve_server.cpp:547: undefined reference to `crypto_box_afternm'
.libs/libzmq.a(libzmq_la-curve_server.o): In function `zmq::curve_server_t::process_initiate(zmq::msg_t*)':
/usr/src/zeromq-4.1.3/src/curve_server.cpp:421: undefined reference to `crypto_secretbox_open'
/usr/src/zeromq-4.1.3/src/curve_server.cpp:454: undefined reference to `crypto_box_open'
/usr/src/zeromq-4.1.3/src/curve_server.cpp:479: undefined reference to `crypto_box_open'
/usr/src/zeromq-4.1.3/src/curve_server.cpp:496: undefined reference to `crypto_box_beforenm'
.libs/libzmq.a(libzmq_la-zmq_utils.o): In function `zmq_curve_keypair':
/usr/src/zeromq-4.1.3/src/zmq_utils.cpp:202: undefined reference to `crypto_box_keypair'
collect2: error: ld returned 1 exit status

Why do I get undefined references?

@hintjens
Copy link
Member

Try adding -lsodium to the link command

On Tue, Nov 10, 2015 at 11:53 AM, Yves Chevallier notifications@github.com
wrote:

I am trying to install pyzmq on Cygwin32 or Cygwin64 and I tried this
command given here zeromq/pyzmq#113:

$ gcc -shared -o cygzmq.dll -Wl,--out-implib=libzmq.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive .libs/libzmq.a -Wl,--no-whole-archive -lstdc++
.libs/libzmq.a(libzmq_la-ctx.o): In function zmq::ctx_t::~ctx_t()': /usr/src/zeromq-4.1.3/src/ctx.cpp:117: undefined reference torandombytes_close'
/usr/src/zeromq-4.1.3/src/ctx.cpp:117:(.text+0xe83): relocation truncated to fit: R_X86_64_PC32 against undefined symbol randombytes_close' ... /usr/src/zeromq-4.1.3/src/curve_server.cpp:547: undefined reference tocrypto_box_afternm'
.libs/libzmq.a(libzmq_la-curve_server.o): In function zmq::curve_server_t::process_initiate(zmq::msg_t*)': /usr/src/zeromq-4.1.3/src/curve_server.cpp:421: undefined reference tocrypto_secretbox_open'
/usr/src/zeromq-4.1.3/src/curve_server.cpp:454: undefined reference to crypto_box_open' /usr/src/zeromq-4.1.3/src/curve_server.cpp:479: undefined reference tocrypto_box_open'
/usr/src/zeromq-4.1.3/src/curve_server.cpp:496: undefined reference to crypto_box_beforenm' .libs/libzmq.a(libzmq_la-zmq_utils.o): In functionzmq_curve_keypair':
/usr/src/zeromq-4.1.3/src/zmq_utils.cpp:202: undefined reference to `crypto_box_keypair'
collect2: error: ld returned 1 exit status

Why do I get undefined references?


Reply to this email directly or view it on GitHub
#1639.

@nowox
Copy link
Author

nowox commented Nov 10, 2015

Excellent it worked and I was able to build pyzmq and notebook!

@hintjens
Copy link
Member

Great :-)

On Tue, Nov 10, 2015 at 1:47 PM, Yves Chevallier notifications@github.com
wrote:

Excellent it worked and I was able to build pyzmq and notebook!


Reply to this email directly or view it on GitHub
#1639 (comment).

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

No branches or pull requests

3 participants