Android - project build problem in pngrtran.c

Hi Jules!

Just created a default project on my Mac with the Introjucer, and did this. Using android-ndk-r8b …:

cd Builds
ant release


     [exec] Compile++ thumb  : juce_jni <= Main.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_audio_basics.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_audio_devices.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_audio_formats.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_audio_processors.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_core.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_cryptography.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_data_structures.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_events.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_graphics.cpp
     [exec] Compile++ thumb  : juce_jni <= juce_gui_basics.cpp
     [exec] In file included from jni/../../../JuceLibraryCode/modules/juce_graphics/image_formats/juce_PNGLoader.cpp:269:0,
     [exec]                  from jni/../../../JuceLibraryCode/modules/juce_graphics/juce_graphics.cpp:120:
     [exec] jni/../../../JuceLibraryCode/modules/juce_graphics/image_formats/pnglib/pngrtran.c: In function 'int juce::pnglibNamespace::png_do_rgb_to_gray(png_structrp, juce::pnglibNamespace::png_row_infop, juce::pnglibNamespace::png_bytep)':
     [exec] jni/../../../JuceLibraryCode/modules/juce_graphics/image_formats/pnglib/pngrtran.c:3459:1: internal compiler error: in reload, at reload1.c:1061
     [exec] Please submit a full bug report,
     [exec] with preprocessed source if appropriate.
     [exec] See <> for instructions.
     [exec] make: *** [obj/local/armeabi/objs-debug/juce_jni/__/__/__/JuceLibraryCode/modules/juce_graphics/juce_graphics.o] Error 1
     [exec] make: *** Waiting for unfinished jobs....

Is this a known problem? If not, which NDK version are you using…?! :slight_smile:

EDIT: by coincidence, I’ve noticed that if I add this (see to jni/, it builds OK!

#Turn-off thumb mode, generate 32-bit code instead!
#This gives a huge performance boost!

Best wishes,


Compiler bugs triggered by code in libpng are a bit beyond my remit, I’m afraid!

The LOCAL_ARM_MODE setting sounds like a good thing if you’re building for the newer architectures, but am I right in thinking this should only be added if the architecture list only include armabi-v7 or later? At the moment, the introjucer’s default is to do that and the older armabi, which I guess would be broken by this flag (?)