Solved: Haxe 4.14 on Raspbian

[EDIT : For complete build instructions, see the post below]

Hi. Im trying to get Haxe 4 (4.1.4) working on a Raspberry Pi (without gui).
3.4.7 works ok, but i need Haxe 4. Have not been successful so far.

Following the official guide ( doesnt seem to work, i always get the following error:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 haxe : Depends: libc6 (>= 2.29) but 2.24-11+deb9u4 is to be installed
        Depends: libmbedtls12 (>= 2.13) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Does anyone have a solution for this? Would be very grateful :slight_smile:

So, if anybody else needs to know - the answer here seems to be : You have to build from Haxe from source. So you need to install Ocaml, and then follow this : .

Note that you also have to download and build Neko from source :

And i also had to copy files from neko/bin to /usr/shared/neko

1 Like

So, to follow up for other people having problems with this, here is a complete installation guide for setting up and building haxe and neko/haxelib from scratch on a clean raspbian install :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git

# Install Ocaml / Opam :

mkdir setup
sudo chmod 777 setup
cd setup
sudo apt-get install m4
sudo apt-get install ocaml
sudo apt-get install bubblewrap

git clone
cd opam
make -j 4 lib-ext
make -j 4
sudo make install
opam init
eval $(opam env)

# Haxe :
(mkdir/cd folder where you want haxe to be stored)

sudo apt install libpcre3-dev zlib1g-dev

git clone --recursive -b 4.1.4
sudo chmod -R 777 haxe/
opam pin add haxe path/to/haxe --kind=path --no-action
opam install haxe --deps-only
sudo make install
export HAXE_STD_PATH=/usr/lib/haxe/std

# Neko 
(mkdir/cd folder where you want neko to be stored)

mkdir nekobuild
cd nekobuild

git clone
sudo apt-get -y install cmake
sudo apt-get install libgc-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install libssl-dev
sudo apt-get install gtk+-2.0
sudo apt-get install apache2-dev
sudo apt-get install libmariadb-dev
cmake neko
sudo make install

and then :

haxelib setup