I am trying to install the latest Elixir on my newly installed GNU Guix System box. However, the version offered by Guix is 1.14.0. I have tried setting up ASDF, but I can’t install Erlang v26.2.3 due to OpenSSL and ODBC not being found (even though they were installed with guix install). Any help is greatly appreciated. Thanks!
I tried adding ~/.guix-profile/include/openssl to the --with-ssl option of KERL_CONFIGURE_OPTIONS, but it still isnt’ compiling:
➜ src export KERL_CONFIGURE_OPTIONS="--disable-debug --disable-silent-rules --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --enable-hipe --enable-sctp --enable-smp-support --enable-threads --enable-kernel-poll --enable-wx --enable-darwin-64bit --with-ssl=/home/djaouen/.guix-profile/include/openssl"
➜ src asdf install erlang 26.2.3
asdf_26.2.3 is not a kerl-managed Erlang/OTP installation
The asdf_26.2.3 build has been deleted
Extracting source code
Building Erlang/OTP 26.2.3 (asdf_26.2.3), please wait...
[packages] Unknown Linux distro guix; not checking build packages.
Configure failed.
checking for linker flags for loadable drivers... -shared -Wl,-Bsymbolic
checking for 'runtime library path' linker flag... -Wl,-R
checking for multiarch directory... not found
checking size of void *... 8
checking for static zlib... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /run/current-system/profile/bin/grep
checking for egrep... /run/current-system/profile/bin/grep -E
checking for OpenSSL header in /home/djaouen/.guix-profile/include/openssl... configure: error: no OpenSSL header found in /home/djaouen/.guix-profile/include/openssl
ERROR: /home/djaouen/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.3/otp_src_26.2.3/lib/crypto/configure failed!
Please see /home/djaouen/.asdf/plugins/erlang/kerl-home/builds/asdf_26.2.3/otp_build_26.2.3.log for full details.
Inside of ~/.guix-profile/include/openssl, I do see an OpenSSL header:
OK, now I tried running the install with CC="gcc -I/home/djaouen/.guix-profile/include -L/home/djaouen/.guix-profile/lib" asdf install erlang 23.2.3 and am seeing a new error:
I haven’t tried it yet as I have been too busy to review the source code to see if it fits my needs. I will do that when I find the time and let you know if I encounter any issues. Thanks!
OK, I tried installing Elixir from your channel, but I still can’t seem to get ElixirLS working. I don’t know, I will have to do some more research and get this figured out. Thanks again for this!
Wait, I finally got it working by doing a mix do deps.get, compile and then downloading and unzipping the release on the ElixirLS GitHub page (rather than doing a mix elixir_ls.release2 -o release. Thanks for your help! Do you have a donation page so I can donate to you?
By the way, this elixir package also makes LSP possible to work (i.e. go-to-definition feature) against included elixir source code out-of-box.
Ok, I will try to explain it with another words due to probable misunderstanding what I mean.
Any LS works more or less fine with the upstream Elixir packages from Guix (Debian’s package also applies) out-of-box when you work with your project and its’ dependences source trees, but if you try to dive into any Elixir standard library function (i.e. Map.get/3) definition it fails because module meta data points to some nonexistent compile-time location on the file system where is no Elixir sources. So why sometimes it is recommended to use Elixir compiled from source or asdf, both variants seem to solve the problem. I have no idea, if someone also needs to navigate into Elixir’s standard functions, but I do and do it quite frequently.