Skip to content

community/openexr: fix build with gcc 14

mio requested to merge mio/aports:openexr into master

Upstream has since changed the underlying code in the main branch to work around the error with incompatible pointer types. Use uLong type cast for now to resolve the issue, particularly on 32-bit arches.

The error, found on a 3.21 builder (error log):

/home/buildozer/aports/community/openexr/src/openexr-3.1.13/src/lib/OpenEXRCore/internal_dwa_compressor.h: In function 'exr_compress_buffer':
/home/buildozer/aports/community/openexr/src/openexr-3.1.13/src/lib/OpenEXRCore/internal_dwa_compressor.h:57:21: error: passing argument 2 of 'compress2' from incompatible pointer type [-Wincompatible-pointer-types]
   57 |                     &compbufsz,
      |                     ^~~~~~~~~~
      |                     |
      |                     size_t * {aka unsigned int *}
In file included from /home/buildozer/aports/community/openexr/src/openexr-3.1.13/src/lib/OpenEXRCore/internal_dwa.c:117:
/usr/include/zlib.h:1247:54: note: expected 'uLongf *' {aka 'long unsigned int *'} but argument is of type 'size_t *' {aka 'unsigned int *'}
 1247 | ZEXTERN int ZEXPORT compress2(Bytef *dest,   uLongf *destLen,
      |                                              ~~~~~~~~^~~~~~~
Edited by mio

Merge request reports

Loading