Created attachment 19325 [details] ghostscript-disable-ppc-optimisations-in-libpng.patch For the CUPS Snap https://github.com/OpenPrinting/cups-snap/ I build Ghostscript with the following ./configure command line ./configure --without-x --disable-gtk --with-drivers=pdfwrite,ps2write,cups,pwgraster,pxlmono,pxlcolor --enable-cups --enable-freetype As Snaps bring their own dependencies I am using the libraries which come with Ghostscript instead of using the system's libraries (the .deb packages use the system's libraries whereever possible). I have coupled the GitHub repo with the build service of the Snap Store, which makes the Snap being build for 6 architectures after each commit to the repo. 9.52 builds perfectly on i386, amd64, s390x, and armhf, but not on ppc64el and arm64. Problem are internal optimizations in the libpng shipped with Ghostscript. For ppc64el the problem was already solved after the 9.52 release: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=1c9bd8e0aa4 https://bugs.ghostscript.com/show_bug.cgi?id=702236 Based on this and on a similar fix for arm64 on another free software project https://github.com/imagemin/optipng-bin/issues/97 I have extended the patch of http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=1c9bd8e0aa4 by adding the arm64 case to the case statement in the patch: ---------- *arm64*|*aarch64*) # Building on arm64 with gcc, disable libpng's neon # optimizations. if test $GCC = yes; then CFLAGS="$CFLAGS -DPNG_ARM_NEON_OPT=0" fi ;; ---------- resulting in the attached patch for 9.52, which I have added to the CUPS Snap by the following commit: https://github.com/OpenPrinting/cups-snap/commit/2f8765c6620e82f04dd73a495f2a76a1babe8ab8 With this the Ghostscript in the CUPs Snap builds on all the 6 architectures.
Sorry, forgot that to Ghostscript I can directly upload. I have committed the fix now as commit a189c020b.