lime
lime copied to clipboard
Rebuilding Android library
I'm trying to fix up a few things but I'm not familiar with Haxe at all, neither with lime or the ecosystem in general.
Rebuilding lime works, but trying to rebuild ndll/Android/liblime-v7.so
with, I presume, lime rebuild android -release -armv7
gives the following:
x86 Platform: 16
arm Platform: 16
x86_64 Platform: 21
arm_64 Platform: 21
Frameworks should set the minSdkVersion for each APK to these values.
Compiling group: lime
clang++ -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 --target= -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=0(haxe) -I/usr/local/lib/haxe/lib/hxcpp/4,0,64/include -Iinclude -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM= -fvisibility=hidden -ffunction-sections -fstack-protector -fexceptions -c -fpic -Wno-invalid-offsetof -Wno-return-type-c-linkage -Wno-parentheses ... tags=[haxe,static]
- src/system/ValuePointer.cpp
- src/math/ColorMatrix.cpp
- src/ui/TextEvent.cpp
- src/media/codecs/vorbis/VorbisBindings.cpp
- src/graphics/cairo/CairoBindings.cpp
- src/ui/GamepadEvent.cpp
- src/text/harfbuzz/HarfbuzzBindings.cpp
- src/media/containers/WAV.cpp
Error: error: unknown target triple 'unknown', please use -triple or -arch
Error: error: unknown target triple 'unknown', please use -triple or -arch
I've dug through the code but I can't find much - it seems that Android building is disabled in CI too. How do I go about this?
I have the same problem. :( How to fix that? Does anyone has any idea?
Looks like to have to use Android NDK 15c.
This is primarily an issue with HXCPP support of newer Android NDKs
Once HXCPP adds newer NDK support we can fine-tune any changes on the Lime side required for the clang toolchain on Android
Last hxcpp seems being able to deal with NDK >= r20. Unfortunately i could not build lime: there were a lot of errors during openal and pixman compilation. I guess the reason is clang and its toolchain compatibility.
In file included from ./lib/openal/common/alcomplex.c:5:
lib/openal/common/math_defs.h:30:21: error: static declaration of 'log2f' follows non-static declaration
static inline float log2f(float f)
^
C:\Users\user\programs\develop\Android\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/local/include\math.h:38:15: note: previous declaration is here
float log2f(float);
C:\Users\user\AppData\Local\Temp\pixman-arm-neon-asm-47eb7f.s:1609:1: note: while in macro instantiation
generate_composite_function pixman_composite_over_8888_8_0565_asm_neon, 32, 8, 16, FLAG_DST_READWRITE | FLAG_DEINTERLEAVE_32BPP, 8, 5, default_init_need_all_regs, default_cleanup_need_all_regs, pixman_composite_over_8888_8_0565_process_pixblock_head, pixman_composite_over_8888_8_0565_process_pixblock_tail, pixman_composite_over_8888_8_0565_process_pixblock_tail_head, 28, 4, 8, 24
^
<instantiation>:2:11: error: expected absolute expression
vuzp8 %(basereg+0), %(basereg+1)
^
<instantiation>:26:5: note: while in macro instantiation
pixdeinterleave dst_r_bpp, dst_r_basereg
^
lib/pixman/src/pixman-arm-neon-asm.h:885:5: note: while in macro instantiation
process_trailing_pixels 0, 0, process_pixblock_head, process_pixblock_tail, process_pixblock_tail_head
^
When i removed openal, pixman and cairo flags from build.xml, lime had built but heroku shader demo crashes with lack of dependency methods like
...
08-06 10:14:00.233 11824-11840/org.openfl.samples.herokushaders E/loader: Could not find primitive lime_cairo_pattern_set_filter__prime in 0xae104644
08-06 10:14:00.234 11824-11840/org.openfl.samples.herokushaders E/loader: Could not find primitive lime_cairo_pattern_set_matrix__prime in 0xae104644
08-06 10:14:00.236 11824-11840/org.openfl.samples.herokushaders E/loader: Could not find primitive lime_cairo_surface_flush__prime in 0xae104644
--------- beginning of crash
08-06 10:14:00.551 11824-11840/org.openfl.samples.herokushaders A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 11840 (SDLThread)
ps: this line seems incompatible, i commented it out
AndroidPlatform.hx:287// if (armv5) commands.push(["-Dandroid", "-DPLATFORM=android-16"]);