pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/59516: graphics/openimageio: build failure (mismatched pointers)
>Number: 59516
>Category: pkg
>Synopsis: graphics/openimageio: build failure (mismatched pointers)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 08 03:00:00 +0000 2025
>Originator: Robert Whitlock
>Release: pkgsrc current, July 7, 2025
>Organization:
>Environment:
NetBSD current, June 23, 2025, amd64
>Description:
Building graphics/openimageio fails with the output:
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for openimageio-2.5.17.0nb5
[ 0%] Built target CopyFiles
[ 1%] Built target fmt_internal_target
[ 10%] Built target OpenImageIO_Util
[ 11%] Built target argparse_test
[ 12%] Built target atomic_test
[ 13%] Built target span_test
[ 14%] Built target spinlock_test
[ 15%] Built target spin_rw_test
[ 17%] Built target ustring_test
[ 18%] Built target fmath_test
[ 19%] Built target filesystem_test
[ 20%] Built target optparser_test
[ 21%] Built target hash_test
[ 22%] Built target parallel_test
[ 23%] Built target timer_test
[ 24%] Built target thread_test
[ 25%] Built target typedesc_test
[ 26%] Built target type_traits_test
[ 26%] Building CXX object src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/heif.imageio/heifinput.cpp.o
/usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifinput.cpp: In member function 'virtual bool OpenImageIO_v2_5::HeifInput::read_native_scanline(int, int, int, int, void*)':
/usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifinput.cpp:398:46: error: no matching function for call to 'heif::Image::get_plane(heif_channel, int*)'
398 | const uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
399 | &ystride);
| ~~~~~~~~~
In file included from /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifinput.cpp:9:
/usr/pkg/include/libheif/heif_cxx.h:909:25: note: candidate: 'const uint8_t* heif::Image::get_plane(heif_channel, size_t*) const'
909 | inline const uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) const noexcept
| ^~~~~
/usr/pkg/include/libheif/heif_cxx.h:909:77: note: no known conversion for argument 2 from 'int*' to 'size_t*' {aka 'long unsigned int*'}
909 | inline const uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) const noexcept
| ~~~~~~~~^~~~~~~~~~
/usr/pkg/include/libheif/heif_cxx.h:914:19: note: candidate: 'uint8_t* heif::Image::get_plane(heif_channel, size_t*)'
914 | inline uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) noexcept
| ^~~~~
/usr/pkg/include/libheif/heif_cxx.h:914:71: note: no known conversion for argument 2 from 'int*' to 'size_t*' {aka 'long unsigned int*'}
914 | inline uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) noexcept
| ~~~~~~~~^~~~~~~~~~
*** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/heif.imageio/heifinput.cpp.o] Error code 1
make[2]: stopped making "src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/build" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make[2]: 1 error
make[2]: stopped making "src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/build" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/all] Error code 2
make[1]: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make[1]: 1 error
make[1]: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** [all] Error code 2
make: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make: 1 error
make: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** Error code 2
Stop.
make[1]: stopped making "install" in /usr/pkgsrc/graphics/openimageio
*** Error code 1
Stop.
make: stopped making "install" in /usr/pkgsrc/graphics/openimageio
This is corrected by changing a local int pointer to a size_t pointer. The build then fails with this output:
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for openimageio-2.5.17.0nb5
[ 0%] Built target CopyFiles
[ 1%] Built target fmt_internal_target
[ 10%] Built target OpenImageIO_Util
[ 11%] Built target argparse_test
[ 12%] Built target atomic_test
[ 13%] Built target span_test
[ 14%] Built target spinlock_test
[ 15%] Built target spin_rw_test
[ 17%] Built target ustring_test
[ 18%] Built target fmath_test
[ 19%] Built target filesystem_test
[ 20%] Built target optparser_test
[ 21%] Built target hash_test
[ 22%] Built target parallel_test
[ 23%] Built target timer_test
[ 24%] Built target thread_test
[ 25%] Built target typedesc_test
[ 26%] Built target type_traits_test
[ 27%] Building CXX object src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/heif.imageio/heifoutput.cpp.o
/usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifoutput.cpp: In member function 'virtual bool OpenImageIO_v2_5::HeifOutput::write_scanline(int, int, OpenImageIO_v2_5::TypeDesc, const void*, OpenImageIO_v2_5::stride_t)':
/usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifoutput.cpp:153:40: error: no matching function for call to 'heif::Image::get_plane(heif_channel, int*)'
153 | uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved, &hystride);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/src/heif.imageio/heifoutput.cpp:10:
/usr/pkg/include/libheif/heif_cxx.h:909:25: note: candidate: 'const uint8_t* heif::Image::get_plane(heif_channel, size_t*) const'
909 | inline const uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) const noexcept
| ^~~~~
/usr/pkg/include/libheif/heif_cxx.h:909:77: note: no known conversion for argument 2 from 'int*' to 'size_t*' {aka 'long unsigned int*'}
909 | inline const uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) const noexcept
| ~~~~~~~~^~~~~~~~~~
/usr/pkg/include/libheif/heif_cxx.h:914:19: note: candidate: 'uint8_t* heif::Image::get_plane(heif_channel, size_t*)'
914 | inline uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) noexcept
| ^~~~~
/usr/pkg/include/libheif/heif_cxx.h:914:71: note: no known conversion for argument 2 from 'int*' to 'size_t*' {aka 'long unsigned int*'}
914 | inline uint8_t* Image::get_plane(enum heif_channel channel, size_t* out_stride) noexcept
| ~~~~~~~~^~~~~~~~~~
*** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/heif.imageio/heifoutput.cpp.o] Error code 1
make[2]: stopped making "src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/build" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make[2]: 1 error
make[2]: stopped making "src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/build" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/all] Error code 2
make[1]: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make[1]: 1 error
make[1]: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** [all] Error code 2
make: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
make: 1 error
make: stopped making "all" in /usr/pkg-work/graphics/openimageio/work/OpenImageIO-2.5.17.0/cmake-pkgsrc-build
*** Error code 2
Stop.
make[1]: stopped making "install" in /usr/pkgsrc/graphics/openimageio
*** Error code 1
Stop.
make: stopped making "install" in /usr/pkgsrc/graphics/openimageio
This is fixed with another change of an int pointer to a size_t pointer.
>How-To-Repeat:
cd graphics/openimageio
make install
>Fix:
Patch for the distfile:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/openimageio/distinfo,v
retrieving revision 1.35
diff -u -r1.35 distinfo
--- distinfo 15 Feb 2025 15:47:55 -0000 1.35
+++ distinfo 8 Jul 2025 02:51:56 -0000
@@ -5,6 +5,8 @@
Size (OpenImageIO-2.5.17.0.tar.gz) = 52548216 bytes
SHA1 (patch-src_cmake_compiler.cmake) = d4abc010c5016cfcffab51191b5ea37edbfdd9cc
SHA1 (patch-src_cmake_externalpackages.cmake) = 710f1f66e55fbee5f7e330064db8535e7a1110fe
+SHA1 (patch-src_heif.imageio_heifinput.cpp) = 62ef8c602828bd8f70e527fa693a3db1e5e00f8c
+SHA1 (patch-src_heif.imageio_heifoutput.cpp) = 5c2b75f85d3b155fcc91e70567f4ea96d98e85cf
SHA1 (patch-src_include_OpenImageIO_imagebuf.h) = 6460cb5ff97b7d2c3eaedd7fb157dfce9d8d7984
SHA1 (patch-src_include_OpenImageIO_strutil.h) = 90efe95bf763881478aea851cce0ea67a9de9c1a
SHA1 (patch-src_libutil_strutil.cpp) = fd63f4648cd9750d7b9e496c183886d348c2cff5
Contents of patches/patch-src_heif.imageio_heifinput.cpp:
$NetBSD$
--- src/heif.imageio/heifinput.cpp.orig 2025-07-08 02:10:06.870924927 +0000
+++ src/heif.imageio/heifinput.cpp
@@ -394,7 +394,7 @@ HeifInput::read_native_scanline(int subi
if (y < 0 || y >= m_spec.height) // out of range scanline
return false;
- int ystride = 0;
+ size_t ystride = 0;
const uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved,
&ystride);
if (!hdata) {
Contents of patches/patch-src_heif.imageio_heifoutput.cpp:
$NetBSD$
--- src/heif.imageio/heifoutput.cpp.orig 2025-07-08 02:10:15.466799180 +0000
+++ src/heif.imageio/heifoutput.cpp
@@ -149,7 +149,7 @@ HeifOutput::write_scanline(int y, int /*
stride_t xstride)
{
data = to_native_scanline(format, data, xstride, scratch);
- int hystride = 0;
+ size_t hystride = 0;
uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved, &hystride);
hdata += hystride * (y - m_spec.y);
memcpy(hdata, data, hystride);
Home |
Main Index |
Thread Index |
Old Index