COMMUNITY

Ubuntu 18.04 Recipe for target 'haxelib' failed client.hxml

Hi !

I’m in the painful process of trying to install Haxe on Ubuntu 18.04. I tried to add the ppa and install it from there. But since I’m behind a corporate proxy, the setup is pretty complicated and I still don’t understand what’s keeping the ppa from working correctly.
So I tried downloading the binaries directly, but I can’t find any documentation on how to install those binaries.
Ok then, compile from source it is. I tried to follow the instructions on here, but yet again, it’s incomplete. You have to find the correct package containing the librairies and there is no mention of “opam”. And then you run make and the recipe immediatly fails (I don’t remember the error message and don’t have the shell at hand anymore).
Then I read on the same page that all the instructions are also in the extra/BUILDING.md file. I figured the webpage would contain the exact same information, but it’s not the same.
So I followed everything in the file and installed OCaml and OPAM. I’m then introduced to [ERROR] No switch is currently set. Please use 'opam switch' to set or install a switch and so I followed this thread.
Works amazingly, make is happy, until it ran into that nice

make[1]: Leaving directory '/home/SylvainSoKette/Downloads/haxe-4.0.0'
(cd /home/SylvainSoKette/Downloads/haxe-4.0.0/extra/haxelib_src && /home/SylvainSoKette/Downloads/haxe-4.0.0/haxe client.hxml && nekotools boot run.n)
Error: Could not process argument client.hxml (file not found)
Invalid character:  
Makefile:192: recipe for target 'haxelib' failed
make: *** [haxelib] Error 1

So I’m kinda stuck right now, and don’t really know what to do :frowning:

Any help would be appreciated, have a great day everyone ! :sunny:

What does the extra/haxelib_src folder contains?
If nothing you are missing the submodule, do git submodule update --init and retry.

The binaries are pretty easy to use, personally I put the content of the archive in /opt/haxe and add a symlink for haxe and haxelib with ln -s /opt/haxe/haxe /usr/local/bin/haxe and ln -s /opt/haxe/haxelib /usr/local/bin/haxelib and then I can use it normally.

Or when you don’t have root access just extract it in your home directory and add to .bashrc export PATH=/home/username/path/to/haxe:$PATH

1 Like

What does the extra/haxelib_src folder contains?

Nothing :smiley:

If nothing you are missing the submodule, do git submodule update --init and retry.

Indeed I just read again that crucial part in the BUILDING.md file… I feel kinda dumb now.
I downloaded the sources from the provided tarball here and just entirely skipped the “Obtaining the source” paragraph from the documentation, since I already had obtained the source.

Thanks for the help ! :smile: