I have a very basic question concerning the basic-webserver repo (https://github.com/roc-lang/basic-webserver): When I git clone the repo and run the example (roc helloweb.roc) I get this on my MacBook M1:
Legacy linking failed: Failed to find any legacy linking files; I need one of these three paths to exist:
examples/../platform/macos-arm64.a
examples/../platform/macos-arm64.o
examples/../platform/libhost.a
How can I fix this?
You need to build the platform host first before you can run the examples.
I think roc build.roc
should be all you need.
If you use a URL release instead of the platform locally, you wont have this issue.
See https://github.com/roc-lang/basic-webserver/releases/tag/0.9.0
Badically, change the relative reference in the example file and then run it.
Thank you so much, @Luke Boswell , now I understand.
It works fine with the URL now.
If I roc build.roc
, though, I get
── NOT EXPOSED in .../lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE/Arg/Help.roc ─
The Str module does not expose splitOn
:
342│ |> Str.splitOn "\n"
Why is that?
... answering my own question... :sweat_smile:
~~I think my roc command was pointing to an older release of roc (due to a wrong PATH in my .zshrc).
Thanks again!~~ or rather the code depends on an older API,... right?
Johannes has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC