Open bedwardly-down opened 2 months ago
Thank you for this information! Perhaps the wiki would be a good place to put this?
I'd like to see if others can improve on and add to this before adding there. It's possible that this could break for others, so getting further testing could help immensely. :D
Hey there. Older Haxe releases used to be supported by the BSD community but were removed awhile back. Here's how I was able to get the latest master to build and run on my system. It's a 2 stage build process that seems to be consistent so far (but could break later on).
Steps
git clone --recursive --branch 4.2.4 https://github.com/HaxeFoundation/haxe.git
- Version 4.2.4 is the latest release that works with the current ocaml version (anything higher breaks without having to modify the dune project files).sudo pkg install ocaml
gmake -j$(nproc)
extra/haxelib_src
folder (without removing the haxe and haxelib binaries and _build directory)git checkout <newer haxe release>
git submodule update --recursive --init
to regenerateextra/haxelib_src
opam upgrade
to install the new ocaml packages required by the new Haxe version.Logic Behind These Steps
/usr/local/lib
(where all of the dependencies it looked for are installed). Newer Haxe releases use a version of dune that's incompatible with FreeBSD and needs manual editing of the dune project files otherwise._build
directory gets reused by gmake to bootstrap the building of the new Haxe versions; there were internal build tools created by ocaml in the earlier steps that work correctly with the current Haxe master, so why not use them?Caveats
Thanks for reading. I hope this helps people out and support can be improved. :D
EDIT: This is related to #8873