Can't setup OpenFL on Ubuntu - NekoAPI interface?

Hello, I am new to OpenFL / haxe and wanted to give it a go. I followed these instructions:

Per haxe ubuntu setup’s instructions I installed haxe to a folder ~/dev/haxelib

Then via openfl instructions I installed openfl okay. The last step to setup causes an error though:

[email protected]:~/dev$ haxelib run openfl setup
Called from lime/_backend/native/NativeCFFI.hx line 33
Called from lime/system/CFFI.hx line 184
Called from lime/system/CFFI.hx line 332
Uncaught exception - Could not find NekoAPI interface.

Here are my installed versions:

[email protected]:~/dev$ haxelib version
3.3.0
[email protected]:~/dev$ haxelib list
openfl: [6.5.1]
[email protected]:~/dev$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:        17.10
Codename:       artful

Any suggestions?

Thank you!

So you installed Haxe, like this?

sudo add-apt-repository ppa:haxe/releases -y
sudo apt-get update
sudo apt-get install haxe -y
mkdir ~/haxelib && haxelib setup ~/dev/haxelib

…I was afraid this might happen :frowning:

We used to maintain our own Linux install scripts to avoid just this sort of problem, but recently switched in efforts for solidarity :slight_smile:

This might be due to a missing symlink for libneko.so, like:

sudo ln -s /usr/lib/neko/libneko.so /usr/lib/libneko.so

…I’m not sure if libneko.so is located there on your system, it might be “/usr/local/lib”, or have a suffix, like “libneko.so.1”

If we could figure out what’s wrong in the PPA version, hopefully we could contribute those patches back. If all else fails, you can remove Haxe and Neko, and install using our script, here:

http://builds.openfl.org.s3-us-east-2.amazonaws.com/haxe/haxe-3.4.2-linux-installer.tar.gz

Thank you for your help and patience :slight_smile:

I don’t have a symlink for libneko.so in either /usr/lib or /usr/lib/neko/. I do have one for libneko.so.2 though. I tried adding one for libneko.so, but it still fails in the same place. Here’s what I have after my change:

[email protected]:~/dev$ ls -lth /usr/lib/libneko.so*
lrwxrwxrwx 1 root root  25 Nov 30 14:52 /usr/lib/libneko.so -> /usr/lib/libneko.so.2.1.0
lrwxrwxrwx 1 root root  16 Nov 10  2016 /usr/lib/libneko.so.2 -> libneko.so.2.1.0
-rw-r--r-- 1 root root 99K Nov 10  2016 /usr/lib/libneko.so.2.1.0

And inside my neko folder:

[email protected]:~/dev$ ls -lth /usr/lib/neko/
total 1.3M
-rw-r–r-- 1 root root 114K Nov 10 2016 mod_neko2.ndll
-rw-r–r-- 1 root root 96K Nov 10 2016 mod_tora2.ndll
-rw-r–r-- 1 root root 130K Nov 10 2016 mysql5.ndll
-rw-r–r-- 1 root root 57K Nov 10 2016 mysql.ndll
-rw-r–r-- 1 root root 64K Nov 10 2016 nekoml.std
-rw-r–r-- 1 root root 34K Nov 10 2016 regexp.ndll
-rw-r–r-- 1 root root 34K Nov 10 2016 sqlite.ndll
-rw-r–r-- 1 root root 85K Nov 10 2016 ssl.ndll
-rw-r–r-- 1 root root 586K Nov 10 2016 std.ndll
-rw-r–r-- 1 root root 27K Nov 10 2016 ui.ndll
-rw-r–r-- 1 root root 35K Nov 10 2016 zlib.ndll

Is there also a “libneko.so” file under “/usr/lib/neko”? If not, does adding one (or a symlink to one) help?

There was not, but unfortunately adding it did not help:

[email protected]:~/dev$ sudo ln -s /usr/lib/libneko.so.2.1.0 /usr/lib/neko/libneko.so
[sudo] password for sky:
[email protected]:~/dev$ ls -lth /usr/lib/neko/
total 1.3M
lrwxrwxrwx 1 root root 25 Nov 30 15:14 libneko.so -> /usr/lib/libneko.so.2.1.0
-rw-r–r-- 1 root root 114K Nov 10 2016 mod_neko2.ndll
-rw-r–r-- 1 root root 96K Nov 10 2016 mod_tora2.ndll
-rw-r–r-- 1 root root 130K Nov 10 2016 mysql5.ndll
-rw-r–r-- 1 root root 57K Nov 10 2016 mysql.ndll
-rw-r–r-- 1 root root 64K Nov 10 2016 nekoml.std
-rw-r–r-- 1 root root 34K Nov 10 2016 regexp.ndll
-rw-r–r-- 1 root root 34K Nov 10 2016 sqlite.ndll
-rw-r–r-- 1 root root 85K Nov 10 2016 ssl.ndll
-rw-r–r-- 1 root root 586K Nov 10 2016 std.ndll
-rw-r–r-- 1 root root 27K Nov 10 2016 ui.ndll
-rw-r–r-- 1 root root 35K Nov 10 2016 zlib.ndll
[email protected]:~/dev$ haxelib run openfl setup
Called from lime/_backend/native/NativeCFFI.hx line 33
Called from lime/system/CFFI.hx line 184
Called from lime/system/CFFI.hx line 332
Uncaught exception - Could not find NekoAPI interface.

