opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
My company has a somewhat complicated internal system for managing 3rd party code. As part of this import and build process, the system passes --enable-static and --enable-shared to all configure scripts. The opam configure script fails if --enable-static is passed, but the host does not support static linking (only mingw and musl are supported).
Chatting with some folks internally, it sounded like the expectation here is that --enable-static is advisory, and should not fail the build if static linkage isn't possible. I was able to work around by changing the configure script to warn and fall back to shared. I needed to make modifications to this code:
My company has a somewhat complicated internal system for managing 3rd party code. As part of this import and build process, the system passes
--enable-static
and--enable-shared
to all configure scripts. The opam configure script fails if--enable-static
is passed, but the host does not support static linking (only mingw and musl are supported).Chatting with some folks internally, it sounded like the expectation here is that
--enable-static
is advisory, and should not fail the build if static linkage isn't possible. I was able to work around by changing the configure script to warn and fall back to shared. I needed to make modifications to this code:https://github.com/ocaml/opam/blob/9c7a256f60e78d1a1cc5ea90f8069a351aeb86a5/configure.ac#L357
This is probably a fairly niche problem, but if it's acceptable to change this upstream I'm happy to submit a PR.