You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Run 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).
Install the latest version of ocaml along with any other libraries required (will vary per system and release): sudo pkg install ocaml
Follow the ocaml and installing dependencies instructions from the main build guide
Compile: gmake -j$(nproc)
Remove the extra/haxelib_src folder (without removing the haxe and haxelib binaries and _build directory)
Run git checkout <newer haxe release>
Run git submodule update --recursive --init to regenerate extra/haxelib_src
Run opam upgrade to install the new ocaml packages required by the new Haxe version.
Repeat Step 4.
Install the haxe and haxelib binaries where you want.
Logic Behind These Steps
Several required Ocaml packages will fail to build and install due to not supporting the BSDs upstream, causing a platform failure check. Installing the older versions requested by Haxe 4.2.4 and then upgrading them gets around this problem.
Haxe 4.2.4 was the last release to have a dune configuration that properly detected /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.
The old _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
Hashlink seems to compile and work but anything that relies on hxcpp or lime will fail (due to a lack of toolchain configurations for the platform).
HTML5 and Electron support are always in flux and spotty with the BSDs, so expect breakage there but browser libraries should work fine for the most part.
Thanks for reading. I hope this helps people out and support can be improved. :D
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
The text was updated successfully, but these errors were encountered: