Are Erlang development libraries automatically installed?

When Elixir and Erlang are installed are the necessary dependencies to compile Erlang related stuff included?

For instance I may have to install Linux compiling tools, eg apt-get install build-essential and I may have to install postgresql-dev, mysql-dev etc if I am going to upgrade stuff. Does the erlang/elixir combo also install their own development libraries forehand or are there some extra libraries that are needed?

The version of erland installed is esl-erlang. When I try to install erlang-dev which i suppose I need apt warns that esl-erlang will be removed. Are esl-erlang and erlang the same, seeing as they are from the same repo with the difference being that erlang may be packaged according to debian conventions?

vonhabsi@ac02:~/DevProjects/learnphoenix/customers$ apt-cache policy esl-erlang
Installed: 1:19.3
Candidate: 1:19.3
Version table:
*** 1:19.3 0
999 jessie/contrib amd64 Packages
100 /var/lib/dpkg/status
1:19.2.3 0
999 jessie/contrib amd64 Packages
1:19.2 0

vonhabsi@ac02:~/DevProjects/learnphoenix/customers$ apt-cache policy erlang
Installed: (none)
Candidate: 1:19.3-1
Version table:
1:19.3-1 0
999 jessie/contrib amd64 Packages
1:19.2.1+dfsg-2~bpo8+1 0
100 jessie-backports/main amd64 Packages
1:19.2-1 0
999 jessie/contrib amd64 Packages
1:19.1-1 0


esl-erlang for debian based systems does come with all the necessary headers to build NIFs as far as I can remember.

But if a package does have these tools does depend on the package and pretty much on the philosophy of the base system. You need to research this on a per distribution basis.

1 Like

As @Nobbz said for C style stuff, but NIF’s in whatever language (like I’ve been writing NIF’s in Rust as Rust is faster and safer for this type of code) needs the Rust toolchain of course, but I’d document that if I released it. NIF’s and Ports and whatever else can be made in about any language, so just read the docs for a given library. :slight_smile:

1 Like

@OvermindDL1, remember that often for developing in something else than C, still the C-Headers are required. But that does even more depend on the way everything got implemented.

I will try to compile the packages directly from Github as an exercise to see how it turns out. Perhaps the version on is not fully up to date.

True in many languages yes, though not Rustler as I recall (at least I don’t think I have the erlang headers on my windows install?).

Well, it pulls in erlang_nif-sys as a dependency, which is a rustified version of the headers, but it will break, when for some reasons some constants in the erlang headers change.

It does some detections to determine what erlang version as I recall, they added OTP 19 support a couple months ago I remember.

That’s nice to know I only skimmed the crates source.

Note that to compile Elixir one actually needs the esl-erlang package instead of the erlang package, otherwise the compilation will fail. See It seems that rabbitmq also have a similar issue. Leaving a note here so somebody later searching about the difference between these two packages would not commit the same error I did.

EDIT: What NobbZ said is true but apparently nobody has actually spent time pointing out what additional packages should be installed after all… See Unable to build Elixir with Erlang OTP 21: 'cannot get bootfile','no_dot_erlang.boot'

Thats no true.

You either need esl-erlang (which installs really everything related to erlang) or erlang plus the according erlang-X packages. Personally I prefer the latter option, as I can choose what actually gets installed.

PS: At least this is how I read the ESL-FAQ. I am using arch personally, where I do rarely have to rely on third party repositories…

1 Like