Tooling/linker issue in FreeBSD

Concerning your failure case:

This doesn’t look like an OCaml problem to me, rather a problem with the bls12-381-unix package you’re using. It seems to be building a C shared library using GNU ld-specific options:

cc -shared -o libblst.so libblst.a -O -fno-builtin-memcpy -fPIC -Wall -Wextra -Werror -Wno-missing-braces -mno-avx '-Wl,-Bsymbolic,--require-defined=blst_keygen' '-Wl,--version-script=/dev/fd/0'
ld: error: unknown argument '--require-defined=blst_keygen'           

The require-defined option is definitely not inserted by OCaml, so it comes from the build instructions for this blst package, and that’s where you should look for a fix.

Concerning your more general point about OCaml and BSD: the core OCaml system is developed both under Linux and under macOS, and our CI also includes FreeBSD and OpenBSD, so you can expect reasonable BSD support here. Some OPAM packages contain Linux-isms, indeed, but I think these are being chased out as OPAM-wide CI is being deployed.

1 Like