ocaml icon indicating copy to clipboard operation
ocaml copied to clipboard

[5.2] build error: dllunixbyt.so_The boot compiler cannot load DLLs: No such file or directory

Open anmonteiro opened this issue 1 year ago • 5 comments

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

anmonteiro avatar Mar 09 '24 21:03 anmonteiro

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

anmonteiro avatar Mar 11 '24 22:03 anmonteiro

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?

dra27 avatar Mar 20 '24 14:03 dra27

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

anmonteiro avatar Mar 21 '24 19:03 anmonteiro

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)

dra27 avatar Mar 22 '24 10:03 dra27

That's good to know. I'll fix the recipe, thanks.

anmonteiro avatar Mar 23 '24 04:03 anmonteiro