Skip to content

Conversation

Anton-4
Copy link
Collaborator

@Anton-4 Anton-4 commented Apr 29, 2024

No description provided.

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Apr 29, 2024

@lukewilliamboswell I wanted to set up testing of the examples on macos and also ran into problems with the go example like you mentioned earlier, I tried to re-use some stuff from #173 but I'm still encountering:

+ go build -C examples/GoPlatform/platform -buildmode=c-archive -o libhost.a
+ cp examples/GoPlatform/platform/libhost.a examples/GoPlatform/platform/macos-arm64.a
+ roc build --prebuilt-platform ./examples/GoPlatform/main.roc
Undefined symbols for architecture arm64:
  "_main", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture arm64
./examples/GoPlatform/main: No such file or directory
thread 'main' panicked at crates/compiler/build/src/program.rs:1043:17:
not yet implemented: gracefully handle `ld` (or `zig` in the case of wasm with --optimize) returning exit code Some(1)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Can you take a look?

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Apr 30, 2024

Looks like the tests passed because I did a bad copy-paste... I'll fix that.

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Apr 30, 2024

Ok, now I get the Undefined symbols error:

 + roc build --prebuilt-platform ./examples/GoPlatform/main.roc
ld: Undefined symbols:
  _main, referenced from:
      <initial-undefines>
./examples/GoPlatform/main: No such file or directory
thread 'main' panicked at crates/compiler/build/src/program.rs:1043:17:
not yet implemented: gracefully handle `ld` (or `zig` in the case of wasm with --optimize) returning exit code Some(1)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Anton-4
Copy link
Collaborator Author

Anton-4 commented Jun 25, 2024

Have you seen this error before @lukewilliamboswell?

+ roc build --prebuilt-platform ./examples/GoPlatform/main.roc
Undefined symbols for architecture arm64:
  "_main", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture arm64

@lukewilliamboswell
Copy link
Collaborator

lukewilliamboswell commented Jun 26, 2024

EDIT - nvm power and internet is out. I need to test this using nix develop when I am not tethered to my mobile internet.

@lukewilliamboswell
Copy link
Collaborator

Have you seen this error before @lukewilliamboswell?

+ roc build --prebuilt-platform ./examples/GoPlatform/main.roc
Undefined symbols for architecture arm64:
  "_main", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture arm64

Is it because of #cgo CFLAGS: -Wno-main-return-type that the main symbol isn't included in the library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants