OWL - undefined symbols after standard installation

Thanks for pinging me.

Indeed, as @ivg has already noted, dlagge has been there for a long time. The thing is that owl links against openblas and expects it to be compiled to include lapacke and cblas. Unless you use js_of_ocaml, all the linear algebra routines will shell out to openblas, so you likely need it. I pin @ryanrhymes, just to make sure I am not saying something wrong here.

In most cases openblas installed by your distribution will have everything you need, but this is currently known to be broken (and it has been for quite a while) on ubuntu. The only solution that we have been able to find is the one we use also in the ubuntu Docker file: https://github.com/owlbarn/owl/blob/master/docker/Dockerfile.ubuntu#L20-L29

Namely, you need to compile a custom openblas and install owl with the right PKG_CONFIG_PATH (it needs to be set properly only when you install owl, after that you can forget about it).

There used to be a related issue on launchpad but I could not find it, so maybe my memory is failing me. There is still the issue that openblas on ubuntu does not ship lapacke.h.

I think recompiling the openblas library and reinstalling as we do in the Dockerfile linked above is your best bet here. You could try to tweak the configure.ml file in owl to add more linking flags (e.g. -lm -lblas -llapack -llapacke -lopenblas, but it did not solve the issue on the old lts and I don’t think it will in the new one tbh).

6 Likes