OpenFL install fails on El Capitan

When running the two install commands on a fresh install of El Capitan RC I am getting the following error:

$ haxelib run openfl setup
Called from ? line 1
Called from RunScript.hx line 40
Called from helpers/PathHelper.hx line 197
Uncaught exception - Invalid field access : split

lime setup also fails but differently:

$ haxelib run lime setup
Called from /usr/lib/haxe/std/neko/_std/haxe/zip/Compress.hx line 60
Uncaught exception - load.c(237) : Failed to load library : zlib.ndll (dlopen(zlib.ndll, 1): image not found)

I double checked and there is no $HAXEPATH set.

$ echo $HAXEPATH 

$ haxelib list
flow: git [dev:/usr/local/Cellar/haxe/3.2.0/lib/haxe/flow/git]
hxcpp: [3.2.102]
lime-tools: [1.5.7]
lime: [2.6.4]
luxe: git [dev:/usr/local/Cellar/haxe/3.2.0/lib/haxe/luxe/git]
openfl: [3.3.5]
snow: git [dev:/usr/local/Cellar/haxe/3.2.0/lib/haxe/snow/git]

I assume you used the Homebrew path to install? For some reason, that always leads to a broken Haxe install for me. I wish people would stop recommending it :wink:

I posted an install script that worked for me here:

Would you mind giving that a try?

Do haxelib path openfl work?

Could you try compiling and running a normal neko program to check if your installation is working? (hello word is enough
haxe -x test -main Test

There was some problems with haxe/neko on El Capitan so it may not be an issue with openfl.

I have been using OpenFL on El Capitan for every version of the beta. Installing manually to “/usr/local/lib/haxe” (rather than “/usr/lib/haxe” like the standard installer) was what I needed :smile:

You can also test haxelib selfupdate to see if that helps

I did indeed use brew due to the installer trying to write to the new unwriteable directory on El Capitan. Haxe itself works perfectly. I’ve got Luxe up and running with no problems, hxcpp works like a champ, neko is happy, etc.

I assume that you are steverichey on GitHub. I try the second script (with the path fix and no sudo requirement). I already had the symlinks in my install so they failed but everything else finished successfully in the script. Running haxelib openfl setup still fails with the exact same error though. Very odd.

@prime31, I’ve been working on this exact problem for the past few hours and just figured out how to fix it on my end. What do you get with you run haxelib selfupdate?

If it is a permissions error, chmod 777ing that directory fixed everything. Specifically for me, I ran: chmod 777 /usr/local/bin/../Cellar/haxe/3.2.0/bin/haxelib, which is probably overkill, but it worked.

That got me a little fit further but still no luck. It now fails with the error:

Called from /usr/lib/haxe/std/neko/_std/haxe/zip/Compress.hx line 60
Uncaught exception - load.c(237) : Failed to load library : zlib.ndll (dlopen(zlib.ndll, 1): image not found)

That’s the error I always see from people using homebrew, not sure of the cause. I went with a custom (standard) script instead of the brew install on OS X because of this (its working for me currently)

ah, so i’m not the only one who had problems trying to use homebrew to install haxe! you’re right, it gets recommended a lot, which is why i wasted time trying and eventually gave up.

just to ask about this install of openfl on capitan - with the script. will that fix the install path. i think in capitan it install it in a different path completely comparred to the original usr/lib instead it does it to something like usr/local/lib/whatever

because how could you use sometihng like sublime or even atom to build the project. i would think it would bugger up since it doesnt locate. plus the install of libraries im sure would be hard

just asking

/usr/lib is not accessible anymore, so /usr/local/lib is the best alternative I can think of :slight_smile:

It’s a “fact of life” on El Capitan :slight_smile:

the silly apple corp doing what they can to stop tinkering :wink:

(╯°□°)╯︵ ┻━┻


Success! Finally got the install to finish. In case anyone else runs into the issue the fix was to remove haxe installed by homebrew and install directly using the haxe installer from the website. Choose a proper, writeable path for haxelib (/usr/local/lib works) and then OpenFL can isntall.

Glad the new installer is working properly! :smile:

I still need to test Haxe 3.2.1 here, but I assume it’s probably similar to 3.2, and stable. I don’t know why, but Homebrew always broke things for me :frowning: