OpenFL Examples Won't Build

I have been unable to run any OpenFL examples regardless of the target. I am using Haxe 3.2.1 and OpenFL 4.2.0.

Do they all get the same errors?

What error do you get?

I am using ‘openfl run [target]’ to run the DisplayingABitmap example.
Neko/Linux writes 1 blank line to the terminal. HTML5 writes ‘Syntax error: word unexpected (expecting “)”)’.

Building the project and then running manually seems to work only on HTML5. Neko builds, but won’t run. Linux spits out ‘Error: Source path “/home/user/haxelib/hxcpp/3,3,49/bin/RPi/std.dso” does not exist’.

Yes me too I’m concerned by error message like Float32Array … from SimpleOpenGLView :confused:

That is why Openfl 4.2.0 :frowning:

Still I am using only Haxe 3.2.1

Libraries:
Lime 3.2.1
HXCPP 3.3.49

// Edit:
If you forget to compile like this “lime rebuild hxcpp linux” than it copies to your DisplayAsBitmap

PS: If you have problem with samples like samples have errors like me too…

Could you use openfl test html5 or openfl test linux (if that is your desktop OS) and see what it outputs?

Try this version: https://github.com/openfl/openfl-samples/tree/master/features/display/SimpleOpenGLView

I tried to run SimpleOpenGLView with openfl test [target]. HTML5 prints ‘Syntax error: word unexpected (expecting “)”)’. Linux/Neko do nothing at all.

What about DisplayingABitmap?

How did you install Haxe and Neko? What distribution are you running?

I get the same thing from all other samples I’ve tried including DisplayingABitmap. I am using Ubuntu 14.04. I installed Haxe through the ppa managed by the Haxe Foundation. I have had no issues with compiling Haxe programs without OpenFL

Hmm, it sounds like it might be an issue with the PPA, unfortunately. Things work everywhere that uses our Linux install script – some versions of Haxe on Linux have a bad Neko install, but I suppose that this error you are seeing is new to me.

Does running haxelib run openfl test html5 work any differently?

Does plain openfl or openfl display html5 work?

I reinstalled haxe through the Linux install script and OpenFL is still not working. ‘openfl’ and ‘openfl display html5’ both work as intended.

Could you run openfl test html5 -verbose? That should give us a better idea when the error occurs

This is the output when I run ‘openfl test html5 -verbose’.

Initializing project…
Using project file: /home/user/openfl/SimpleOpenGLView/project.xml
Reading HXCPP config: /home/user/.hxcpp_config.xml
Using target platform: HTML5

Running command: UPDATE

  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/html5/template/index.html -> Export/html5/release/bin//index.html
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/html5/template/index.html -> Export/html5/release/bin//index.html
  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/haxe/DefaultAssetLibrary.hx -> Export/html5/release/haxe/DefaultAssetLibrary.hx
  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/haxe/ApplicationMain.hx -> Export/html5/release/haxe/ApplicationMain.hx
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/haxe/ApplicationMain.hx -> Export/html5/release/haxe/ApplicationMain.hx
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/haxe/NMEPreloader.hx -> Export/html5/release/haxe/NMEPreloader.hx
  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/html5/hxml/release.hxml -> Export/html5/release/haxe/release.hxml
  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/html5/hxml/debug.hxml -> Export/html5/release/haxe/debug.hxml
  • Copying template file: /usr/lib/haxe/lib/lime/3,2,1/templates/html5/hxml/final.hxml -> Export/html5/release/haxe/final.hxml
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/html5/hxml/release.hxml -> Export/html5/release/haxe/release.hxml
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/html5/hxml/debug.hxml -> Export/html5/release/haxe/debug.hxml
  • Copying template file: /usr/lib/haxe/lib/openfl/4,2,0/templates/html5/hxml/final.hxml -> Export/html5/release/haxe/final.hxml

Running command: BUILD

  • Running command: haxe Export/html5/release/haxe/release.hxml
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/utils/ByteArray.hx:114: characters 9-59 : openfl.utils.ByteArrayData should be openfl.utils.ByteArray
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/utils/ByteArray.hx:97: characters 10-41 : openfl.utils.ByteArrayData should be openfl.utils.ByteArray
    /usr/lib/haxe/lib/lime/3,2,1/lime/Assets.hx:1187: characters 71-75 : Array<{ type : haxe.macro.ComplexType, opt : Bool, name : String }> should be Array<haxe.macro.FunctionArg>
    /usr/lib/haxe/lib/lime/3,2,1/lime/Assets.hx:1187: characters 71-75 : Type parameters are invariant
    /usr/lib/haxe/lib/lime/3,2,1/lime/Assets.hx:1187: characters 71-75 : { type : haxe.macro.ComplexType, opt : Bool, name : String } should be haxe.macro.FunctionArg
    /usr/lib/haxe/lib/lime/3,2,1/lime/Assets.hx:1187: characters 71-75 : { type : haxe.macro.ComplexType, opt : Bool, name : String } should be { ?value : Null<haxe.macro.Expr>, type : Null<haxe.macro.ComplexType>, ?opt : Bool, name : String }
    /usr/lib/haxe/lib/lime/3,2,1/lime/Assets.hx:1187: characters 71-75 : { type : haxe.macro.ComplexType, opt : Bool, name : String } has no field value
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:190: lines 190-194 : openfl._Vector.FunctionVector should be openfl._Vector.IVector<toFunctionVector.T>
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:190: lines 190-194 : Type parameters are invariant
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:190: lines 190-194 : haxe.Function should be toFunctionVector.T
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:182: lines 182-186 : openfl._Vector.FloatVector should be openfl._Vector.IVector<toFloatVector.T>
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:182: lines 182-186 : Type parameters are invariant
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:182: lines 182-186 : Float should be toFloatVector.T
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:175: lines 175-179 : openfl._Vector.IntVector should be openfl._Vector.IVector<toIntVector.T>
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:175: lines 175-179 : Type parameters are invariant
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:175: lines 175-179 : Int should be toIntVector.T
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:168: lines 168-172 : openfl._Vector.BoolVector should be openfl._Vector.IVector<toBoolVector.T>
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:168: lines 168-172 : Type parameters are invariant
    /usr/lib/haxe/lib/openfl/4,2,0/openfl/Vector.hx:168: lines 168-172 : Bool should be toBoolVector.T
    /usr/lib/haxe/lib/lime/3,2,1/lime/text/Font.hx:25: characters 2-11 : Build failure

I just fixed this in Lime, sent your a DM :slight_smile:

Okay! This is looking a lot more logical. Curious that this isn’t occurring elsewhere, though. What version of Haxe do you have installed? ByteArray is abstract ByteArray(ByteArrayData) from ByteArrayData to ByteArrayData, so I wonder why it is complaining. Is it an old Haxe version?

Check haxe and see what version it returns, and which haxe and compare that with the value of $HAXEPATH

Right now, I have Haxe 3.1.3 installed via the script provided on this website. I have also tried Haxe 3.2.0 installed through the PPA.

It should be Haxe 3.2.1

http://www.openfl.org/builds/haxe/haxe-3.2.1-linux-installer.tar.gz

I have same issue. Probably, it’s caused by node-linux64 broken.
I fixed this issue by rm ~/haxelib/lime/<VERSION>/templates/bin/node/node-linux64 && cp /usr/bin/node ~/haxelib/lime/<VERSION>/templates/bin/node/node-linux64.