Updating haxelib from 4.0.2 to 4.0.3 on Windows

So I’ve got a fresh Windows 10 install. I’ve downloaded the latest haxe binaries pack from the website and learned that haxelib 4.0.2 is broken (any attempt to install anything results in Error: Failed with error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed ). My understanding is that this issue was fixed in 4.0.3 but how can I update the version? I couldn’t find the new binaries anywhere. I see there is a haxelib haxelib but I can’t use haxelib to update haxelib due to the mentioned error. I downloaded the zip file from the haxelib page but it only contains Neko bytecode binary (run.n) and the source code. So what can I do in order to get the Windows binary? Build it from the source code? Or maybe I just missed the link to the latest build?

You should be able to install the local zip file using:

haxelib install package.zip

Then whenever you call the system installed haxelib, it will redirect to the updated version.

However, this looks like a neko problem, so updating Haxelib is unlikely to change anything. This looks like this problem:

Hm. So what do people do in order to make it work on windows? Or does it fail only for some users? Maybe I can build it from source code with hxcpp or hashlink? That would work for me.

According to the linked issue, it would seem that downloading from lib.haxe.org using something like curl might download the certificates and might prevent future certificate issues for haxelib? So might be worth trying something like:
curl -sSLf https://lib.haxe.org/p/haxelib/4.0.3/download -o haxelib.zip
See:
"Error: X509 - Certificate verification failed" in a clean Windows environment · Issue #196 · HaxeFoundation/neko · GitHub

I’m not too sure how people fix this issue, since I’ve used Haxelib on Windows for a while with no issues, possibly because it was never on a completely fresh installation. I think sometimes people get one-off failures like this and they go away after a while.

There is also this OpenFL post about a similar issue on Mac:

Maybe I can build it from source code with hxcpp or hashlink?

Currently, the haxelib git repo doesn’t have a configuration for building with hxcpp/hl, but it might not be too hard to try this. Although, neko, hxcpp, and hashlink all use mbedtls so I’m not sure how likely it is to make a difference.

1 Like

Ok, simply downloading something from haxelib using curl did the trick. I think it’s a good enough solution for me right now. Thank you!

1 Like