Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jmid opened this issue Jan 16, 2024 · 2 comments
Closed

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

jmid opened this issue Jan 16, 2024 · 2 comments

Comments

@jmid
Copy link
Collaborator

jmid commented Jan 16, 2024

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.

@jmid
Copy link
Collaborator Author

jmid commented Feb 9, 2024

The fix for this should be available from the next 3.14.0 release.
I can see a 3.14.0~alpha1 being rolled out ocaml/opam-repository#25220

@jmid
Copy link
Collaborator Author

jmid commented Feb 27, 2024

Closing, as the latest macOS trunk run in #437 installed the latest dune.3.14 which includes the fix, and hence no longer triggers the issue.

@jmid jmid closed this as completed Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant