3

I'm trying to set up haxe development environment. I'd prefer not to install haxe in /usr, so I edited haxe Makefile so that the install directory is a local one:

INSTALL_DIR=/home/liori/Programy/haxe.install

However, now I cannot use haxelib:

% PATH=/home/liori/Programy/haxe.install/bin:$PATH haxelib setup /home/liori/Programy/haxe.install/haxelib
Standard library not found

How to execute haxelib in these circumstances?

liori
  • 40,917
  • 13
  • 78
  • 105

1 Answers1

4

Since the error mentioned "Standard library not found", probably the "std" folder is misplaced somehow.

The haxe standard lib folder, "std", should be placed right next to the "haxe" executable. If you want to have an alternative setup, you should set up an env variable, HAXE_STD_PATH, which points to the "std" folder. Try set it up and run haxelib again.

If that still doesn't work, try to open the haxelib executable in a text editor, it should be a script that runs haxe. See if any of the arguments is wrong.

Yet another option is to make haxelib, which will produce a compiled haxelib executable instead of the script based one.

Andy Li
  • 5,894
  • 6
  • 37
  • 47
  • Thank you, setting the HAXE_STD_PATH indeed changes the result… it's still an error though: "/home/liori/Programy/haxe.install/lib/haxe/std/neko/_std/sys/io/FileInput.hx:60: characters 26-29 : Invalid package : std should be ". – liori Jul 26 '15 at 15:56
  • 1
    You seems to be launching haxelib in the haxe source folder. Just cd to another folder before running haxelib. – Andy Li Jul 26 '15 at 16:29