-
Notifications
You must be signed in to change notification settings - Fork 412
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 3.11 introduces regression on macOS with regarding to executable promotion #9272
Dune 3.11 introduces regression on macOS with regarding to executable promotion #9272
Comments
@haochenx Thanks for the bug report. The fact that it's coming from @anmonteiro The opam instructions for |
@emillon thanks for the triage. I hope it can be reproduced on your side. I'm happy to help running additional diagnosis if that helps. (btw I just spot an incorrect commenting-out of the reproduce.sh in the minimal reproduction example project and fixed it (kxcinc/sample.bc47-dune-reproduce@0550f9d). I hope the broken version didn't hurt your setup too much.. 🙏 ) |
I don't have an arm mac available at the moment, so yes I would be interested in some testing.
Thanks! |
Sure! Here's the result:
|
Thanks. My impression for now is that the correct fix is revert-8361 and that the fix in #8361 was too specific to nix, and maybe to an issue caused by wrong build instructions. Let's wait for @anmonteiro's opinion. |
Specifically, |
Thanks!
Do you think we should mark Dune 3.11.x as incompatible with macOS on opam-repository? |
Ah I didn't realize it was already broken in 3.11. This means it shouldn't block 3.12. It needs to be fixed, though, but this also means that we can fix it in a point release.
I'll try to write a regression test to see exactly what is wrong. I think that it would probably be |
We discussed this during the opam-repo maintainer's meeting a bit. The conclusion was that there's probably very little we can do to precisely disable the installation of affected versions for only the users that may experience this problem (no surprise), and it only affects a tiny percentage of users, so we don't want to mark 3.11.x unavailable on macOS for all the other users. I will do some testing about making dune-site.3.11.x unavailable on macOS will help alleviate this issue without affecting the majority of Dune users. |
I now have a M1 mac and I was able to reproduce the issue from the linked repo. |
and I confirm that I bisect the issue to #8361 |
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Signed-off-by: Etienne Millon <me@emillon.org>
Thanks for tackling this! Please know if there's anything you'd like me to help. |
Fixes ocaml#9272 The fix in ocaml#8361 relies on a `~executable` argument that was not passed in the promotion case. Instead, we call `stat` in `Conf.run_sign_hook`. Signed-off-by: Etienne Millon <me@emillon.org>
CHANGES: ### Added - Add link flags to to `ocamlmklib` for ctypes stubs (ocaml/dune#8784, @frejsoya) - Remove some unnecessary limitations in the expansions of percent forms in install stanza. For example, the `%{env:..}` form can be used to select files to be installed. (ocaml/dune#10160, @rgrinberg) - Allow artifact expansion percent forms (`%{cma:..}`, `%{cmo:..}`, etc.) in more contexts. Previously, they would be randomly forbidden in some fields. (ocaml/dune#10169, @rgrinberg) - Allow `%{inline_tests}` in more contexts (ocaml/dune#10191, @rgrinberg) - Remove limitations on percent forms in the `(enabled_if ..)` field of libraries (ocaml/dune#10250, @rgrinberg) - Support dialects in `dune describe pp` (ocaml/dune#10283, @emillon) - Allow defining executables or melange emit stanzas with the same name in the same folder under different contexts. (ocaml/dune#10220, @rgrinberg, @jchavarri) ### Fixed - coq: Delay Coq rule setup checks so OCaml-only packages can build in hybrid Coq/OCaml projects when `coqc` is not present. Thanks to @vzaliva for the test case and report (ocaml/dune#9845, fixes ocaml/dune#9818, @rgrinberg, @ejgallego) - Fix conditional source selection with `select` on `bigarray` in OCaml 5 (ocaml/dune#10011, @moyodiallo) - melange: fix inconsistency in virtual library implementation. Concrete modules within a virtual library can now refer to its virtual modules too (ocaml/dune#10051, fixes ocaml/dune#7104, @anmonteiro) - melange: fix a bug that would cause stale `import` paths to be emitted when moving source files within `(include_subdirs ..)` (ocaml/dune#10286, fixes ocaml/dune#9190, @anmonteiro) - Dune file formatting: output utf8 if input is correctly encoded (ocaml/dune#10113, fixes ocaml/dune#9728, @moyodiallo) - Fix expanding dependencies and locks specified in the cram stanza. Previously, they would be installed in the context of the cram test, rather than the cram stanza itself (ocaml/dune#10165, @rgrinberg) - Fix bug with `dune exec --watch` where the working directory would always be set to the project root rather than the directory where the command was run (ocaml/dune#10262, @gridbugs) - Regression fix: sign executables that are promoted into the source tree (ocaml/dune#10263, fixes ocaml/dune#9272, @emillon) - Fix crash when decoding dune-package for libraries with `(include_subdirs qualified)` (ocaml/dune#10269, fixes ocaml/dune#10264, @emillon) ### Changed - Remove the `--react-to-insignificant-changes` option. (ocaml/dune#10083, @rgrinberg)
CHANGES: ### Added - Add link flags to to `ocamlmklib` for ctypes stubs (ocaml/dune#8784, @frejsoya) - Remove some unnecessary limitations in the expansions of percent forms in install stanza. For example, the `%{env:..}` form can be used to select files to be installed. (ocaml/dune#10160, @rgrinberg) - Allow artifact expansion percent forms (`%{cma:..}`, `%{cmo:..}`, etc.) in more contexts. Previously, they would be randomly forbidden in some fields. (ocaml/dune#10169, @rgrinberg) - Allow `%{inline_tests}` in more contexts (ocaml/dune#10191, @rgrinberg) - Remove limitations on percent forms in the `(enabled_if ..)` field of libraries (ocaml/dune#10250, @rgrinberg) - Support dialects in `dune describe pp` (ocaml/dune#10283, @emillon) - Allow defining executables or melange emit stanzas with the same name in the same folder under different contexts. (ocaml/dune#10220, @rgrinberg, @jchavarri) ### Fixed - coq: Delay Coq rule setup checks so OCaml-only packages can build in hybrid Coq/OCaml projects when `coqc` is not present. Thanks to @vzaliva for the test case and report (ocaml/dune#9845, fixes ocaml/dune#9818, @rgrinberg, @ejgallego) - Fix conditional source selection with `select` on `bigarray` in OCaml 5 (ocaml/dune#10011, @moyodiallo) - melange: fix inconsistency in virtual library implementation. Concrete modules within a virtual library can now refer to its virtual modules too (ocaml/dune#10051, fixes ocaml/dune#7104, @anmonteiro) - melange: fix a bug that would cause stale `import` paths to be emitted when moving source files within `(include_subdirs ..)` (ocaml/dune#10286, fixes ocaml/dune#9190, @anmonteiro) - Dune file formatting: output utf8 if input is correctly encoded (ocaml/dune#10113, fixes ocaml/dune#9728, @moyodiallo) - Fix expanding dependencies and locks specified in the cram stanza. Previously, they would be installed in the context of the cram test, rather than the cram stanza itself (ocaml/dune#10165, @rgrinberg) - Fix bug with `dune exec --watch` where the working directory would always be set to the project root rather than the directory where the command was run (ocaml/dune#10262, @gridbugs) - Regression fix: sign executables that are promoted into the source tree (ocaml/dune#10263, fixes ocaml/dune#9272, @emillon) - Fix crash when decoding dune-package for libraries with `(include_subdirs qualified)` (ocaml/dune#10269, fixes ocaml/dune#10264, @emillon) ### Changed - Remove the `--react-to-insignificant-changes` option. (ocaml/dune#10083, @rgrinberg)
Expected Behavior
Promoted executable runs fine.
Actual Behavior
Promoted executable getting killed by OS with signal 9.
Directly executing executable in _build folder or executing a manually copied version of the executable behave as expected.
Reproduction
See the minimal reproducing project at https://github.com/kxcinc/sample.bc47-dune-reproduce
Specifications
dune
(output ofdune --version
): 3.11.0 (also reproduced on 3.11.1)ocaml
(output ofocamlc --version
): 5.1.0 (also reproduced on 4.14.0 ~ 5.0.0)Additional information
camomile
library is essential for the reproduction of this bugfix: only sign executables #8361 (suggested by @emillon at
a thread in #dune channel on the OCaml Discord).
output of `dune build --verbose`:
The text was updated successfully, but these errors were encountered: