Integrated: 8371914: PNG defines in CFLAGS can cause compilation errors with external libpng

Kurt Miller kurt at openjdk.org
Thu Dec 4 17:02:47 UTC 2025


On Fri, 14 Nov 2025 14:48:14 GMT, Kurt Miller <kurt at openjdk.org> wrote:

> When building with external libpng the PNG defines added to CFLAGS may conflict with the installed libpng header pnglibconf.h resulting in compilation errors. For example on OpenBSD/aarch64:
> 
> `/usr/local/include/pnglibconf.h:207:9: error: 'PNG_ARM_NEON_OPT' macro redefined [-Werror,-Wmacro-redefined]`
> 
> This moves all `-DPNG_*` into the case where internal libpng is used. This has only been tested with the tier1 github actions so needs to be checked on Linux/ppc and AIX.

This pull request has now been integrated.

Changeset: 45dcc0e7
Author:    Kurt Miller <kurt at openjdk.org>
Committer: Jayathirth D V <jdv at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/45dcc0e7e26b8130236c5ba80edb54fa530dab57
Stats:     37 lines in 1 file changed: 18 ins; 18 del; 1 mod

8371914: PNG defines in CFLAGS can cause compilation errors with external libpng

Reviewed-by: erikj, jdv

-------------

PR: https://git.openjdk.org/jdk/pull/28324


More information about the client-libs-dev mailing list