I’m trying to package new versions of OCaml on old versions of Ubuntu, and running into issues on groovy and precise.
The build on groovy has 308 tests that fail with errors like
... testing 'threadsigmask.ml' with 1.1.2 (native) => failed (The file /<<PKGBUILDDIR>>/testsuite/_ocamltest/tests/lib-systhreads/threadsigmask/ocamlopt.byte/ocamlopt.byte.output was expected to be empty because there is no reference file /<<PKGBUILDDIR>>/testsuite/tests/lib-systhreads/threadsigmask.compilers.reference but it is not: ======================================== /usr/bin/ld: threadsigmask.o: warning: relocation in read-only section `.text' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE ========================================
... testing 'main.ml' with 1.1 (native) => failed (Compiling program /<<PKGBUILDDIR>>/testsuite/_ocamltest/tests/instrumented-runtime/main/ocamlopt.byte/main.opt from modules main.ml: command /<<PKGBUILDDIR>>/runtime/ocamlrun /<<PKGBUILDDIR>>/ocamlopt -I /<<PKGBUILDDIR>>/runtime -nostdlib -I /<<PKGBUILDDIR>>/stdlib -runtime-variant=i -o /<<PKGBUILDDIR>>/testsuite/_ocamltest/tests/instrumented-runtime/main/ocamlopt.byte/main.opt main.ml failed with exit code 2)
Interestingly, 4.11.1 builds find on distributions both older and newer than groovy. (I’m backporting the package from hisrute, and it builds find on trusty, xenial, bionic, and focal.)
Any suggestions on what I have to change to get OCaml 4.11.1 to succeed?