Skip to content

[dune-issue] dune fails build under trunk/5.3 on macOS #433

Closed
@jmid

Description

@jmid

dune.3.12.2 no longer builds under trunk/5.3 on macOS which effectively disables this CI workflow:

Install dune
  /Users/runner/hostedtoolcache/opam/2.1.5/x86_64/opam install dune
  Constructing initial basis...
  Number of 0-1 knapsack inequalities = 28
  Constructing conflict graph...
  Conflict graph has 28 + 6 = 34 vertices
  The following actions will be performed:
    ∗ install dune 3.12.2
  
  <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
  ⬇ retrieved dune.3.12.2  (https://github.com/ocaml/dune/releases/download/3.12.2/dune-3.12.2.tbz)
  [ERROR] The compilation of dune.3.12.2 failed at "ocaml boot/bootstrap.ml -j 4".
  
  #=== ERROR while compiling dune.3.12.2 ========================================#
  # context     2.1.5 | macos/x86_64 | ocaml-variants.5.3.0+trunk | git+https://github.com/ocaml/opam-repository.git
  # path        ~/work/multicoretests/multicoretests/_opam/.opam-switch/build/dune.3.12.2
  # command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml boot/bootstrap.ml -j 4
  # exit-code   2
  # env-file    ~/.opam/log/dune-26017-16d463.env
  # output-file ~/.opam/log/dune-26017-16d463.out
  ### output ###
  # ocamlc -output-complete-exe -w -24 -g -o .duneboot.exe -I boot -I +unix unix.cma boot/libs.ml boot/duneboot.ml
  # ./.duneboot.exe -j 4
  # cd _boot && /Users/runner/work/multicoretests/multicoretests/_opam/bin/ocamlopt.opt -c -g -I +unix -I +threads dune_digest_stubs.c
  # In file included from src/dune_digest/dune_digest_stubs.c:10:
  # In file included from /Users/runner/work/multicoretests/multicoretests/_opam/lib/ocaml/caml/md5.h:24:
  # In file included from /Users/runner/work/multicoretests/multicoretests/_opam/lib/ocaml/caml/io.h:26:
  # /Users/runner/work/multicoretests/multicoretests/_opam/lib/ocaml/caml/platform.h:79:17: error: implicit declaration of function 'atomic_load_acquire' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  #     uintnat v = atomic_load_acquire(p);
  #                 ^
  # 1 error generated.
  # 

The reason is that ocaml/ocaml#12839 removed a macro definition for atomic_load_acquire in CAML_INTERNALS combined with dune not following the OCaml manual's instructions for using the this internal API.

The error has been reported and fixed upstream in dune in ocaml/dune#9733.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions