Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haxe install does not work on OS X El Capitan #4483

Closed
jgranick opened this issue Aug 14, 2015 · 30 comments
Closed

Haxe install does not work on OS X El Capitan #4483

jgranick opened this issue Aug 14, 2015 · 30 comments
Assignees

Comments

@jgranick
Copy link

After upgrading from OS X 10.10 to 10.11, I found that haxe and neko no longer worked from the terminal.

It appears that "/usr/lib" and "/usr/bin" are no longer writeable, even with sudo permissions.

We need to install to "/usr/local/lib" and "/usr/local/bin" instead

After manually installing there, things are working fine here 😄

@jgranick
Copy link
Author

For anyone who is using the beta, here is a script that will help install Haxe and Neko in the meantime 😄

#!/bin/sh

echo “Downloading Neko”

curl -O http://nekovm.org/media/neko-2.0.0-osx64.tar.gz

echo “Installing Neko”

sudo mkdir -p /usr/local/lib/neko
sudo tar xvzf neko-2.0.0-osx64.tar.gz -C /usr/local/lib/neko --strip-components=1

sudo ln -s /usr/local/lib/neko/libneko.dylib /usr/local/lib/libneko.dylib
sudo ln -s /usr/local/lib/neko/neko /usr/local/bin/neko
sudo ln -s /usr/local/lib/neko/nekoc /usr/local/bin/nekoc
sudo ln -s /usr/local/lib/neko/nekotools /usr/local/bin/nekotools

echo “Downloading Haxe”

curl -O http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-osx.tar.gz

echo “Installing Haxe”

sudo mkdir -p /usr/local/lib/haxe
sudo tar xvzf haxe-3.2.0-osx.tar.gz -C /usr/lib/haxe --strip-components=1

sudo ln -s /usr/local/lib/haxe/haxe /usr/local/bin/haxe
sudo ln -s /usr/local/lib/haxe/haxelib /usr/local/bin/haxelib

sudo mkdir -p /usr/local/lib/haxe/lib
sudo chmod -R 777 /usr/local/lib/haxe/lib
haxelib setup /usr/local/haxe/lib

@jgranick jgranick changed the title Haxe install is not allowed on OS X El Capitan Haxe install does not work on OS X El Capitan Aug 14, 2015
@andyli
Copy link
Member

andyli commented Aug 14, 2015

Yeah, we need to update the installer.
Btw, would you check if brew install haxe works?

@ruby0x1
Copy link

ruby0x1 commented Aug 17, 2015

I tested brew install, but also worth noting is that previously installed /usr/lib/haxe becomes inaccessible, so removing or changing things from the location after upgrade isn't possible with the Rootless feature they have added.

(It is possible to boot around this but that discussion should be sought after elsewhere).

@steverichey
Copy link

In my case, /usr/lib/haxe was completely wiped (this is in Beta 7) and I had to reinstall Haxe entirely. However, brew install haxe --with-neko successfully installed Haxe. On a somewhat unrelated note however, I'm unable to run haxelib run lime setup due to errors with zlib, if anyone experiences similar.

@steverichey
Copy link

I made some changes to @jgranick's script:

#!/bin/sh

set -e

echo “Downloading Neko”

curl -O http://nekovm.org/media/neko-2.0.0-osx64.tar.gz

echo “Installing Neko”

mkdir -p /usr/local/lib/neko
tar xvzf neko-2.0.0-osx64.tar.gz -C /usr/local/lib/neko --strip-components=1

ln -s /usr/local/lib/neko/libneko.dylib /usr/local/lib/libneko.dylib
ln -s /usr/local/lib/neko/neko /usr/local/bin/neko
ln -s /usr/local/lib/neko/nekoc /usr/local/bin/nekoc
ln -s /usr/local/lib/neko/nekotools /usr/local/bin/nekotools

echo “Downloading Haxe”

curl -O http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-osx.tar.gz

echo “Installing Haxe”

mkdir -p /usr/local/lib/haxe
tar xvzf haxe-3.2.0-osx.tar.gz -C /usr/local/lib/haxe --strip-components=1

ln -s /usr/local/lib/haxe/haxe /usr/local/bin/haxe
ln -s /usr/local/lib/haxe/haxelib /usr/local/bin/haxelib

mkdir -p /usr/local/lib/haxe/lib
chmod -R 777 /usr/local/lib/haxe/lib
haxelib setup /usr/local/haxe/lib

This fixes a typo (a missing /local), removes the use of sudo so that the installation doesn't require sudo to run, and exits the script on error.

@waneck
Copy link
Member

waneck commented Aug 31, 2015

