Using the HerokuShaders demo project I built the project using
openfl build hl
Firstly I got the error
chmod: cannot access 'Export/hl/bin/HerokuShaders': No such file or directory
which I got rid of by creating the directory. It then isn’t used in the build process.
Next I changed to directory
I then get the error
src/module.c(268) : FATAL ERROR : Failed to load library lime.hdll
even though lime.hdll is in the current directory
Anyone know how to sort this out?
I’m running the current git versions of:
haxe (i.e 4.0.0)
on Ubuntu 18.10 (Bionic Beaver)
We have about 90% support for HashLink, but it’s not officially supported in our releases, yet.
In order to test our current support, you will need to use Lime from GIT, then rebuild using the
-Dhashlink define, such as
lime rebuild windows -Dhashlink
Then we expect that you will have a variable defined in your environment called
HLPATH for the path to where HashLink is located on your system.
lime test hl on a project should probably work.
There are at least three problems for finishing HashLink support:
- We use a single native library (lime.so, lime.ndll, etc) for Neko and C++. We wanted to have this working with HashLink as well (
-Dhashlink causes Neko and C++ to require libhl.dll or libhl.so, which is not something we want to do)
- We would probably need to bundle HashLink ourselves, as HashLink versions are tied to the binaries we generate, and the global install approach is not official, nor worked on Linux when tested
- There may be some minor things we did not get right, such as passing Strings to and from C++
Thank you. I’ll report back how it goes.
@singmajesty, thank you for the tip! I tried to build Lime with the “-Dhashlink” flag, but the only artifact that results is “…/ndll/Linux64/lime.ndll”, no “.hdll” file is created. I searched for it, but to no avail. Is there something I am doing wrong here?
I am compiling with the following commands:
lime rebuild linux -64 -release -clean -Dhashlink
cp /path/to/lime/ndll/Linux64/lime.ndll /path/to/lime/ndll/Linux (this fixes the “no lime.ndll found error”)
Then, I am trying to build the BunnyMark lime-sample project:
mkdir -p Export/hl/bin/BunnyMark
lime build hl
When trying to run:
src/module.c(318) : FATAL ERROR : Failed to load library lime.hdll
lime build hl should copy the NDLL and rename it to HDLL
I had trouble getting HashLink to resolve library paths properly on Linux, so I think we are going to have to look at bundling HashLink in with Lime and copying it into the bin directory upon a build
I found out that building Lime projects does generate a “lime.hdll” file inside the “Export/hl/bin” folder.
You pointed out that there are problems with library findings, so I proceeded as follows:
sudo cp /path/to/lime/ndll/Linux64/lime.ndll /usr/local/lib/lime.hdll
It runs! But… crashes sometimes.
I have tested it with the lime-samples given here: https://github.com/openfl/lime-samples
Only 2 of them work: the “Hello World” project, and the “BunnyMark” project.
For Game of Life:
src/module.c(461) : FATAL ERROR : Invalid signature for function [email protected]_audio_load_file : POBi_OiiOiOiB_iiii_iDDDDDOD___OiiOiOiB_iiii_iDDDDDOD__ required but POBi_OiiOiOiB_iiii_iDDDDDOiD___OiiOiOiB_iiii_iDDDDDOiD__ found in hdll
*** Error in 'hl': free(): invalid pointer: 0x00000000400020a8 ***
Maybe this might help in improving Hashlink support for Lime.
The issue has been fixed, I could compile and run all the Lime examples, targeting Hashlink.