Hi, I have recently posted this question on stack overflow:
I would like to know if other users of Haxe on Linux are facing this kind of problem and if someone has a solution. I am probably missing something very stupid, but I can’t seem to get haxelib selfupdate to work.
If I try to run haxelib as administrator, it requires me to make a
new haxelib setup (I guess it is one setup per user). Once I did the
setup and ran sudo haxelib selfupdate I got the folloing error:
Error compiling haxelib client: Standard library not found
At least on my setup it isn’t working. I guess this happens because haxe has a setup for each user.
My haxelib path is actually /usr/bin/haxelib. Do you think that this may be causing any problems? The fact that I can’t compile something as sudo is very weird too, I will look into it.
Oh didn’t notice, could explain your problem,
I own the /usr/lib/haxe folder while root owns /usr/bin, most likely similar for you, since a simple user couldn’t write in /usr/bin that’d be a reason why it fails.
The error says it can’t find the std, so maybe try
sudo su
export HAXE_STD_PATH=/usr/lib/haxe/std
haxe -main ...
It’s somewhat amusing to me how haxelib seems to assume that the user who is issuing this command is a member of the “wheel” group.
As a matter of fact, my development-user account is fairly powerless: it certainly isn’t among those privileged souls who are able to successfully “sudo.” Only one user in my entire laptop is able to do that . . .
I think Linux archives are containing files owned by 1000:1000 (eg. see extracted files of install-haxe.sh). I’d say its a security concern, and it should be changed, but I’m not sure who to contact with this…
I think that we should re-think the notion of “selfupdate.” On my machine, as I said, applications are protected from modification and I am by-design not able to run sudo. (The user that is, is a different user, and I’m not sure how to run “selfupdate” from that user such that it would work.)
What I’d do, instead, is to look for an updated installer (for OS/X, in my case). Just as I would do with any other application that I wished to update. I’d like to be notified when haxelib has been upgraded, but I don’t want [it even to be possible …] to “self-upgrade” it.
@sundialservices Just a note (and for people reading this topic or finding it from a search engine), in case it’s not obvious (your message is a bit ambiguous), openfl isn’t making the haxelib tool.
If you have a problem with it or wish to discuss it you should use the HaxeFoundation’s github repository https://github.com/HaxeFoundation/haxelib