Skip to content

Add OCaml compiler support #1382

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 2 commits into
base: master
Choose a base branch
from
Draft

Add OCaml compiler support #1382

wants to merge 2 commits into from

Conversation

topolarity
Copy link
Contributor

No description provided.

@topolarity
Copy link
Contributor Author

Tried to run the tests locally but ran into:

Caused by:
  failed to create directory `/usr/share/testsuite/rust/cargo_build/target`

Caused by:
  Cross-device link (os error 18)
# ...
    [2] autobuild(dir::AbstractString, src_name::AbstractString, src_version::VersionNumber, sources::Vector{<:AbstractSource}, script::AbstractString, platforms::Vector, products::Vector{<:Product}, dependencies::Vector{<:AbstractDependency}; verbose::Bool, debug::Bool, skip_audit::Bool, ignore_audit_errors::Bool, autofix::Bool, code_dir::Union{Nothing, String}, require_license::Bool, dont_dlopen::Bool, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
      @ BinaryBuilder ~/repos/BinaryBuilder.jl/src/AutoBuild.jl:932
    [3] (::var"#25#27"{Platform, Vector{Platform}})(build_path::String)
      @ Main ~/repos/BinaryBuilder.jl/test/building.jl:132

@giordano
Copy link
Member

JuliaPackaging/BinaryBuilderBase.jl#395

@maleadt maleadt force-pushed the ct/ocaml-support branch from 0d7caa5 to f0b86a5 Compare June 27, 2025 12:22
@maleadt
Copy link
Contributor

maleadt commented Jun 27, 2025

Where do the hello_world_... binaries come from?

@giordano
Copy link
Member

You mean the https://github.com/JuliaBinaryWrappers/HelloWorldC_jll.jl package? That (and friend) are normal packages in Yggdrasil.

@maleadt
Copy link
Contributor

maleadt commented Jun 27, 2025

That provides hello_world; where do these come from?

ExecutableProduct("hello_world_c", :hello_world_c),
ExecutableProduct("hello_world_cxx", :hello_world_cxx),
ExecutableProduct("hello_world_fortran", :hello_world_fortran),
ExecutableProduct("hello_world_go", :hello_world_go),
]
if !(platforms_match(shard, Platform("i686", "windows")) ||
platforms_match(shard, Platform("aarch64", "freebsd")) ||
platforms_match(shard, Platform("riscv64", "linux")))
# Rust is broken on 32-bit Windows and unavailable on FreeBSD AArch64 and Linux RISC-V, let's skip it
push!(products, ExecutableProduct("hello_world_rust", :hello_world_rust))
end

Because those fail during testing:

[ Info: ["hello_world_ocaml"] does not exist, reporting unsatisfied
┌ Error: Built testsuite but hello_world_ocaml still unsatisfied:
└ @ BinaryBuilder /data/staticfloat/bb_azp/rootfs/agent_3/_work/1/s/src/AutoBuild.jl:973
##[error]Built testsuite but hello_world_ocaml still unsatisfied:

@giordano
Copy link
Member

Ah, the testsuite is in https://github.com/JuliaPackaging/Yggdrasil/tree/1faf9cffaaeff93f8e9c0ae48b2e75ec19545147/0_RootFS/Rootfs/bundled/testsuite, needs building a new RootFS as well...

This is an area where BB2 would hopefully be better and we can dynamically generate all these extra files on the file in one package, instead of having to build a new layer for each thing....

@maleadt
Copy link
Contributor

maleadt commented Jun 27, 2025

So that just needs to contain the source files of a hello_world-generating binary? Or would it be fine to add some code generating it to the build script; it's a simple Hello World print after all?

@giordano
Copy link
Member

So that just needs to contain the source files of a hello_world-generating binary?

Yes, it pretty much needs a Makefile to generate the executable and that's it.

Or would it be fine to add some code generating it to the build script; it's a simple Hello World print after all?

Uhm, if I remember correctly that testsuite is also in BinaryBuilder tests, you'd need to duplicate the generation. For quick testing is probably fine, I think it'd be nicer to eventually have the Makefile in the testsuite though.

@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.

3 participants