Stream: platform development

Topic: Minimal go platform example issue


view this post on Zulip Henrik Larsson (Feb 01 2025 at 18:06):

I am currently trying to port an old go application to a Roc platform just for fun. As a first step I wanted to follow the minimal example. However I am getting the following error when:

go build -C platform -buildmode=pie -o dynhost
# bfg-roc-platform
./main.go:16:2: could not determine kind of name for C.roc__main_for_host_1_exposed_generic
error: Recipe `build-go` failed on line 6 with exit code 1

I am not really sure how to start debug this but I tried this which looks ok.

[zwoop@nixos:~/repos/rocs/bfg-roc/platform]$ nm -gD libapp.so
0000000000001060 W __divti3
00000000000015e0 W floorf
                 w __gmon_start__
0000000000001720 W memcpy
00000000000017b0 W memset
0000000000001420 W __modti3
00000000000014a0 W __muloti4
00000000000018e0 T roc__main_for_host_1_exposed
00000000000018b0 T roc__main_for_host_1_exposed_generic
0000000000001920 T roc__main_for_host_1_exposed_size
0000000000004000 V __stack_chk_guard
0000000000001410 W __udivti3
0000000000001480 W __umodti3

Any tips on what might be the issue?

The project is available here

view this post on Zulip Anton (Feb 01 2025 at 18:42):

In case it may help, these projects also use go:
https://github.com/lukewilliamboswell/roc-platform-template-go
https://github.com/ostcar/kingfisher/tree/main

view this post on Zulip Luke Boswell (Feb 01 2025 at 19:30):

I haven't upgraded that to the latest symtax yet. But it's not far off.

view this post on Zulip Henrik Larsson (Feb 02 2025 at 10:01):

Solved: It was just a typo, I did not include roc__main_for_host_1_exposed_generic in host.h


Last updated: Jul 05 2025 at 12:14 UTC