Stream: beginners

Topic: How does one install Roc without installing HomeBrew?


view this post on Zulip Conrad Taylor (Oct 24 2024 at 09:04):

I have downloaded the nightly build of Roc and added it to the PATH. With MacPorts, I installed libzstd, and LLVM 16. When I run roc version, I'm getting the following message:

dyld[76487]: Library not loaded: /opt/homebrew/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <97245E61-AD78-392C-B2CA-DBCBF7429484> /usr/local/roc_nightly-macos_apple_silicon-2024-10-23-71e68f97251/roc
  Reason: tried: '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)

BTW, I have libzstd.1.dylib installed in the following location:

/opt/local/lib  via  v22.8.0
➜ ls -al libzstd.1.dylib
lrwxr-xr-x 1 root 19 Oct  1 20:34 libzstd.1.dylib -> libzstd.1.5.6.dylib

view this post on Zulip Peter Marreck (Oct 24 2024 at 10:42):

I guess the first question might be, what's your LD_LIBRARY_PATH?

view this post on Zulip Luke Boswell (Oct 24 2024 at 11:17):

Does this help at all? https://github.com/roc-lang/roc/issues/6053#issuecomment-1825894329

view this post on Zulip Conrad Taylor (Oct 24 2024 at 13:06):

Luke Boswell said:

Does this help at all? https://github.com/roc-lang/roc/issues/6053#issuecomment-1825894329

I'm going to do a little bit of research by building Roc from the source and creating a MacPorts Portfile for Roc to do the following successfully:

sudo port selfupdate && sudo port install roc
roc version

view this post on Zulip Conrad Taylor (Oct 24 2024 at 13:11):

Peter Marreck said:

I guess the first question might be, what's your LD_LIBRARY_PATH?

I tried setting the LD_LIBRARY_PATH without success.

view this post on Zulip Anton (Oct 25 2024 at 09:25):

#6081 should fix this, I'll try to do that today

view this post on Zulip Anton (Oct 25 2024 at 18:19):

Can you give this release a try @Conrad Taylor? dropbox link
I did assume you're using an apple silicon CPU, let me know if not

view this post on Zulip Conrad Taylor (Oct 25 2024 at 19:34):

@Anton Yes, I'm using an Apple Silicon CPU and will try this later today. Thanks for the quick turnaround.

view this post on Zulip Conrad Taylor (Oct 31 2024 at 18:42):

Anton said:

Can you give this release a try Conrad Taylor? dropbox link
I did assume you're using an apple silicon CPU, let me know if not

I'm still seeing the following issues:

➜ roc version
dyld[18233]: Library not loaded: /opt/homebrew/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <6E6D9644-6CEB-3284-A771-57A228EA639C> /Users/conradwt/Downloads/roc_nightly-macos_apple_silicon-2024-10-25-848a75c55f2/roc
  Reason: tried: '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)
[1]    18233 abort      roc version

view this post on Zulip Anton (Nov 02 2024 at 10:22):

Hmm, I'll set up macports locally so I can test it while I try other fixes

view this post on Zulip Anton (Nov 02 2024 at 14:29):

I'll continue looking for a proper fix but this is a workaround: export DYLD_LIBRARY_PATH="/opt/local/lib:$DYLD_LIBRARY_PATH"

view this post on Zulip Conrad Taylor (Nov 02 2024 at 18:43):

Anton said:

I'll continue looking for a proper fix but this is a workaround: export DYLD_LIBRARY_PATH="/opt/local/lib:$DYLD_LIBRARY_PATH"

This produces a very different set of errors on macOS 15.1 (Sequoia). For example, I'm seeing the following message:

➜ roc version
dyld[3916]: symbol '_CGLSetCurrentContext' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.
dyld[3916]: symbol '_CGLGetCurrentContext' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.
dyld[3916]: symbol '_gll_noop' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.
roc nightly pre-release, built from commit 848a75c55f2 on Fri Oct 25 18:06:08 UTC 2024
dyld[4053]: symbol '_CGLSetCurrentContext' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.
dyld[4053]: symbol '_CGLGetCurrentContext' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.
dyld[4053]: symbol '_gll_noop' missing from root that overrides /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. Use of that symbol in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL is being set to 0xBAD4007.

view this post on Zulip Anton (Nov 02 2024 at 19:02):

Hmmm export DYLD_LIBRARY_PATH="/opt/local/lib:$DYLD_LIBRARY_PATH" may also mess with other things, are you using the default macos terminal?

view this post on Zulip Conrad Taylor (Nov 02 2024 at 19:18):

Anton said:

Hmmm export DYLD_LIBRARY_PATH="/opt/local/lib:$DYLD_LIBRARY_PATH" may also mess with other things, are you using the default macos terminal?

Yes, I'm using the default Apple Terminal app here. I got a partial build of Roc from the source and I'll continue down this path this weekend.


Last updated: Jul 06 2025 at 12:14 UTC