Have folks successfully built Erlang/OTP from source on Illumos recently?

Hi folks; I’m trying to build the latest Erlang source code on an Illumos machine (OmniOS r151048). There isn’t an official binary release for Illumos, but the documentation makes reference to Solaris or SunOS as supported platforms a few times. However, following the instructions in the repository I can’t seem to get it to build. My process has been:

  316  curl -LO https://github.com/erlang/otp/releases/download/OTP-26.2.3/otp_src_26.2.3.tar.gz
  317  tar -zxf otp_src_26.2.3.tar.gz
  318  cd otp_src_26.2.3
  319  export ERL_TOP=$(pwd)
  320  export PATH=/usr/gnu/bin:$PATH
  321  ./configure
  322  make

The build fails with an error that looks like this:

 GEN    /home/taliaferro/otp_src_26.2.3/erts/start_scripts/start_clean.script
Crash: error:undef
[{systools,compile_rel,
           ["/home/taliaferro/otp_src_26.2.3/erts/start_scripts/start_clean",
            "/home/taliaferro/otp_src_26.2.3/erts/start_scripts/start_clean",
            {options,["/home/taliaferro/otp_src_26.2.3/lib/kernel/ebin",
                      "/home/taliaferro/otp_src_26.2.3/lib/stdlib/ebin",
                      "/home/taliaferro/otp_src_26.2.3/lib/sasl/ebin"],
                     "/home/taliaferro/otp_src_26.2.3/erts/start_scripts",
                     undefined,[],1,false,999,
                     [no_warn_sasl],
                     [],
                     "/home/taliaferro/otp_src_26.2.3/erts/start_scripts/tmp"}],
           []},
 {erl_compile,compile_file,4,[{file,"erl_compile.erl"},{line,359}]},
 {erl_compile,compile3,3,[{file,"erl_compile.erl"},{line,317}]},
 {erl_compile,compile,2,[{file,"erl_compile.erl"},{line,61}]},
 {erl_compile,'-compile_cmdline1/1-fun-0-',2,
              [{file,"erl_compile.erl"},{line,74}]}]
make[2]: *** [Makefile:84: /home/taliaferro/otp_src_26.2.3/erts/start_scripts/start_clean.script] Error 2
make[2]: Leaving directory '/home/taliaferro/otp_src_26.2.3/erts/start_scripts'
make[1]: *** [Makefile:73: local_setup] Error 2
make[1]: Leaving directory '/home/taliaferro/otp_src_26.2.3/erts'
make: *** [Makefile:849: local_setup] Error 2

I also see a number of indicators that the build system hasn’t configured itself correctly – there are a flood of warnings about illegal options for /usr/ucb/bin/install (despite having pushed /usr/gnu/bin to the front of my PATH and not having /usr/ucb/bin in there at all). There’s also output from the compiler earlier on which seems to indicate that it’s trying to compile for x86_64-pc-solaris2.11, when Illumos is most comparable to Solaris 10 (or SunOS 5.11 within that numbering scheme.)

I’ve tried a lot of tweaking of the configure options trying to get it to build successfully, but haven’t gained much ground, and the errors that the build process puts out aren’t terribly meaningful to me. Has anyone got Erlang to build on Illumos or Solaris recently? If so, was there some trick to it?

Hi there! Recently, I’ve achieved success by configuring compile flags, enabling me to successfully build it on various illumos distributions. Additionally, I’ve found success using kerl. For more information on kerl, you can visit: GitHub - kerl/kerl: Easy building and installing of Erlang/OTP instances. Feel free to reach out, I’ll help however I can.

I had the same problem today, it seems it’s due to /usr/ucb/install (the one they default to in illumos) not supporting the -p flag. I did a very simple change to modify everything relating to /usr/ucb/install to /usr/bin/install and it worked fine.

$ sed -i 's|/usr/ucb/install|/usr/bin/install|g' $(grep -l /usr/ucb/install ./**/*)
$ gmake