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

Linking problem related to libzmq.so and libsodium.so #4363

Open
lano1106 opened this issue Aug 26, 2021 · 3 comments
Open

Linking problem related to libzmq.so and libsodium.so #4363

lano1106 opened this issue Aug 26, 2021 · 3 comments

Comments

@lano1106
Copy link

I get the following output when compiling the project: v0.17.0.3

CXXLD dashd /usr/bin/ld: /usr/lib64/libzmq.so: undefined reference to symbol 'sodium_free' /usr/bin/ld: /usr/lib/libsodium.so.23: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [Makefile:4886: dashd] Error 1

Does anyone has seen this before?
I'll try to compile myself libsodium. I suspect that maybe some optional C++ support is missing from the official package.

Worse-case scenario.
What ZeroMQ is used for inside dashcore?
Is this coming from bitcoin?
ie: A different comm channel to essentially send requests that are ordinarily sent through the JSON-RPC interface?

I suspect that if I'm not sure what ZeroMQ is for, there is a good chance that I can disable it with no undesirable side-effect...

What version of Dash Core are you using?

self-compiled

Machine specs:

  • OS: Linux kernel 5.12.19. ArchLinux
  • CPU: Sandybridge
  • RAM: 32 GB
@lano1106
Copy link
Author

lano1106 commented Aug 26, 2021

DSO = Dynamic Shared Object

So my understanding is that -lsodium is missing in the linking cmdline...

From the libzmq pkgfile, there seems to be few more libs required beside lzmq...

`
$ cat /usr/lib/pkgconfig/libzmq.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libzmq
Description: 0MQ c++ library
Version: 4.3.4
Libs: -L${libdir} -lzmq
Libs.private: -lstdc++ -lpthread -lrt
Requires.private: libsodium openpgm-5.3 >= 5.3
Cflags: -I${includedir}
`

I'm not very good with autogen/automake/libtool scriptings...

I have tried to override ZMQ_LIBS to be set with: "-lzmq -lsodium" before executing configure.

For some weird reason, ZMQ_LIBS in the root Makefile and src/Makefile stays to the default value "-lzmq"...

I did manually edit the Makefiles, no difference. I get the same error message. It is kinda frustrating to not see the full cmdline used to link the exec. I'm not sure exactly what is masking this in the output. I suspect that it is libtool...

I guess that there is cmdline option to turn the make process more verbose to make the debugging easier to do...

Bottomline, I just thrown the towel there... I am just going to disable-zmq in my build...

If there are some autogen/automake/libtool guru out there, you can bring in your suggestions. I'll be able to help to fix this annoying building glitch...

@lano1106
Copy link
Author

I got the same issue with building dashd binary. However, I have succeeded fixing it by setting LIBS var to "-lsodium"

@PastaPastaPasta
Copy link
Member

I don't think any of us here use arch, so it's possible there are issues with building on arch, and we would support getting patches to fix those. Disabling ZMQ won't cause any issues, unless you plan to use ZMQ (zmq is useful for getting a 'notification' whenever an 'event' happens, we use it for blocks and transactions and the like. (See https://github.com/dashpay/dash/blob/master/doc/zmq.md for more info about zmq)

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