Just a heads up.
Getting Erlang running on FreeBSD 12.2, with the latest release - including the JIT compiler, and the WX Graphics with observer.
It can be done ! and its pretty straightforward
Pulling the latest code from git :
https://github.com:erlang/otp to get the Erlang code.
Latest code on master is for OTP-25, so checkout the maint-24 branch. I tried playing with OTP-25, but fell in a hole building Elixir against the bleeding edge Erlang, so fell back to OTP-24 for my own sanity.
Use clang instead of gcc - so set the CC / CXX / CPP vars to match your clang install.
A relatively up to date clang is needed to even compile the emulation / JIT asm code. Gcc failed to compile, but at least a vanilla clang works all the way.
./configure ... add options to suit (--with-dynamic-trace=dtrace etc) The new JIT compiler is configured by default.
Use gmake instead of make. (I guess the makefiles are full of gnu-isms, dont know, didnt bother to fight it). Ithink you need GNU autoconf installed, and you will need wx development libs installed if you want the GUI tools too.
Puts the binaries in /usr/local/lib/erlang/... so add /usr/local/lib/erlang/bin to your PATH
Now its all there, you can run erl, see the options its build with, and check that the observer runs.
Sweet !
For a matching Elixir - pull from git, latest master is 1.13.0-dev ... that works fine with OTP-24, or you might want to checkout branch 1.12 for something relatively stable)
then run iex -S mix to get an Elixir shell against a running project, again you can see the versions of everything set, you can see that JIT is enabled, and then fire off the observer (using Elixir syntax this time)
... and it just works. Very happy - running the latest and greatest on FreeBSD, and being able to keep up to date because Im working straight off git repos. Actually easier than messing around with Ubuntu / apt / snap, or Homebrew on the Mac.
This is all very good, but "whats the point ?" you might well ask.
Well, this isnt exactly the place to try to advocate for obscure non-mainstream tech after all.
Just saying - if you love building robust systems, and you haven't got your hands dirty with Erlang, or Elixir, or OTP, or LiveView, or NIFs written in C and Rust and Zig ... then its worth having a look for sure. Its really really worth having a look
Getting Erlang running on FreeBSD 12.2, with the latest release - including the JIT compiler, and the WX Graphics with observer.
It can be done ! and its pretty straightforward
Pulling the latest code from git :
https://github.com:erlang/otp to get the Erlang code.
Latest code on master is for OTP-25, so checkout the maint-24 branch. I tried playing with OTP-25, but fell in a hole building Elixir against the bleeding edge Erlang, so fell back to OTP-24 for my own sanity.
Use clang instead of gcc - so set the CC / CXX / CPP vars to match your clang install.
A relatively up to date clang is needed to even compile the emulation / JIT asm code. Gcc failed to compile, but at least a vanilla clang works all the way.
./configure ... add options to suit (--with-dynamic-trace=dtrace etc) The new JIT compiler is configured by default.
Use gmake instead of make. (I guess the makefiles are full of gnu-isms, dont know, didnt bother to fight it). Ithink you need GNU autoconf installed, and you will need wx development libs installed if you want the GUI tools too.
./otp_build autoconf
./configure --with-dynamic-trace=dtrace
gmake
doas gmake install
Puts the binaries in /usr/local/lib/erlang/... so add /usr/local/lib/erlang/bin to your PATH
Now its all there, you can run erl, see the options its build with, and check that the observer runs.
$ erl
Erlang/OTP 24 [erts-12.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Eshell V12.0.1 (abort with ^G)
1> observer:start().
Sweet !
For a matching Elixir - pull from git, latest master is 1.13.0-dev ... that works fine with OTP-24, or you might want to checkout branch 1.12 for something relatively stable)
GitHub - elixir-lang/elixir: Elixir is a dynamic, functional language for building scalable and maintainable applications
Elixir is a dynamic, functional language for building scalable and maintainable applications - elixir-lang/elixir
github.com
gmake clean test
doas gmake install
then run iex -S mix to get an Elixir shell against a running project, again you can see the versions of everything set, you can see that JIT is enabled, and then fire off the observer (using Elixir syntax this time)
iex -S mix
Erlang/OTP 24 [erts-12.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Interactive Elixir (1.13.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start
... and it just works. Very happy - running the latest and greatest on FreeBSD, and being able to keep up to date because Im working straight off git repos. Actually easier than messing around with Ubuntu / apt / snap, or Homebrew on the Mac.
This is all very good, but "whats the point ?" you might well ask.
Well, this isnt exactly the place to try to advocate for obscure non-mainstream tech after all.
Just saying - if you love building robust systems, and you haven't got your hands dirty with Erlang, or Elixir, or OTP, or LiveView, or NIFs written in C and Rust and Zig ... then its worth having a look for sure. Its really really worth having a look