Missing liblime x86_64.so on lime 7.6.3

I’m currently trying to build an android x86_64 project, but I’m missing the liblime-x86_64.so file.

I tried to recompile the NDLLs (cloned lime from git and ran lime rebuild android to build them), but it isn’t generating it (it generates the ARMs (v6;v7;v64) and x86, but not the one I need).

May I ask which parameter am I supposed to pass to the lime commando to build it?

Thanks!

Perhaps lime rebuild android -64 would work?

It didn’t work. Still missing the x86_64 file :frowning:

I found the solution:

The hxcpp flag for this target is wrong:
It’s written HXCPP_M64, but it’s supposed to be HXCPP_X86_64

So I changed my AndroidPlatform.hx to reflect this change on lines 109;110 and 275 and it built the .SO, but it’s 32bit not 64 :frowning:

Perhaps HXCPP did not have X64 support on Android when I last wrote it?

Or perhaps it requires a newer Android NDK version?

I’m using NDK-r15c and it supports x86_64 using the android-21 platform. Funnily enough I opened the arch_x86_64 folder on ROOT_NDK/platforms/android-21/usr/arch-x86_64/usr/ and it has both lib and lib64/ folders (while all the other archs have only the lib folder)… could that be the source of my newfound error? (I’m justing guessing though)

And that line on HXCPP is 2 months old, I guess it was supported beforehand if your project was compiled with the -DHXCPP_NDK20 flag

1 Like

I just updated Lime to use the updated flags:

If it compiles the wrong arch I wonder if the HXCPP toolchain needs a little more work?

1 Like

Thanks for the update! I’ll check the HXCPP toolchains, b/c it probably needs a fix as well

I’ve managed to make the HXCPP work ( the x86-64 build wasn’t supported for older NDK versions, but I made some changes to the gcc toolchain to enable it). I also had to change Lime’s build.xml and AndroidPlatform.hx to add the Platform-21 flag.

I’ll make the PRs Soon™ (I’ll clean up my code and retest everything)

I made both PRs (for hxcpp and Lime), and will reply on this thread when both are approved :slight_smile:

2 Likes

Chiming in to say that I’d love to help test @lehonma’s version here. I’ve got an app based in Haxe that I’m trying to get on the Play Store but have run into this restriction too, so I might be a good test case. I don’t know my way around the guts of lime, and so thank you for working on a solution.

However, I’m facing an obstacle in building the thing in the first place – so a very fundamental problem and probably something small I’m overlooking. I’ve got your version and am trying to follow the instructions in “Building from Source” at https://github.com/openfl/lime. This is what I get specifically:

C:\HaxeToolkit\haxe\lib\lime>haxelib dev lime lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d
Development directory set to C:\HaxeToolkit\haxe\lib\lime\lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d

C:\HaxeToolkit\haxe\lib\lime>lime help
Called from ? line 1
Called from CommandLineTools.hx line 1895
Called from CommandLineTools.hx line 22
Called from CommandLineTools.hx line 95
Called from CommandLineTools.hx line 884
Called from CommandLineTools.hx line 1096
Called from hxp/Log.hx line 84
Called from hxp/Log.hx line 127
Called from C:\HaxeToolkit\haxe\std/neko/Lib.hx line 42
Uncaught exception - load.c(237) : Failed to load library : lime.ndll

More relevant info:

C:\HaxeToolkit\haxe\lib\lime>haxelib version
3.3.0 (a494d8be523e26fcf875e2c33915808dc221e17a)

Versions of Lime I’ve got sitting out here:

04/13/2019 11:19 AM 6,4,0
10/15/2019 09:35 PM 7,6,3
10/15/2019 10:06 PM lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d

Just to verify that I think I’m pointing haxelib to the right place:

C:\HaxeToolkit\haxe\lib\lime\lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d>dir
Volume in drive C is Windows-SSD
Volume Serial Number is 3889-78F3

Directory of C:\HaxeToolkit\haxe\lib\lime\lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d

10/15/2019 10:06 PM .
10/15/2019 10:06 PM …
10/15/2019 09:44 PM .circleci
10/15/2019 09:30 PM 269 .dockerignore
10/15/2019 09:30 PM 12 .gitattributes
10/15/2019 09:30 PM 321 .gitignore> …
10/15/2019 09:48 PM tools
and full contents of .dev are just that directory as expected:
C:\HaxeToolkit\haxe\lib\lime\lime-e4077d38fc53a98c8e2d59e5d728c87c7e2f321d

Any more info you might need? Any advice? I’ll update if I get further.

Did you try rebuilding for the desktop?

lime rebuild windows
1 Like

Fantastic. I ran back through the whole process and got it built for Windows, and it works as expected. I don’t know where I messed up, but that works for me. Thanks!

I’m having an issue with rebuilding for Android, though:

PS C:\HaxeToolkit\haxe\lib\lime\lime> lime rebuild android
Compiling group: lime
arm-linux-androideabi-g++ -Iinclude -Ilib/cairo/include -Ilib/cairo/include/configs/default/ -DLIME_CAIRO -DHAVE_CONFIG_H -DCAIRO_HAS_FT_FONT -Ilib/curl/include/ -DLIME_CURL -DCURL_STATICLIB -Ilib/freetype/include -DLIME_FREETYPE -Ilib/harfbuzz/src -DLIME_HARFBUZZ -DLIBHL_EXPORTS -Ilib/jpeg/ -DLIME_JPEG -Ilib/lzma/src -DLIME_LZMA -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_OGG -Ilib/openal/include/ -DLIME_OPENAL -DLIME_OPENALSOFT -DAL_LIBTYPE_STATIC=1 -DAL_ALEXT_PROTOTYPES -DLIME_OPENGL -Ilib/png/ -Ilib/zlib/ -DLIME_PNG -Ilib/sdl/include/ -Ilib/sdl/include/configs/default/ -DHAVE_LIBC -DLIME_SDL -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_VORBIS -DLIME_ZLIB --sysroot=C:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/platforms/android-16/arch-arm -IC:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/include -IC:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -IC:/HaxeToolkit/haxe/lib/hxcpp/3,4,188/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -Wno-overflow -D_LINUX_STDDEF_H -Wno-psabi -DHXCPP_CPP11 -DHXCPP_ARMV5 -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=16 -Wa,–noexecstack -O2 -DNDEBUG -c … tags=[haxe,static]

  • src/ExternalInterface.cpp
  • src/net/curl/CURLBindings.cpp
  • src/text/Font.cpp
  • src/text/harfbuzz/HarfbuzzBindings.cpp
  • src/utils/compress/LZMA.cpp
  • src/graphics/format/JPEG.cpp
  • src/graphics/cairo/CairoBindings.cpp
    Error: In file included from include/system/CFFI.h:6:0,
    from include/graphics/ImageBuffer.h:6,
    from include/text/Font.h:5,
    from ./src/text/Font.cpp:1:
    include/hl.h:253:17: error: redeclaration of C++ built-in type ‘char32_t’ [-fpermissive]
    include/hl.h:254:17: error: redeclaration of C++ built-in type ‘char16_t’ [-fpermissive]
    PS C:\HaxeToolkit\haxe\lib\lime\lime>

Just for kicks, I tried cheating by commenting out the offending lines, but then ran into issues where it tried to build OpenAL. I may need to install some standard libraries, as it was complaining about missing stdalign.h and stdatomic.h. Putting it down for right now, but wanted to share the current status. Thanks!

Oh I’m really sry about the delay… I’m currently using a Mac and built the SOs from there. I’ll try to build on Windows when I have the time (prob. by the next weekend).

Btw, you will have to point to my HXCPP fork before you try to build the x86-64 SOs (I had to update the GCC toolchain to support the 15c NDK and my PR is still open).

After that, you’ll need to lime rebuild android -64

1 Like

edit: nevermind, should’ve looked. Got the fork; am fiddling with it all now!

OK, I have your fork and I have the file .current pointing to it. I’m running into this now – similar, but very slightly different:

PS C:\HaxeToolkit\haxe\lib\lime\lime> lime rebuild android -64

Compiling group: lime
arm-linux-androideabi-g++ -Iinclude -Ilib/cairo/include -Ilib/cairo/include/configs/default/ -DLIME_CAIRO -DHAVE_CONFIG_H -DCAIRO_HAS_FT_FONT -Ilib/curl/include/ -DLIME_CURL -DCURL_STATICLIB -Ilib/freetype/include -DLIME_FREETYPE -Ilib/harfbuzz/src -DLIME_HARFBUZZ -DLIBHL_EXPORTS -Ilib/jpeg/ -DLIME_JPEG -Ilib/lzma/src -DLIME_LZMA -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_OGG -Ilib/openal/include/ -DLIME_OPENAL -DLIME_OPENALSOFT -DAL_LIBTYPE_STATIC=1 -DAL_ALEXT_PROTOTYPES -DLIME_OPENGL -Ilib/png/ -Ilib/zlib/ -DLIME_PNG -Ilib/sdl/include/ -Ilib/sdl/include/configs/default/ -DHAVE_LIBC -DLIME_SDL -Ilib/ogg/include/ -Ilib/vorbis/include/ -DLIME_VORBIS -DLIME_ZLIB --sysroot=C:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/platforms/android-16/arch-arm -IC:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/include -IC:\Users\greed\AppData\Local\Android\Sdk\ndk\android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/include -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -IC:/HaxeToolkit/haxe/lib/hxcpp/hxcpp/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -Wno-overflow -D_LINUX_STDDEF_H -Wno-psabi -DHXCPP_CPP11 -DHXCPP_ARMV5 -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=16 -Wa,–noexecstack -O2 -DNDEBUG -c … tags=[haxe,static]

  • src/math/ColorMatrix.cpp
  • src/ui/TextEvent.cpp
  • src/media/containers/WAV.cpp
  • src/ui/GamepadEvent.cpp
  • src/graphics/cairo/CairoBindings.cpp
  • src/media/codecs/vorbis/VorbisBindings.cpp
  • src/system/ValuePointer.cpp
    Error: In file included from include/system/CFFI.h:6:0,
    from ./src/ui/GamepadEvent.cpp:1:
    include/hl.h:253:17: error: redeclaration of C++ built-in type ‘char32_t’ [-fpermissive]
    include/hl.h:254:17: error: redeclaration of C++ built-in type ‘char16_t’ [-fpermissive]

Did you switch to the branch x86_64_support_for_older_ndks ?

I’m not seeing that branch. I’m at the repo here – https://github.com/HaxeFoundation/hxcpp/blob/2558f93359b3f75ece7db12fd1259c6cd500b82b/hxcpp/Builder.hx#L171 – is that the right place?