SufficientlySecure / document-viewer

Document Viewer is a highly customizable document viewer for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

armeabi build broken on NDK r14b

ericwa opened this issue · comments

This is on 3ba4b87. ndk-build V=1 fails with:

[armeabi] Compile++ arm  : djvu <= IW44Image.cpp
/Users/ericwa/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -MMD -MP -MF ./obj/local/armeabi/objs/djvu/djvulibre/libdjvu/IW44Image.o.d -gcc-toolchain /Users/ericwa/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv5te-none-linux-androideabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -marm -O2 -DNDEBUG  -Ijni/djvu/../mupdf/mupdf/thirdparty/jpeg -Ijni/djvu/../mupdf/mupdf/scripts/jpeg -Ijni/djvu/djvulibre/libdjvu -Ijni/djvu -I/Users/ericwa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/system/include -Ijni/djvu -DANDROID -DHAVE_CONFIG_H -DTHREADMODEL=POSIXTHREADS -DDIR_DATADIR=\"/usr/local/share\" -Wa,--noexecstack -Wformat -Werror=format-security  -fexceptions     --sysroot /Users/ericwa/Library/Android/sdk/ndk-bundle/platforms/android-9/arch-arm  -c  jni/djvu/djvulibre/libdjvu/IW44Image.cpp -o ./obj/local/armeabi/objs/djvu/djvulibre/libdjvu/IW44Image.o 
In file included from jni/djvu/djvulibre/libdjvu/IW44Image.cpp:72:
In file included from jni/djvu/djvulibre/libdjvu/IW44Image.h:165:
In file included from jni/djvu/djvulibre/libdjvu/GSmartPointer.h:97:
In file included from jni/djvu/djvulibre/libdjvu/DjVuGlobal.h:66:
/Users/ericwa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/system/include/new:14:7: warning: 'operator new' is missing exception specification 'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(std::size_t);
      ^
                                throw(std::bad_alloc)
/Users/ericwa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/system/include/new:15:7: warning: 'operator new[]' is missing exception specification 'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](std::size_t);
      ^
                                  throw(std::bad_alloc)
/Users/ericwa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/system/include/new:16:7: warning: 'operator delete' is missing exception specification 'throw()' [-Wmissing-exception-spec]
void  operator delete(void*);
      ^
                             throw()
/Users/ericwa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/system/include/new:17:7: warning: 'operator delete[]' is missing exception specification 'throw()' [-Wmissing-exception-spec]
void  operator delete[](void*);
      ^
                               throw()
4 warnings generated.
/var/folders/sg/57wxmnq50t18qrgggm4h28sc0000gn/T/IW44Image-f1519e.s: Assembler messages:
/var/folders/sg/57wxmnq50t18qrgggm4h28sc0000gn/T/IW44Image-f1519e.s:2085: Error: selected processor does not support ARM mode `ssat r2,#8,r2'
/var/folders/sg/57wxmnq50t18qrgggm4h28sc0000gn/T/IW44Image-f1519e.s:4550: Error: selected processor does not support ARM mode `ssat r1,#8,r1'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi/objs/djvu/djvulibre/libdjvu/IW44Image.o] Error 1

Another project with the same problem (I think):
google/ExoPlayer#2661 (comment)

Confirmed that reverting to ndk r13b works as a workaround.

Seems fixed in NDK r15.