Skip to content

Implement preliminary OCaml support #425

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

topolarity
Copy link
Contributor

This is a preliminary implementation of OCaml compiler support in BinaryBuilder.

Dependent on JuliaPackaging/Yggdrasil#11146

@topolarity topolarity force-pushed the ct/ocaml-runner branch 5 times, most recently from 26cc6c5 to 3acfe1b Compare May 10, 2025 21:54
@topolarity
Copy link
Contributor Author

topolarity commented May 10, 2025

This looks to be almost working. There is some slight disagreement about darwinX in the target triples:

sandbox:${WORKSPACE}/srcdir # /opt/aarch64-apple-darwin/bin/ocamlopt.opt -v
The OCaml native-code compiler, version 5.4.0+dev2-2025-04-22
Standard library directory: /opt/aarch64-apple-darwin/bin/../lib/ocaml
sandbox:${WORKSPACE}/srcdir # ocamlopt.opt -v
/opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/ocamlopt.opt: line 5: /opt/aarch64-apple-darwin20/bin/ocamlopt.opt: No such file or directory

Any preference for how to resolve that?

@maleadt
Copy link
Contributor

maleadt commented Jun 27, 2025

/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/bin/ld: /opt/x86_64-linux-gnu/bin/../lib/ocaml/stdlib.a(camlinternalFormatBasics.o): unrecognized relocation (0x2a) in section `.text.caml.camlCamlinternalFormatBasics$entry'
/opt/x86_64-linux-gnu/bin/../lib/gcc/x86_64-linux-gnu/5.2.0/../../../../x86_64-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

I guess this is because of using GCC 6 for building the shards (technically, OCaml only needs GCC 4.9+, but opam, one of the build tools I added to the shard, only builds on GCC 6 or later).

@maleadt maleadt marked this pull request as draft June 27, 2025 16:30
@maleadt maleadt self-assigned this Jun 27, 2025
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

Successfully merging this pull request may close these issues.

2 participants