Fedora 21 has a working OCaml ARM64

Update: Thanks to Peter Robinson, there is now a build of OCaml for aarch64 in the Fedora repository.

I have backported the upstream ARM64 support into Fedora 21’s OCaml, so you can now use it to generate native ARM64/AArch64 binaries. If you don’t have hardware, use qemu to emulate it instead.

6 Comments

Filed under Uncategorized

6 responses to “Fedora 21 has a working OCaml ARM64

  1. Fantastic! Out of interest, why did you disable ocamldoc.opt/camlp4.opt; are there still lurking bugs in the code generator that causes them to fail?

    • rich

      Very observant! ocamldoc.opt fails to link because of this relocation bug.

      camlp4.opt also fails to link for the same reason, but only in the hacked-up backport tree that we use in Fedora, not in the upstream tree, which is why I didn’t mention this in the bug report.

      Both errors seem to be essentially data-driven linking problems, and something to do with the size of the final executable. I’ve compiled a fair bit of other OCaml software in Fedora in the mean time and I’ve not come across the problem anywhere else so far.

  2. If Fedora 21 has just started to be developed, why a backport instead of an upgrade to the latest version that makes sense?

    • rich

      Because there’s no released (upstream) version of OCaml that has the ARM64 backend, and I don’t want to put an intermediate version of OCaml into Fedora 21 because of weak binary compatibility eg for things like cmi/cmo files.

      However if a released version of OCaml w/ ARM64 turns up before Fedora 21 goes out, then I will upgrade to it.

  3. Do I need to be running an ARM version of Fedora to compile OCaml code to ARM?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.