Stream: beginners

Topic: ✔ basic-webserver on MacOs silicon


view this post on Zulip Johannes (Nov 24 2024 at 17:59):

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?

view this post on Zulip Luke Boswell (Nov 24 2024 at 18:28):

You need to build the platform host first before you can run the examples.

view this post on Zulip Luke Boswell (Nov 24 2024 at 18:28):

I think roc build.roc should be all you need.

view this post on Zulip Luke Boswell (Nov 24 2024 at 18:29):

If you use a URL release instead of the platform locally, you wont have this issue.

view this post on Zulip Luke Boswell (Nov 24 2024 at 18:30):

See https://github.com/roc-lang/basic-webserver/releases/tag/0.9.0

view this post on Zulip Luke Boswell (Nov 24 2024 at 18:30):

Badically, change the relative reference in the example file and then run it.

view this post on Zulip Johannes (Nov 24 2024 at 19:11):

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?

view this post on Zulip Johannes (Nov 24 2024 at 19:18):

... 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?

view this post on Zulip Notification Bot (Nov 28 2024 at 08:37):

Johannes has marked this topic as resolved.


Last updated: Jul 06 2025 at 12:14 UTC