Update: I've taken a look at this today, and it seems that Apple has obliterated PackageMaker from existence - which is VERY annoying since the package was built on top of it, and I had spent a lot of time to be able to take an existing .pkg file built with it and re-package it with updated binaries (on a Linux machine)
I'll see if I can hack my way around this destination change with no need to rebuild the pkg file; otherwise we'll need to make the package again from scratch (and look if it's still compatible with updating binaries). Thanks, Apple.

@ruby0x1
Copy link

ruby0x1 commented Sep 1, 2015

There's plenty of packaging tools though, like http://s.sudre.free.fr/Software/Packages/about.html ?

@waneck
Copy link
Member

waneck commented Sep 1, 2015

@waneck
Copy link
Member

waneck commented Sep 1, 2015

@underscorediscovery it's not about the lack of options - it's just annoying - specially since we do the repackaging on linux, which was a delicate process and depended on the [undocumented and reverse-engineered] .pkg structure that PackageMaker generated. It's just an all too common pattern of how Apple deals with its developers.

@ruby0x1
Copy link

ruby0x1 commented Sep 1, 2015

It sounds a bit like a mixture. I don't condone pulling the rug on things at all if it can be helped, but it doesn't sound like that case here. "delicate processes" tend to break when things change - it's in the definition.

I'll try the installer when I get a chance, my laptop is the one where I can mess with the settings atm - will have a run at it later if I can.

@waneck
Copy link
Member

waneck commented Sep 2, 2015

Any news? I'd like to solve this before 3.2.1

On Mon, Aug 31, 2015, 10:02 PM Sven Bergström notifications@github.com
wrote:

It sounds a bit like a mixture. I don't condone pulling the rug on things
at all if it can be helped, but it doesn't sound like that case here.
"delicate processes" tend to break when things change - it's in the
definition.

I'll try the installer when I get a chance, my laptop is the one where I
can mess with the settings atm - will have a run at it later if I can.


Reply to this email directly or view it on GitHub
#4483 (comment)
.

@ruby0x1
Copy link

ruby0x1 commented Sep 3, 2015

Will have the laptop up a few hours from now, and will be around for more rigorous testing as needed.

@ruby0x1
Copy link

ruby0x1 commented Sep 4, 2015

Well, it at least appears to install the std lib and the haxelib binary, but the haxe binary I can't locate.
The installer put the /usr/local/lib/haxe/ and /usr/local/lib/neko/ folders, and /usr/local/bin/haxelib exists but /usr/local/bin/haxe is not found.

(Checked also in /usr/bin, /usr/local/bin, find / | grep haxe etc)

@waneck
Copy link
Member

waneck commented Sep 4, 2015

Thanks! I'll see if I can fix that tonight

@firmread
Copy link

firmread commented Sep 9, 2015

I'm just started learning Haxe but it seems like I'll have to wait for this issue to be closed before I can start playing around. finger crossed :))

@andyli
Copy link
Member

andyli commented Sep 9, 2015

@firmread don't wait, use homebrew (brew install haxe) ;)

@firmread
Copy link

firmread commented Sep 9, 2015

@andyli Thanks for suggestion! I tried that and got haxe down with brew but not neko
either brew install neko or brew install haxe --with-neko give me this:

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing dependencies for haxe: neko
==> Installing haxe dependency: neko
==> Cloning https://github.com/HaxeFoundation/neko.git
Updating /Library/Caches/Homebrew/neko--git
==> Checking out revision 22c49a89b56b9f106d7162710102e9475227e882
==> make os=osx LIB_PREFIX=/usr/local INSTALL_FLAGS=
clang -Wall -O3 -fPIC -fomit-frame-pointer -I vm -D_GNU_SOURCE -I libs/common -L/usr/local/lib -L/usr/local/lib -I/usr/local/include  -o vm/threads.o -c vm/threads.c
clang  -o bin/libneko.dylib vm/alloc.o vm/builtins.o vm/callback.o vm/interp.o vm/load.o vm/objtable.o vm/others.o vm/hash.o vm/module.o vm/jit_x86.o vm/threads.o -ldl /usr/local/lib/libgc.a -lm -dynamiclib -single_module -install_name @executable_path/libneko.dylib
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/libneko.dylib] Error 1

READ THIS: https://git.io/brew-troubleshooting

@andyli
Copy link
Member

andyli commented Sep 9, 2015

