Closed mhsmith closed 4 years ago
I should mention, I'm using the Crystax NDK with a relatively old compiler (GCC 4.9.3).
I eventually tracked this down to BROTLI_RESTRICT
. With that macro disabled, compression worked correctly on all ABIs.
However, decompression still gave the same error on arm64-v8a until I added BROTLI_BUILD_NO_RBIT
. My test device was a Nexus 5X (Qualcomm Snapdragon 808, 2x Cortex-A57, 4x Cortex-A53), but I suspect the compiler is at fault here.
This compiler version is no longer supported on Android, and I'll be moving off it myself as soon as possible. So there's no need to take any further action on this, unless you want to.
Thanks for the investigation. Still makes sense to:
restrict
- this might mean that something is marked wrong, i.e. two areas could intersectrbit
works well if compiler thinks it shouldGCC 4.8 is not working . The compiler version is too low, try a newer version. GCC 5.4 is OK. or try a cross compiler。
I tried building brotli 1.0.7 using the Google NDK r18 (Clang version 7.0.2), and it produces the correct output on all ABIs, without needing any of the above changes. So I think that confirms it was the Crystax NDK that was at fault.
@mhsmith thanks for investigating.
I'm trying to make a Python build of Brotli for Chaquopy on Android (https://github.com/chaquo/chaquopy/issues/137). The build process itself is no problem (I'm using the 1.0.7 sdist ZIP from PyPI), but the resulting package doesn't work correctly.
With the official Linux build from PyPI:
With my own Android build:
Notice that the invalid output is the same at the beginning and end, but the middle section is both different and shorter. I get the same output on both x86 and arm64-v8a.
Can anyone suggest what might be going on here?