I’ve been using Arch Linux as my Linux distribution of choice for the last few years, but over the last few months, I’ve been noticing a more-than-negligible number of issues with the OCaml ecosystem, especially when it comes to packages that need to interact with non-OCaml libraries. Is there a preferred (Linux or BSD) operating system or environment that people use? The latest Ubuntu LTS is probably the most obvious choice.
You may find that more or less all major Unix OSes seem to work quite well when you’re very much inside the OPAM ecosystem and that things get shakier when you have to deal with third party libraries. It may or may not be easier on Ubuntu LTS.
I myself tend to work on a Mac, with MacPorts as my source for third party libraries and the like. This has been pretty successful for me, but I have the advantage that I have a commit bit for MacPorts and can fix anything that breaks for me.
I do use macOS with
homebrew myself for local development, but I do some web development (mainly to use web-based UI) and it’s useful to have a lightweight Linux VM do deployments on. Unfortunately, it seems like both Arch and Alpine (which would have been my go-to lightweight Linux environments) are currently having issues building Core at the moment.
Do any of us knows what Jane Street uses for their OCaml development/deployment?
We use Cent7 internally, and I personally use the latest Fedora at home, which so far has worked for me without issue.
I use Red Hat Linux. Absolutely no issues so far.
I’m pretty happy with Debian testing for personal uses (which include OCaml).
These are the Linux distributions tested in OPAM CI:
Arch isn’t on there, so the depexts are probably very bitrotted in opam. Two equally good courses of action are:
- contribute support for your favourite distro (e.g. Arch) to https://github.com/avsm/ocaml-dockerfile so that it can get on the supported list
- switch to one of the supported distros on the list for an immediate boost in opam build quality
I’d really like to see more non-mainstream distros in our CI list, so this is a valuable area for new contributors.
I think getting Arch in would be a good thing from the point of view of enhancing portability, so I hope @basus is in a position to contribute that dockerfile.
I would be interested in contributing Arch support to Ocaml-Dockerfile. I don’t know much about Docker though, so it might take me a while to get up to speed with it. I might try to use the most recent Alpine for my immediate purposes.
You may be able to get what you want built by looking at existing examples and looking for Arch docker images.
I couldn’t get
owl to compile on debian, due to missing headers for Lapack.
Hi Jean @jnavila , did you try to install OpenBLAS from the source (i.e. https://github.com/xianyi/OpenBLAS )? If you have gfortran installed, OpenBLAS will also include LAPACKE automatically in the lib.
Recompiling the base libs is always possible. What I don’t understand here is why these symbols are removed and if it’s a good reason, why should owl rely on them?
@avsm is there some way to find/look at the Dockerfiles that were used to create the Linux OPAM containers? Dockerhub doesn’t seem to show them in an obvious location.
They were created programmatically using ocaml-dockerfile and the obi tool. https://github.com/ocaml/obi contains the
obi-gitlab tool, and the various CI pipelines start from here: https://gitlab.com/ocaml-platform/ci/pipelines/29797615
You should be able to just run
obi-gitlab --help and generate the Dockerfiles locally pretty easily; they are just written out to the
_results directory in the pwd by default.