4

Attempting to build the cardano-node on Mac OS Big Sur while following the instructions found here: https://developers.cardano.org/docs/get-started/installing-cardano-node/#macos

When I hit the cabal build all step I'm given the following error:

[ 14 of 193] Compiling PlutusCore.Pretty.Readable ( plutus-core/src/PlutusCore/Pretty/Readable.hs, dist/build/PlutusCore/Pretty/Readable.o, dist/build/PlutusCore/Pretty/Readable.dyn_o )
<command line>: dlopen(/Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib, 5): Symbol not found: _sodium_free
  Referenced from: /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib
  Expected in: flat namespace
 in /Users/sanfordleach/.cabal/store/ghc-8.10.4/lib/libHScrdn-crypt-clss-2.0.0-a62d56db-ghc8.10.4.dylib

Note: I have the environmental vars. Not sure how to check that libsodium is installed correctly but I ran the steps in the instructions.

Please help? Thank you!

EDIT 1: I see the libsodium files in my /usr/local/lib so I believe it's installed correctly

EDIT 2: At this point I've already created a node on an Ubuntu instance and it's working fine... not sure if its an issue with Mac OS but I recommend doing the same if you run into this issue.

3
  • Do you have a libsodium.so file in your $LD_LIBRARY_PATH (/usr/local/lib)?
    – baocontact
    Oct 22 '21 at 23:28
  • I don't believe I do... is that something that's supposed to happen on the install? Oct 25 '21 at 1:03
  • I see libsodium.23.dylib, libsodium.dylib, libsodium.a, libsodium.la in my /usr/local/lib but not libsodium.so.... libsodium.pc is present in my pkgconfig Oct 25 '21 at 1:23
1

If libsodium.so file is missing from /usr/local/lib, the problem here is that libsodium is not correctly installed on your Mac OS X environment.

0

Did you compile and install libsodium? Did you check environment variable to see that this is added?

1
  • Yep, env vars are there and I ran all of the steps to run libsodium that are in the instructions Oct 22 '21 at 22:51
0

I've been trying to run the leader logs script, which happens to depend on libsodium. I run on OSX and this problem has had me dweling on the same questions many asked above.

If you are using OS, you should use the .dylib files as reference. I've found a few open source examples that opted for a best effor library detection mechanism (see https://github.com/papacarp/pooltool.io/blob/master/leaderLogs/leaderLogs.py#L109), which points to using libsodium.23.dylib for OSX.

Unfortunately, I had an additional problem before being able to run the leaders log. I installed libsodium with brew, which installed the official libsodium project, but the code I needed to run required extra APIs that are only in the IOHK version of the library, so once I downloaded, compiled and installed the source code from this version, everything worked like a charm.

So, a couple of things:

  1. Make sure your configs point to the appropriate path of libdsodium (in OSX /usr/local/lib/libsodium.23.dylib).
  2. Depending on the version you had compiled and installed you might be missing APIs/functions. Check you have the correct version of the library.
New contributor
leonfs is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    18 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.