When libpng 1.6.14 is built on AArch64 (64-bit ARMv8) architecture the ARM NEON support is partially enabled. This is because ARM_NEON/__ARM_NEON macro is defined for this architecture as well as for 32-bit ARM.
Generated Makefile does not include arm/ directory so ARM NEON code is not built which ends with linking error:
./.libs/libpng16.so: undefined reference to `png_init_filter_functions_neon'
collect2: error: ld returned 1 exit status
Attached patch exports PNG_ARM_NEON macro used my automake to be available at C preprocessor level so if ARM NEON code is not going to be compiled then support for it is also disabled in C code.
PNG_ARM_NEON seems to conflict with the existing macro defined in png.h and used in arm/arm_init.c as a pointer into png_ptr->options. I think we should create a new macro such as PNG_USE_ARM_NEON here.
Please try libpng-1.6.15beta03 (head of the libpng16 branch of the libpng GIT repository at SourceForge or the glennrp/libpng GIT repository at github).
commit 32784523239c376dfe544bb6c7012c4934624a6d
Author: Glenn Randers-Pehrson <glennrp at="" users.sourceforge.net="">
Date: Mon Nov 3 08:24:34 2014 -0600</glennrp>
Builds fine and passes testsuite.
There's a suggestion on the png-mng-implement list to do this instead:
Just change line 309 of configure.ac:
The effect is not to turn off ARM optimization but to ensure that the libpng/arm directory is present.
This should have less of an effect on other ARM/NEON builds. With the original patch, other builds would have to start defining PNG_USE_ARM_NEON.
Please try libpng-1.6.15beta04 from the glennrp/libpng repository at github, libpng16 branch.
commit 445475a1660a590111c73a8724c644649df4aebd
Author: John Bowler jbowler@acm.org
Date: Mon Nov 3 19:44:39 2014 -0600
Works fine as well.
Fixed in libpng-1.6.15