#erlang version (freebsd)

1 messages · Page 1 of 1 (latest)

stuck finch
#

How do I tell gleam where to find erlang? I have erlang26 and erlang28 installed. erlang28 is at the head of my PATH, and I would expect gleam to find erlang28... but gleam finds erlang26 (which is also installed). So it seems gleam is not using the PATH.

# which erl
/usr/local/lib/erlang28/bin/erl

# erl --version
Erlang/OTP 28 [erts-16.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [dtrace] [sharing-preserving]

Eshell V16.2 (press Ctrl+G to abort, type help(). for help)
1>
...

Error when I try to run gleam on an app:

# gleam run -- templates --input ./priv/example/ --output ./tmp
...

   Compiled in 0.03s
    Running glm_freebsd.main
wrote: ./tmp/rc
wrote: ./tmp/post-install.sh
wrote: ./tmp/pre-deinstall.sh
runtime error: Erlang error

An error occurred outside of Gleam.

erlang:error(ErlangOtp7Required("Insufficient Erlang/OTP version.\n\n`gleam_json` uses the Erlang `json` module introduced in Erlang/OTP 27.\nYou are using Erlang/OTP 26\nPlease upgrade your Erlang install or downgrade to `gleam_json` v1.0.1.\n"))

stacktrace:
  gleam_json_ffi.string /data/repos/glm_freebsd/build/dev/erlang/gleam_json/_gleam_artefacts/gleam_json_ffi.erl:22
  freebsd_build.write_manifest src/freebsd_build.gleam:183
  freebsd_build.run_build src/freebsd_build.gleam:61
  glm_freebsd.main src/glm_freebsd.gleam:74
astral wadi
#

that's more like a compile time error that you only see at runtime, try rebuilding everything (like gleam clean)