ocaml/dune

Dune segfaults during bootstrap on ppc64: `make: *** [release] Segmentation fault`

Offen

#12.063 geöffnet am 22.07.2025

 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)OCaml (478 Forks)github user discovery
help wanted

Repository-Metriken

Stars
 (1.882 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 20h) (345 gemergte PRs in 30 T)

Beschreibung

Expected Behavior

Build should work normally, as it does on ppc (32-bit).

Actual Behavior

Build segfaults: generated dune.exe is corrupt.

--->  Configuring ocaml-dune
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_macos-powerpc.org_macos-powerpc_PPCPorts_ports_ocaml_ocaml-dune/ocaml-dune/work/dune-3.19.1" && ./configure --bindir /opt/local/bin --datadir /opt/local/share/ocaml-dune --docdir /opt/local/share/doc --etcdir /opt/local/etc --libdir /opt/local/lib/ocaml/site-lib --mandir /opt/local/share/man --sbindir /opt/local/sbin 
--->  Building ocaml-dune
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_macos-powerpc.org_macos-powerpc_PPCPorts_ports_ocaml_ocaml-dune/ocaml-dune/work/dune-3.19.1" && DUNE_CONFIG__COPY_FILE=portable /usr/bin/make release 
ocamlc -output-complete-exe -w -24 -g -o .duneboot.exe -I boot unix.cma boot/[libs.ml](http://libs.ml/) boot/[duneboot.ml](http://duneboot.ml/)
./.duneboot.exe
make: *** [release] Segmentation fault
(gdb) run
Starting program: /opt/local/var/macports/build/ocam5353a6/work/dune-3.19.1/_boot/dune.exe 
warning: posix_spawn failed, trying execvp, error: 86
Reading symbols for shared libraries +. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff81b9fae8 in strlen ()
(gdb) bt
#0  0x00007fff81b9fae8 in strlen ()
#1  0x00007fff81bd5f3c in realpath$DARWIN_EXTSN ()
#2  0x0000000100006550 in unix_realpath ()
#3  0x0000000100014914 in caml_interprete ()
#4  0x0000000100017204 in caml_startup_code ()
#5  0x000000010003811c in main ()

Reproduction

Run the build on Darwin for ppc64.

Specifications

  • Version of dune (output of dune --version): 3.19.1
  • Version of ocaml (output of ocamlc --version): 4.14.2
  • Operating system (distribution and version): macOS 10.5.8

P. S. I suspect nobody has the set-up to reproduce this, so advice on how to debug this will be very helpful. The log is rather useless, it is not even clear where exactly it fails.

Contributor Guide