Compiling error: "Standard library not found" in previously-working install

Yesterday I tried to compile my project with “lime test linux”, and got the error “Standard library not found”. The project has not changed since successfully compiling it a few days ago. I believe I upgraded the OS (Arch Linux) before the error occurred, and it moved the standard library.

I have since updated the $HAXE_STD_PATH environment variable so it points to the right place.

When I run “lime test linux -verbose”, this is the last bit of output:

Running command: BUILD
 - Copying library file: /usr/lib/haxe/lib/hxcpp/3,2,205/bin/Linux64/std.dso -> Export/linux64/cpp/bin/std.dso
 - Copying library file: /usr/lib/haxe/lib/hxcpp/3,2,205/bin/Linux64/regexp.dso -> Export/linux64/cpp/bin/regexp.dso
 - Copying library file: /usr/lib/haxe/lib/hxcpp/3,2,205/bin/Linux64/zlib.dso -> Export/linux64/cpp/bin/zlib.dso
 - Copying library file: /usr/lib/haxe/lib/lime/2,8,3/ndll/Linux64/lime.ndll -> Export/linux64/cpp/bin/lime.ndll
 - Running command: haxe Export/linux64/cpp/haxe/release.hxml -D HXCPP_M64
Standard library not found

However, if I just run that last command (the one which appears to fail) by itself, it works:

haxe Export/linux64/cpp/haxe/release.hxml -D HXCPP_M64

It pauses to think for a while, and then returns me to the command line as if everything worked correctly.

Is OpenFL overriding the $HAXE_STD_PATH variable, or is something else going wrong?

I can compile plain Haxe programs using the standard library with no problem.

The install was all working until I upgraded Arch a few days back. I could try re-installing, but I’d rather work out what is broken if possible.

reinstall haxe and neko, some Linuxes clear the links and lib folder when upgrading

Done, same problem remains.

EDIT: I cleared all installed Haxe and Neko files with this command:

pacman -Rsn haxe neko

That would leave configuration files in my home directory, if any, but all system files would have been removed.

Can you clarify, which links and lib folder might be cleared?

  • Haxelib libraries are installed in /usr/lib/haxe/lib on my system, and they’re all still there.

  • I don’t know what links to check for.

  • The standard library is now located at /usr/share/haxe/std/ and this is the content of my $HAXE_STD_PATH:

    /usr/share/haxe/std:/usr/lib/haxe/lib:.

I’ve tried various permutations, with trailing / characters or without. The fact that the failing command works when I run it directly from the command line implies that OpenFL is doing something strange with the environment.

Just found the answer to this (returning to OpenFL after a year of doing other things), bumping the thread in case anyone else stumbles on the same problem:

There’s a file in my home directory, ~/.lime/config.xml which pointed to the old incorrect locations of the std and lib directories. I updated these to the new correct locations (/usr/lib/haxe/std and /usr/lib/haxe/lib) and now it’s all working again.

1 Like