haxelib doesn't work

378 views
Skip to first unread message

rex...@gmail.com

unread,
Jan 16, 2014, 7:39:47 AM1/16/14
to haxe...@googlegroups.com
I have failed to get haxelib to work and it's impossible to find anything helpful online about this issue.
I have no prior knowledge of haxe or nekovm.

Calling haxelib always results in this:
Called from ? line 1
Called from tools/haxelib/Main.hx line 1292
Called from Array.hx line 257
Uncaught exception - Invalid array access

No matter what the arguments are given it will fail, even just 'haxelib' fails.
Haxe itself works, simple code compiled to swf works correctly, it's just haxelib that fails with this error.
I'm working on 32bit Fedora 20.
I first tried to use script available here: http://haxe.org/download
but it resulted in errors.
I then removed everything created by this script and installed  nekovm and nekovm-devel version 2.0.0 via yum.
Then I downloaded haxe-3.0.1-linux32.tar.gz for Linux32, copied it's build folder contents into /usr/lib/haxe/(which is where install script tired to put it) and then made symbolic links from /usr/bin/

Justin L Mills

unread,
Jan 16, 2014, 8:28:07 AM1/16/14
to haxe...@googlegroups.com
I suggest making your own from haxe and neko from

https://github.com/HaxeFoundation

since many linux packagers are out of date. To create from repositories
you will need ocaml installed and some dependencies.

I would use #haxe irc to get more help with the process, there is
documentation online that you can try first that should indicate the
approach.

Another approach is to use what OpenFl.com provide for linux, this might
be a better if you want to use c++ on mobile.

Best Justin


rex...@gmail.com:

rex...@gmail.com

unread,
Jan 16, 2014, 1:14:25 PM1/16/14
to haxe...@googlegroups.com
I'm not sure where exactly I sent last message, possibly to first poster here, I'm sorry - I never used google groups before.

Situation now is: I am stuck with same error.
I build neko and haxe(after uninstalling Fedora package and removing all haxe files) using http://haxe.org/doc/build guide and github HaxeFoundation repos.
Haxelib built(which is in bin/ and is NEKO file) still had the same error.
I also tried using files from site linked on haxe.org: http://hxbuilds.s3-website-us-east-1.amazonaws.com/builds/haxe/linux32/
These tar.gz are actually an extensionless tar, inside gzip archive with extension .tar inside gzip archive with extensions .tar.gz(which is 8 bytes bigger than .tar gzip file)...
Haxelib still has the same error.

In both cases haxe can compile hello world program as swf or neko and neko can launch the generated .n file so it clearly is something happening in haxelib and not neko nor haxe.

Justin L Mills

unread,
Jan 16, 2014, 7:17:49 PM1/16/14
to haxe...@googlegroups.com
If you try doing it manually something like this what happens?

cd /usr/lib
rm -r haxe
git clone https://github.com/HaxeFoundation/haxe.git haxe
cd haxe
git submodule init
git submodule update
make all haxelib
haxelib setup

need to add a path I find it better not to put in in haxe folder so
something like /usr/lib/hxLib

haxelib selfupdate


rex...@gmail.com:

Justin L Mills

unread,
Jan 16, 2014, 7:22:32 PM1/16/14
to haxe...@googlegroups.com
PS you may need to use sudo or su for some parts depending on your setup.

Justin L Mills:

Justin L Mills

unread,
Jan 16, 2014, 7:25:53 PM1/16/14
to haxe...@googlegroups.com
I have not mentioned setting up symbolic links because I think this much
should work without.

Justin L Mills:

rex...@gmail.com

unread,
Jan 17, 2014, 1:58:16 AM1/17/14
to haxe...@googlegroups.com
Last line:
./haxelib setup

results in the same error as any haxelib invokation attempt so far.
Haxe itself as always works.

I hope I don't sound rude but this is really bad, the built package from server was an extensionless tar in a .tar gzip in a .tar.gzip gzip, which is definitely an error and confuses tar.
Install script fails with cryptic errors, haxelib fails with cryptic errors, I had to download idiotic amount of dependencies(I think KDE weights less than OCaml + others) and then it still doesn't work. Site and internet has tons of outdated advice(such as 'if on 64 bit Mac spawn neko for 32 bit one', except it's said to not work anymore).
Why couldn't haxelib be written in something standard that comes with all unixes like python, sh, C or perl so that everyone could just read the code and debug it themselves?
I understand haxefoundation also makes neko but surely neko has less spread and adaptation than any of these four languages...
Definitely not the ease of setup that I imagined from haxe.org page.
I was enthusiastic about haxe and now I'm vaguely interested and discouraged, I'll be keeping just haxe and deleting all dependencies I needed only for build or haxelib.
Let's put it that way: it took me less time building Lua on FreeBSD, Linux and Windows two or three times on each total than it did trying to setup haxelib(which still doesn't work).
And by setup I mean trying out every combination of built/downloaded haxelib and nekovm.

I'm giving up on trying to get haxelib to work, thank you for your help but it seems we both wasted our time.

Nicolas Cannasse

unread,
Jan 17, 2014, 4:13:28 AM1/17/14
to haxe...@googlegroups.com
Le 17/01/2014 07:58, rex...@gmail.com a écrit :
> Last line:
> ./haxelib setup
>
> results in the same error as any haxelib invokation attempt so far.
> Haxe itself as always works.

Hi,

Haxelib does not anymore requires Neko, it can be directly run using
haxe interpreter with:

haxe --run tools.haxelib.Main <args>

Actually that's what we are doing when installing Haxelib on Unix
systems now.

Could you report if this give you some error?

Best,
Nicolas

rex...@gmail.com

unread,
Jan 17, 2014, 11:03:38 AM1/17/14
to haxe...@googlegroups.com
Thank you - that worked, I could install box2d and then I made a mock up bash script and linked it as 'haxelib' to /usr/bin because haxe was complaining when compiling script with -lib box2d.
Everything went without any problem then and it made a correctly working swf file.
Does that mean haxelib ELF binary/NEKO .n file and nekovm itself are not at all needed to use haxe and haxelib?


On Thursday, January 16, 2014 7:39:47 AM UTC-5, rex...@gmail.com wrote:

Nicolas Cannasse

unread,
Jan 17, 2014, 11:11:01 AM1/17/14
to haxe...@googlegroups.com
Le 17/01/2014 17:03, rex...@gmail.com a écrit :
> Does that mean haxelib ELF binary/NEKO .n file and nekovm itself are not
> at all needed to use haxe and haxelib?

Yes.
Actually if you install Haxe from Git with:

make
sudo make install

It will not require Neko.

Nicolas

Reply all
Reply to author
Forward
0 new messages