Android builds that uses Haxe 4.3+ and HXCPP 4.3+ crash on some devices

I’ve been using Haxe 4.3 for a while now, and I’m not aware of any issues with Lime. Can you let us know what isn’t working for you? Thanks!

Android builds that uses Haxe 4+ and HXCPP 4+ crash on some devices:

@IriySoft

I was able to reproduce this error message with an OpenFL app on one of my Android devices.

Copying the error message below for more context in searches:

SDL Error
An error occurred while trying to start the application. Please try again and/or reinstall.
Error: dlopen failed: cannot locate symbol “__atomic_compare_exchange_4” referenced by “/data/app/org.openfl.samples.piratepig-BgzsbLgcUjNKy7Hr5k-Fvg==/lib/arm/libApplicationMain.so” …

I tried to set up my environment as closely as I could to what you reported.

  • Haxe 4.3.4
  • NDK 21.4.7075529
  • Java: OpenJDK 11
  • hxcpp 4.3.2
  • Lime 8.1.2
  • OpenFL 9.3.3

I was able to successfully resolve this issue on my Andorid device by installing the latest hxcpp from GitHub instead of using hxcpp 4.3.2.

As a bonus, this also made it possible for me to use a newer NDK than I ever had in the past. Previously, I was not able to use anything newer than NDK 21.4.7075529. With the latest hxcpp, I was able to successfully build with NDK 25.2.9519653.

2 Likes

For reference, I installed the latest Git commit of hxcpp with the following command:

haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git

Thanks for checking! Will try to migrate to the Git version of HXCPP :+1:

It’s cool that higher versions of NDK can be used too!

1 Like

Worked for me! Thanks. Tried with NDK21, will check with NDK25 later.

1 Like

NDK 25.2.9519653 works too! :handshake:

1 Like