Repository navigation
[3.23.1] backport #14443 - #14465
Merged
Merged
[3.23.1] backport #14443#14465
Conversation
…itches (#14443) The secondary compiler fallback in bootstrap.ml was broken in two ways: 1. It invoked `ocamlfind -toolchain secondary ocaml`, but `ocamlfind` does not support the `ocaml` toplevel as a subcommand. Only compiler tools like `ocamlc` and `ocamlopt`. We now query `ocamlfind -toolchain secondary query ocaml -format "%d"` to locate the secondary compiler's bin directory and invoke `ocaml` and `ocamllex` from there directly. 2. The secondary `ocaml` toplevel would pick up the primary switch's `unix.cma` and `dllunix.so`, which are ABI-incompatible. We now pass `-I` for the secondary compiler's lib directory and set `CAML_LD_LIBRARY_PATH` to its stublibs directory. The opam constraint is restored to the historical pattern, allowing dune to be installed on switches with OCaml >= 4.02 via ocamlfind-secondary: ``` ("ocaml" {>= "4.14"} | ("ocaml" {>= "4.02" & < "4.14~~"} & "ocamlfind-secondary")) ``` Tested on OCaml 4.02.3 and 4.13.1 switches with ocaml-secondary-compiler 4.14.2. - Fixes #13908 (cherry picked from commit 9e65007) Signed-off-by: Shon Feder <[email protected]>
20 tasks done
Alizter
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #14443 onto 3.23.1-rc