The recommended way to install Haxe on Linux is to use the official packages, but these do not support any beta or RC releases.
I gave up building from source and updated my old Linux install script:
(The current script is linked to the final dev build on the day of the Haxe 4.0.0-rc.1 release)
The HAXE_VERSION
line can be updated using a newer or different nightly build name
Enjoy!