Okay, could you try removing haxe and neko, and running the install script I linked?

Thank you again for your patience

Same problem. I first uninstalled haxe, neko, and libneko2, then removed the haxe PPA. I also checked and removed for any leftover files in these paths before the re-install:

  • /usr/bin/neko*
  • /usr/lib/libneko*
  • /usr/lib/neko/*
  • /usr/lib/haxe
  • /usr/bin/haxe*

But alas, same error:

[email protected]:~/Downloads$ haxelib run openfl setup
Called from lime/_backend/native/NativeCFFI.hx line 33
Called from lime/system/CFFI.hx line 184
Called from lime/system/CFFI.hx line 332
Uncaught exception - Could not find NekoAPI interface.

Also, this is my neko files now if it helps:

[email protected]:~/Downloads$ ls -lth /usr/lib/libneko*
lrwxrwxrwx 1 root root 30 Nov 30 15:45 /usr/lib/libneko.so.2.1.0 -> /usr/lib/neko/libneko.so.2.1.0
lrwxrwxrwx 1 root root 30 Nov 30 15:45 /usr/lib/libneko.so.2 -> /usr/lib/neko/libneko.so.2.1.0
lrwxrwxrwx 1 root root 24 Nov 30 15:45 /usr/lib/libneko.so -> /usr/lib/neko/libneko.so
[email protected]:~/Downloads$ ls -lth /usr/lib/neko/*
-rw-r–r-- 1 root root 944K Nov 30 15:45 /usr/lib/neko/sqlite.ndll
-rw-r–r-- 1 root root 730K Nov 30 15:45 /usr/lib/neko/ssl.ndll
-rw-r–r-- 1 root root 279K Nov 30 15:45 /usr/lib/neko/std.ndll
-rw-r–r-- 1 root root 13K Nov 30 15:45 /usr/lib/neko/ui.ndll
-rw-r–r-- 1 root root 103K Nov 30 15:45 /usr/lib/neko/zlib.ndll
-rw-r–r-- 1 root root 16K Nov 30 15:45 /usr/lib/neko/CHANGES
lrwxrwxrwx 1 root root 12 Nov 30 15:45 /usr/lib/neko/libneko.so -> libneko.so.2
lrwxrwxrwx 1 root root 16 Nov 30 15:45 /usr/lib/neko/libneko.so.2 -> libneko.so.2.1.0
-rw-r–r-- 1 root root 367K Nov 30 15:45 /usr/lib/neko/libneko.so.2.1.0
-rw-r–r-- 1 root root 71K Nov 30 15:45 /usr/lib/neko/LICENSE
-rw-r–r-- 1 root root 43K Nov 30 15:45 /usr/lib/neko/mod_neko2.ndll
-rw-r–r-- 1 root root 28K Nov 30 15:45 /usr/lib/neko/mod_tora2.ndll
-rw-r–r-- 1 root root 55K Nov 30 15:45 /usr/lib/neko/mysql5.ndll
-rw-r–r-- 1 root root 1.2M Nov 30 15:45 /usr/lib/neko/mysql.ndll
-rwxr-xr-x 1 root root 24K Nov 30 15:45 /usr/lib/neko/neko
-rwxr-xr-x 1 root root 189K Nov 30 15:45 /usr/lib/neko/nekoc
-rwxr-xr-x 1 root root 293K Nov 30 15:45 /usr/lib/neko/nekoml
-rw-r–r-- 1 root root 64K Nov 30 15:45 /usr/lib/neko/nekoml.std
-rwxr-xr-x 1 root root 84K Nov 30 15:45 /usr/lib/neko/nekotools
-rw-r–r-- 1 root root 6.1K Nov 30 15:45 /usr/lib/neko/README.md
-rw-r–r-- 1 root root 497K Nov 30 15:45 /usr/lib/neko/regexp.ndll

/usr/lib/neko/include:
total 28K
-rw-r–r-- 1 root root 2.5K Nov 30 15:45 neko_elf.h
-rw-r–r-- 1 root root 14K Nov 30 15:45 neko.h
-rw-r–r-- 1 root root 2.1K Nov 30 15:45 neko_mod.h
-rw-r–r-- 1 root root 2.7K Nov 30 15:45 neko_vm.h

Okay, perhaps I am mistaken, and it is not a Haxe install issue. This error has occurred in the past with a bad install, but perhaps we have already exhausted the possibilities there. Could you try and run the following commands?

haxelib path openfl
haxelib path lime

If Lime is not yet installed, could you also run:

haxelib install lime

…then could you try and run the following commands:

haxelib run openfl
haxelib run lime
haxelib run openfl -nocffi
haxelib run lime -nocffi
haxelib run openfl setup -nocffi

Thanks! That seemed to do the trick – looks like I didn’t have lime installed.

Here’s the output from those commands FYI:

[email protected]:~/Downloads$ haxelib path openfl
–macro openfl._internal.utils.ExtraParams.include()
/usr/lib/haxe/lib/openfl/6,5,1/
-D openfl=6.5.1
[email protected]:~/Downloads$ haxelib path lime
Error: Library lime is not installed : run 'haxelib install lime’
[email protected]:~/Downloads$ haxelib install lime
Downloading lime-5,9,1.zip…
Download complete : 92332758 bytes in 5.8s (15488.6KB/s)
Installing lime…
Current version is now 5.9.1
Done
[email protected]:~/Downloads$ haxelib run openfl
.d88 88b. 888888b 888
d88P" "Y88b 888 888
888 888 888 888
888 888 88888b. .d88b. 88888b. 8888888 888
888 888 888 “88b d8P Y8b 888 “88b 888 888
888 888 888 888 88888888 888 888 888 888
Y88b. .d88P 888 d88P Y8b. 888 888 888 888
"Y88 88P” 88888P” "Y8888 888 888 888 "Y888P
888
888

OpenFL Command-Line Tools (6.5.1-LHSE6d)
Use openfl setup to configure platforms or openfl help for more commands
[email protected]:~/Downloads$ haxelib run lime
/\\\_____________________________________________
////\_____________________________________________
/\_/\____________________________
/\_////\\_/\\_______/\\\\
/\_/\_/\///\\///\___/\/////\_
_____/\_/\_/\_//\_
/\_/\\\\\___
_________/\_
/\_/\_/\_/\_//\///////____
____/\\\\_/\_/\_/\_/\__//\\\\\
//////////////////
///_//////////

Lime Command-Line Tools (5.9.1)
Use lime setup to configure platforms or lime help for more commands
[email protected]:~/Downloads$ haxelib run openfl -nocffi
.d88 88b. 888888b 888
d88P" "Y88b 888 888
888 888 888 888
888 888 88888b. .d88b. 88888b. 8888888 888
888 888 888 “88b d8P Y8b 888 “88b 888 888
888 888 888 888 88888888 888 888 888 888
Y88b. .d88P 888 d88P Y8b. 888 888 888 888
"Y88 88P” 88888P” "Y8888 888 888 888 "Y888P
888
888

OpenFL Command-Line Tools (6.5.1-LHSE6d)
Use openfl setup to configure platforms or openfl help for more commands
[email protected]:~/Downloads$ haxelib run lime -nocffi
/\\\_____________________________________________
////\_____________________________________________
/\_/\____________________________
/\_////\\_/\\_______/\\\\
/\_/\_/\///\\///\___/\/////\_
_____/\_/\_/\_//\_
/\_/\\\\\___
_________/\_
/\_/\_/\_/\_//\///////____
____/\\\\_/\_/\_/\_/\__//\\\\\
//////////////////
///_//////////

Lime Command-Line Tools (5.9.1)
Use lime setup to configure platforms or lime help for more commands
[email protected]:~/Downloads$ haxelib run openfl setup -nocffi
lime is up to date
Downloading hxcpp-3,4,188.zip…
Download complete : 12192148 bytes in 2s (5730KB/s)
Installing hxcpp…
Current version is now 3.4.188
Done
Downloading lime-samples-4,0,1.zip…
Download complete : 8044613 bytes in 1.6s (4673.6KB/s)
Installing lime-samples…
Current version is now 4.0.1
Done
Downloading openfl-samples-6,0,0.zip…
Download complete : 7956516 bytes in 1.7s (4336.3KB/s)
Installing openfl-samples…
Current version is now 6.0.0
Done
Downloading actuate-1,8,7.zip…
Download complete : 753815 bytes in 1s (669.7KB/s)
Installing actuate…
Current version is now 1.8.7
Done
Downloading box2d-1,2,3.zip…
Download complete : 264916 bytes in 0.8s (287.4KB/s)
Installing box2d…
Current version is now 1.2.3
Done
Downloading layout-1,2,1.zip…
Download complete : 40609 bytes in 0.4s (88.2KB/s)
Installing layout…
Current version is now 1.2.1
Done
Do you want to install the “openfl” command? [y/n/a] ? y
[sudo] password for sky:
[email protected]:~/Downloads$

Thanks, this must have been a regression, where haxelib run openfl setup now needs Lime to be installed. I’ll dig into this, thanks for your help, and please post again if you have any trouble :slight_smile:

1 Like