Closed hlorellium closed 3 months ago
My guess is that you don’t have a C compiler available?
I think macOS for default includes clang when installing dev tools, but just to be sure installed it separately and don't think the problem is with that. Ran the command with set debug variable:
===> Not adding provider hex publish from module rebar3_hex_publish because it already exists from module rebar3_hex_publish ===> Running provider: {bare,compile} ===> Compile (untagged) ===> Running hooks for compile in app fs (/Users/hlorella/code/test/app/build/dev/erlang/fs) with configuration: ===> Setting paths to [plugins] ===> {provider_hooks, [{pre, [{pc,compile}]}]}. ===> Running provider: {pc,compile} ===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump ===> Uncaught error: {badrecord,not_found} ===> Stack trace to the error location: [{providers,do,2, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/vendor/providers/src/providers.erl"}, {line,90}]}, {rebar_core,do,2, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_core.erl"}, {line,155}]}, {rebar_hooks,run_providerhooks,6, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_hooks.erl"}, {line,70}]}, {rebar_hooks,run_all_hooks,6, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_hooks.erl"}, {line,18}]}, {rebar_prv_compile,'-compile/4-lc$^0/1-0-',3, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_prv_compile.erl"}, {line,152}]}, {rebar_prv_compile,compile,4, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_prv_compile.erl"}, {line,152}]}, {rebar_prv_compile,compile,3, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_prv_compile.erl"}, {line,143}]}, {rebar_prv_bare_compile,do,1, [{file,"/private/tmp/rebar3-20240410-5267-d1j87f/rebar3-3.23.0/apps/rebar/src/rebar_prv_bare_compile.erl"}, {line,71}]}] ===> When submitting a bug report, please include the output of
rebar3 report "your command"
error: Shell command failureThere was a problem when running the shell command
rebar3
.
Seems like you are running into the same issue as reported here: https://github.com/erlang/rebar3/issues/2779
For context what you're seeing right now is not really a Lustre or Gleam issue. Lustre dev tools depends on an erlang package called fs
which in turn depends on some native C code. pc
is a plugin for rebar3, the erlang build tool, that is used to compile these native C bits and for whatever reason that's tripping you up.
In the linked issue above they mentioned compiling rebar from source and adding it to their PATH resolved their issue. Doesn't seem ideal but it might be worth trying; how did you install erlang - I noticed you're on otp 27 which is not yet available through homebrew.
Seems like that is some issue when running with otp 27, downgraded to 26 and it worked. Installed it using https://github.com/jdx/mise
Super weird, glad you got it solved!
Unable to run Lustre program on macOS following quickstart guide
Description
I'm following the Lustre quickstart guide but encountering issues when trying to run the program on macOS.
Environment
Steps to Reproduce
Expected Behavior
The program should run successfully as described in the quickstart guide.
Actual Behavior
Encountering errors when trying to run the program.
Error Messages and Screenshots
gleam.toml:
app.gleam:
Result of
gleam run
:Result of running watch command:
Request for Assistance
I would appreciate any help with this!