I have the latest version of Erlang/OTP installed, and now I’m following steps in the “Install Elixir” section. I cloned the git repo but when I run “make clean test”, I’m getting errors when the script is trying to test the mix tool:
My git does not recognize the “-c” option. Is there a way for me to somehow circumvent this, e.g. by providing the necessary custom options via a config file? Where in the source code would I have to look for this?
What version of git (git --version) do you have? The -c option is ancient… I don’t recall what version it was added but way way back in the v1 era as I recall. You do have at least version 2.x of git installed to start with (even v2 is many many years old, like 6 or 7 years old I think)?
EDIT: If you do have a git version older than v2 then you really badly need to update it. V1 had insecure hash generation (not just theoretically) that has since been updated along with a lot of other security fixes, not to mention all the other security and other fixes since v2.0.0 first came out.
This means nothing to me on any distribution, especially not on RHEL or CentOS. Especially after “latest” in EPEL seems to be OTP 16B3. Elixir 1.0 needs at least OTP 17. A current elxir needs at least OTP 19.
Thanks, guys. I was expecting that - people telling me to upgrade instead of answering my question
Yes, my git is ancient (1.7) so that explains the problem. Elixir does however seems to have built properly once I skipped the tests. So I think I’m set for now.
A VM upgrade is planned but it will definitely take longer than the free time I have now
BTW, I did build Erlang/OTP 22 from source. It was actually quite painless.
It’s also painless to build git, it’s literally a download source, extract, make, make install # as root, and I would highly highly recommend it. Running such an old git version is extremely insecure!
Based on your feedback, I’ve decided to bite the bullet and move my server to a current distro
BTW, I’ve encountered some other strange errors when building Elixir from scratch. Is this the right place to share them with the community? Or should I open a ticket somewhere?
If they all are because of outdated dependencies, I don’t think you need to share them.
I have never encountered on systems I operate. I have to admit though, that I preferably use arch, ubuntu (latest LTS) and sometimes at work I have to use some CentOS7, but except for a single experiment a year ago, I didn’t need to install elixir on it. For docker based deploys I tend to reach out for alpine and also never had issues, even though I roll my Dockerfiles by hand.
I never run unit tests when compiling from a tag, so perhaps you should provide additional info, as exact fail message, tag/sha you built from and which OTP you used.