@firmread Try brew install neko --HEAD. We really need a new neko release (HaxeFoundation/neko#69) :P

@firmread
Copy link

@andyli I'm still stuck with the same error.
It seems 10.11 GM Candidate is already coming out today though. Will try it again after updating. Thank you!

@andyli
Copy link
Member

andyli commented Sep 10, 2015

@firmread As suggested in Homebrew/legacy-homebrew#40653, may be you can try installing Xcode 7 and configure Xcode 7 as the default toolchain.

@firmread
Copy link

@andyli Wow, finally got it! thanks you so much!

just as an easy reference for my future self. to set Xcode 7 as default toolchain, simply runs:

$ sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer

then to check current default toolchain:

$ xcode-select -p

in which it should return /Applications/Xcode-beta.app/Contents/Developer

@ruby0x1
Copy link

ruby0x1 commented Sep 12, 2015

@waneck I didn't want to make a separate issue for this but the license file in haxe installer has some things that should be addressed.

  • Spelling of license (The MIT Licence)
  • Dates (Copyright (C)2005-2012 Haxe Foundation) (2012)

Is there anything else to test on El Capitan? I've installed the GM and can test more.
The latest installer (as of now) still doesn't create the haxe command (correctly?) even on Yosemite (from nightly downloads). Actually, it seems the haxe binary is just not in the installer, it's not in the folder.

@waneck
Copy link
Member

waneck commented Sep 12, 2015

I'll try to fix those issues today

On Sat, Sep 12, 2015, 3:59 PM Sven Bergström notifications@github.com
wrote:

@waneck https://github.com/waneck I didn't want to make a separate
issue for this but the license file in haxe installer has some things that
should be addressed.

  • Spelling of license (The MIT Licence)
  • Dates (Copyright (C)2005-2012 Haxe Foundation) (2012)

Is there anything else to test on El Capitan? I've installed the GM and
can test more.


Reply to this email directly or view it on GitHub
#4483 (comment)
.

@waneck
Copy link
Member

waneck commented Sep 13, 2015

@ruby0x1
Copy link

ruby0x1 commented Sep 13, 2015

Some strange results make me wonder,

  • haxe_2015-09-13_master_77d171b.tar.gz
  • haxe_latest.tar.gz

These two files download a 3.2.0 installer, just named "3.2.0", they also don't mention snapshot information or git revisions. Upon installing the haxe -version shows 3.2.0 as well. This means at least, it installed correctly (it seems).

After removing everything, I tried haxe_2015-09-13_development_2a75f0b.tar.gz which downloads as haxe-3.2.0-dev-2a75f0b.pkg - it was minutes difference on the site.

This one installed and the haxe -version command was 3.3.0 (git build development @ 2a75f0b)
It seems the installer worked ok for the haxe command line and everything too.

ThIs is what the development one shows:
screen shot 2015-09-13 at 12 25 29 pm

This is what the "latest" one shows.
screen shot 2015-09-13 at 12 28 32 pm

So either the "latest" installer is just confused about it's identity it's got a problem, but the latest development snapshot installer seemed to work as expected.

@waneck
Copy link
Member

waneck commented Sep 13, 2015

this must have something to do with how I forcefully kickstarted the builds - it ended up building master instead of development. Anyway, good to know it's working! We can make a release now then

@waneck waneck closed this as completed Sep 13, 2015
@ruby0x1
Copy link

ruby0x1 commented Sep 13, 2015

If you have a "final" build to test before it's up let me know, but sounds good.

What about users that install when they have it installed in /usr/lib/haxe from before?
At minimum there should be information regarding the difference in the installer.

@leshido
Copy link

leshido commented Oct 6, 2015

Any chance we can have the latest working installer on the Haxe website? The one there still doesn't work on El Capitan, which by now is officially released.
Also, just noticed that when running haxelib setup it prompts to default install on the now non-writable location /usr/lib/haxelib.

@jangdan
Copy link

jangdan commented Oct 10, 2015

yeah, please update the Haxe website installer. a lot of confusion here, especially for those who are like me who got their disks formatted (for a FRESH start) while updating and are in the process of reinstalling all these tools.

I couldn't even install the LAME mp3 library because of this new restriction. Apple is so weird sometimes.

@deers
Copy link

deers commented Oct 11, 2015

i follow @jgranick step and it's work, i can compile to flash target, but when i compile to android target i got this error:

Called from ? line 1
Called from CommandLineTools.hx line 1385
Called from CommandLineTools.hx line 25
Called from a C function
Called from CommandLineTools.hx line 126
Called from CommandLineTools.hx line 604
Called from lime/project/PlatformTarget.hx line 70
Called from lime/tools/platforms/AndroidPlatform.hx line 262
Called from lime/tools/helpers/PathHelper.hx line 422
Called from /usr/lib/haxe/std/neko/_std/sys/FileSystem.hx line 81
Uncaught exception - std@sys_create_dir

seem there's some script still calling to /usr/lib/haxe

any idea how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants