Stream: beginners

Topic: Error building basic-cli locally


view this post on Zulip Agustin Romero (Dec 05 2024 at 20:11):

first time building a platform locally and getting this error:

~/rockers/aoc/basic-cli roc build.roc
LinkingStrategy was set to Surgical (default), but I tried to find the surgical host at any of these paths Either the generic host files or the surgical host files must exist. File status: Generic host (platform/host.rh): missing, Generic metadata (platform/metadata_host.rm): missing, Surgical host (platform/linux-x64.rh): missing, Surgical metadata (platform/metadata_linux-x64.rm): missing but it does not exist.

no idea what any of this means :laughing:

view this post on Zulip Luke Boswell (Dec 05 2024 at 20:14):

The platform host isn't built by roc, you need to build that manually. We have a script (using roc :grinning:) so you can build it using roc build.roc

view this post on Zulip Luke Boswell (Dec 05 2024 at 20:16):

Then you should see the prebuilt legacy host files, e.g. macos-aarch64.a, and the prebuilt surgical host files like linux-x64.rh etc in the platform/ depending on your native os/arch

view this post on Zulip Agustin Romero (Dec 05 2024 at 20:17):

i get this message when running roc build.roc

view this post on Zulip Luke Boswell (Dec 05 2024 at 20:18):

Then you can run an example and roc will find the prebuilt host to link with and produce the final executable (or library if using --lib).

When using a URL platform this is all packaged up into a tar so end users dont need native toolchains like cargo or zig etc

view this post on Zulip Luke Boswell (Dec 05 2024 at 20:33):

Sorry... there's a bash script jump-start.sh which builds the generic host so the build script works.

view this post on Zulip Luke Boswell (Dec 05 2024 at 20:34):

I hadn't realised we didnt have build.roc pointing to a platform release any longer. I guess that helps with upgrades for breaking changes.

view this post on Zulip Agustin Romero (Dec 05 2024 at 20:37):

yeah i was looking at that, it was pointing to itself! looked weird to me.
jump-start.sh worked just fine, maybe change the README?

view this post on Zulip Sam Mohr (Dec 05 2024 at 20:37):

Sounds like a README change, yep. We're happy to do that, unless you'd like to?

view this post on Zulip Agustin Romero (Dec 05 2024 at 20:45):

Sure, i'd love to!
@Luke Boswell is there a reason for jump-start.sh to not run the compiled build command?

view this post on Zulip Brendan Hansknecht (Dec 06 2024 at 01:02):

Generally you have to run jumpstart once then build n times (for every platform edit)

view this post on Zulip Brendan Hansknecht (Dec 06 2024 at 01:03):

Jumpstart should probably run build

view this post on Zulip Brendan Hansknecht (Dec 06 2024 at 01:03):

Probably a mistake that it doesn't

view this post on Zulip Anton (Dec 06 2024 at 11:37):

The platform url can be used again once https://github.com/roc-lang/basic-cli/pull/277 is merged, no README change is necessary @Agustin Romero


Last updated: Jul 05 2025 at 12:14 UTC