Compilation Errors on Debian Buster/Ubuntu Disco
m_misc.c:838:50: error: macro "PNG_EXPORT" requires 4 arguments, but only 2 given
typedef PNG_EXPORT(png_uint_32, (*P_png_set_acTL)) PNGARG((png_structp png_ptr,
^
m_misc.c:838:9: warning: type defaults to 'int' in declaration of 'PNG_EXPORT' [-Wimplicit-int]
typedef PNG_EXPORT(png_uint_32, (*P_png_set_acTL)) PNGARG((png_structp png_ptr,
^~~~~~~~~~
m_misc.c:840:52: error: macro "PNG_EXPORT" requires 4 arguments, but only 2 given
typedef PNG_EXPORT (void, (*P_png_write_frame_head)) PNGARG((png_structp png_ptr,
^
In file included from /usr/include/libpng16/png.h:339,
from m_misc.c:89:
m_misc.c:840:74: error: expected ')' before 'png_ptr'
typedef PNG_EXPORT (void, (*P_png_write_frame_head)) PNGARG((png_structp png_ptr,
^~~~~~~
/usr/include/libpng16/pngconf.h:94:27: note: in definition of macro 'PNGARG'
# define PNGARG(arglist) arglist
^~~~~~~
m_misc.c:847:52: error: macro "PNG_EXPORT" requires 4 arguments, but only 2 given
typedef PNG_EXPORT (void, (*P_png_write_frame_tail)) PNGARG((png_structp png_ptr,
^
In file included from /usr/include/libpng16/png.h:339,
from m_misc.c:89:
m_misc.c:847:74: error: expected ')' before 'png_ptr'
typedef PNG_EXPORT (void, (*P_png_write_frame_tail)) PNGARG((png_structp png_ptr,
^~~~~~~
/usr/include/libpng16/pngconf.h:94:27: note: in definition of macro 'PNGARG'
# define PNGARG(arglist) arglist
^~~~~~~
m_misc.c:849:8: error: unknown type name 'P_png_set_acTL'
static P_png_set_acTL apng_set_acTL = NULL;
^~~~~~~~~~~~~~
m_misc.c:849:39: warning: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
static P_png_set_acTL apng_set_acTL = NULL;
^~~~
m_misc.c:850:8: error: unknown type name 'P_png_write_frame_head'
static P_png_write_frame_head apng_write_frame_head = NULL;
^~~~~~~~~~~~~~~~~~~~~~
m_misc.c:850:55: warning: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
static P_png_write_frame_head apng_write_frame_head = NULL;
^~~~
m_misc.c:851:8: error: unknown type name 'P_png_write_frame_tail'
static P_png_write_frame_tail apng_write_frame_tail = NULL;
^~~~~~~~~~~~~~~~~~~~~~
m_misc.c:851:55: warning: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
static P_png_write_frame_tail apng_write_frame_tail = NULL;
^~~~
m_misc.c: In function 'M_PNGLib':
m_misc.c:880:16: warning: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
apng_set_acTL = hwSym("png_set_acTL", pnglib);
^
m_misc.c:881:24: warning: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
apng_write_frame_head = hwSym("png_write_frame_head", pnglib);
^
m_misc.c:882:24: warning: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
apng_write_frame_tail = hwSym("png_write_frame_tail", pnglib);
^
m_misc.c: In function 'M_PNGFrame':
m_misc.c:906:3: error: called object 'apng_set_acTL' is not a function or function pointer
apng_set_acTL(apng_ptr, apng_info_ptr, apng_frames, 0);
^~~~~~~~~~~~~
m_misc.c:849:23: note: declared here
static P_png_set_acTL apng_set_acTL = NULL;
^~~~~~~~~~~~~
m_misc.c:917:3: error: called object 'apng_write_frame_head' is not a function or function pointer
apng_write_frame_head(apng_ptr, apng_info_ptr, row_pointers,
^~~~~~~~~~~~~~~~~~~~~
m_misc.c:850:31: note: declared here
static P_png_write_frame_head apng_write_frame_head = NULL;
^~~~~~~~~~~~~~~~~~~~~
m_misc.c:932:3: error: called object 'apng_write_frame_tail' is not a function or function pointer
apng_write_frame_tail(apng_ptr, apng_info_ptr);
^~~~~~~~~~~~~~~~~~~~~
m_misc.c:851:31: note: declared here
static P_png_write_frame_tail apng_write_frame_tail = NULL;
^~~~~~~~~~~~~~~~~~~~~
m_misc.c: In function 'M_PNGfind_acTL':
m_misc.c:950:8: warning: implicit declaration of function 'png_memcmp'; did you mean 'png_sig_cmp'? [-Wimplicit-function-declaration]
if (!png_memcmp(cn+4, acTL_cn, 4)) //cmp for chuck header
^~~~~~~~~~
png_sig_cmp
m_misc.c: In function 'M_PNGfix_acTL':
m_misc.c:964:3: error: called object 'apng_set_acTL' is not a function or function pointer
apng_set_acTL(png_ptr, png_info_ptr, apng_frames, 0);
^~~~~~~~~~~~~
m_misc.c:849:23: note: declared here
static P_png_set_acTL apng_set_acTL = NULL;
^~~~~~~~~~~~~
m_misc.c:970:9: error: dereferencing pointer to incomplete type 'png_struct' {aka 'struct png_struct_def'}
png_ptr->num_frames_to_write = apng_frames;
^~
m_misc.c: In function 'M_SetupaPNG':
m_misc.c:1032:3: error: called object 'apng_set_acTL' is not a function or function pointer
apng_set_acTL(apng_ptr, apng_info_ptr, PNG_UINT_31_MAX, 0);
^~~~~~~~~~~~~
m_misc.c:849:23: note: declared here
static P_png_set_acTL apng_set_acTL = NULL;
Found after I've updated my packages in both vanilla and kart, and also prevents kart from being built on the ppa for disco.
My best guess is that it's due to an update to libpng16, supposedly the latest version added support from an apng branch for apng, maybe that could have an impact? I'm not sure what needs to be done to fix it.