ocaml
ocaml copied to clipboard
[5.2] build error: dllunixbyt.so_The boot compiler cannot load DLLs: No such file or directory
Running the following causes a reliable reproduction of a build failure on make bootstrap -j12:
$ ./configure --enable-flambda # This seems to be important for the reproduction
$ make world
$ make bootstrap
...
..
...
File "_none_", line 1:
Error: I/O error: dllunixbyt.so_The boot compiler cannot load DLLs: No such file or directory
make[2]: *** [Makefile:558: debugger/ocamldebug] Error 2
File "_none_", line 1:
Error: I/O error: dllunixbyt.so_The boot compiler cannot load DLLs: No such file or directory
make[2]: *** [Makefile:544: ocamldoc/ocamldoc] Error 2
This seems to happen quite reliably for me using the steps above in the 5.2 branch but not in trunk. I'm digging a bit deeper. EDIT: it happens in trunk too
I suppose this could be specific to arm64 macs?
here's a failing build on arm64: https://github.com/melange-re/melange/actions/runs/8240717242/job/22536631215?pr=1081
Thanks for the report - I’ll have a look in a bit. I expect the fix will be to make the bootstrapping an error, though - what’s the reason for building the bootstrap target?
what’s the reason for building the bootstrap target?
I'm not sure. This is the build phase for the OCaml compiler in nixpkgs:
https://github.com/NixOS/nixpkgs/blob/002f8266a0caeb9a4108dcb6c8107eeaff280247/pkgs/development/compilers/ocaml/Makefile.nixpkgs#L13-L16
Ah, the issue should still be checked/debugged, but that recipe is many years out of date - since 4.10, the compiler only needs make to be run after configure (or make defaultentry if one insists on an explicit target). It’s not clear why to the recipe was ever insisting on bootstrapping - mostly that’s a waste of user time with a release (especially with more recent releases where the bootstrap is completely repeatable)
That's good to know. I'll fix the recipe, thanks.