Re: UPDATE: OpenImageIO 2.5.9
On Sat, Mar 30, 2024 at 07:49:16PM -0400, Brad Smith wrote: > On Sat, Mar 30, 2024 at 07:55:58PM +, Stuart Henderson wrote: > > On 2024/03/30 11:34, Stuart Henderson wrote: > > > On 2024/03/29 08:20, Stuart Henderson wrote: > > > > On 2024/03/28 21:51, Brad Smith wrote: > > > > > On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > > > > > > On 2024/03/25 23:07, Brad Smith wrote: > > > > > > > Here is an update to OpenImageIO 2.5.9. > > > > > > > > > > > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it > > > > > > > > > > I noticed a package missing on amd64 for the last two bulk builds but > > > > > haven't seen anything from naddy@ yet. It builds for me on my amd64 > > > > > build host. > > > > > > > > That will have been due to the problem with the cmake update and > > > > tiff - it built on amd64 in the current bulk. > > > > > > > > > This appears to have something to do with the last commit to > > > > > strutil_test.cpp. > > > > > Try the following.. > > > > > > > > Will do. > > > > > > FAILED: src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o > > > > oops, missed -p0 on the patch command. will try again in the next bulk. > > I filed a bug report. Upstream provided a proper fix. And it was commited. Index: Makefile === RCS file: /cvs/ports/graphics/openimageio/Makefile,v retrieving revision 1.69 diff -u -p -u -p -r1.69 Makefile --- Makefile22 Mar 2024 12:25:32 - 1.69 +++ Makefile31 Mar 2024 04:06:35 - @@ -7,6 +7,7 @@ GH_ACCOUNT =AcademySoftwareFoundation GH_PROJECT = OpenImageIO GH_TAGNAME = v2.4.17.0 PKGNAME = ${DISTNAME:L} +REVISION = 0 SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 Index: patches/patch-src_include_OpenImageIO_detail_farmhash_h === RCS file: patches/patch-src_include_OpenImageIO_detail_farmhash_h diff -N patches/patch-src_include_OpenImageIO_detail_farmhash_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_detail_farmhash_h 31 Mar 2024 04:06:35 - @@ -0,0 +1,15 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/commit/004a04fc1d5f5a949598b18978f8f960fc604d1b + +Index: src/include/OpenImageIO/detail/farmhash.h +--- src/include/OpenImageIO/detail/farmhash.h.orig src/include/OpenImageIO/detail/farmhash.h +@@ -2097,7 +2097,7 @@ STATIC_INLINE uint64_t Hash64(const char* s, size_t le + // May change from time to time, may differ on different platforms, may differ + // depending on NDEBUG. + STATIC_INLINE size_t Hash(const char* s, size_t len) { +- return sizeof(size_t) == 8 ? Hash64(s, len) : Hash32(s, len); ++ return sizeof(size_t) == 8 ? size_t(Hash64(s, len)) : size_t(Hash32(s, len)); + } + + // Hash function for a byte array. For convenience, a 64-bit seed is also Index: patches/patch-src_include_OpenImageIO_strutil_h === RCS file: patches/patch-src_include_OpenImageIO_strutil_h diff -N patches/patch-src_include_OpenImageIO_strutil_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_strutil_h 31 Mar 2024 04:06:35 - @@ -0,0 +1,20 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/commit/004a04fc1d5f5a949598b18978f8f960fc604d1b + +Index: src/include/OpenImageIO/strutil.h +--- src/include/OpenImageIO/strutil.h.orig src/include/OpenImageIO/strutil.h +@@ -370,11 +370,11 @@ std::string OIIO_UTIL_API wordwrap (string_view src, i + + + /// Our favorite "string" hash of a length of bytes. Currently, it is just +-/// a wrapper for an inlined, constexpr (if C++ >= 14), Cuda-safe farmhash. ++/// a wrapper for an inlined, constexpr, Cuda-safe farmhash. + inline constexpr size_t + strhash (size_t len, const char *s) + { +-return OIIO::farmhash::inlined::Hash(s, len); ++return size_t(OIIO::farmhash::inlined::Hash64(s, len)); + } + + Index: patches/patch-src_libutil_strutil_test_cpp === RCS file: patches/patch-src_libutil_strutil_test_cpp diff -N patches/patch-src_libutil_strutil_test_cpp --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_libutil_strutil_test_cpp 31 Mar 2024 04:06:35 - @@ -0,0 +1,24 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/commit/004a04fc1d5f5a949598b18978f8f960fc604d1b + +Index: src/libutil/strutil_test.cpp +--- src/libutil/strutil_test.cpp.orig src/libutil/strutil_test.cpp +@@ -346,13 +346,13 @@ void + test_hash() + { + using namespace Strutil; +-
Re: UPDATE: OpenImageIO 2.5.9
On Sat, Mar 30, 2024 at 07:55:58PM +, Stuart Henderson wrote: > On 2024/03/30 11:34, Stuart Henderson wrote: > > On 2024/03/29 08:20, Stuart Henderson wrote: > > > On 2024/03/28 21:51, Brad Smith wrote: > > > > On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > > > > > On 2024/03/25 23:07, Brad Smith wrote: > > > > > > Here is an update to OpenImageIO 2.5.9. > > > > > > > > > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it > > > > > > > > I noticed a package missing on amd64 for the last two bulk builds but > > > > haven't seen anything from naddy@ yet. It builds for me on my amd64 > > > > build host. > > > > > > That will have been due to the problem with the cmake update and > > > tiff - it built on amd64 in the current bulk. > > > > > > > This appears to have something to do with the last commit to > > > > strutil_test.cpp. > > > > Try the following.. > > > > > > Will do. > > > > FAILED: src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o > > oops, missed -p0 on the patch command. will try again in the next bulk. I filed a bug report. Upstream provided a proper fix. Index: Makefile === RCS file: /cvs/ports/graphics/openimageio/Makefile,v retrieving revision 1.69 diff -u -p -u -p -r1.69 Makefile --- Makefile22 Mar 2024 12:25:32 - 1.69 +++ Makefile30 Mar 2024 23:05:59 - @@ -7,6 +7,7 @@ GH_ACCOUNT =AcademySoftwareFoundation GH_PROJECT = OpenImageIO GH_TAGNAME = v2.4.17.0 PKGNAME = ${DISTNAME:L} +REVISION = 0 SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 Index: patches/patch-src_include_OpenImageIO_detail_farmhash_h === RCS file: patches/patch-src_include_OpenImageIO_detail_farmhash_h diff -N patches/patch-src_include_OpenImageIO_detail_farmhash_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_detail_farmhash_h 30 Mar 2024 23:05:59 - @@ -0,0 +1,15 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4213 + +Index: src/include/OpenImageIO/detail/farmhash.h +--- src/include/OpenImageIO/detail/farmhash.h.orig src/include/OpenImageIO/detail/farmhash.h +@@ -2097,7 +2097,7 @@ STATIC_INLINE uint64_t Hash64(const char* s, size_t le + // May change from time to time, may differ on different platforms, may differ + // depending on NDEBUG. + STATIC_INLINE size_t Hash(const char* s, size_t len) { +- return sizeof(size_t) == 8 ? Hash64(s, len) : Hash32(s, len); ++ return sizeof(size_t) == 8 ? size_t(Hash64(s, len)) : size_t(Hash32(s, len)); + } + + // Hash function for a byte array. For convenience, a 64-bit seed is also Index: patches/patch-src_include_OpenImageIO_strutil_h === RCS file: patches/patch-src_include_OpenImageIO_strutil_h diff -N patches/patch-src_include_OpenImageIO_strutil_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_strutil_h 30 Mar 2024 23:05:59 - @@ -0,0 +1,20 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4213 + +Index: src/include/OpenImageIO/strutil.h +--- src/include/OpenImageIO/strutil.h.orig src/include/OpenImageIO/strutil.h +@@ -370,11 +370,11 @@ std::string OIIO_UTIL_API wordwrap (string_view src, i + + + /// Our favorite "string" hash of a length of bytes. Currently, it is just +-/// a wrapper for an inlined, constexpr (if C++ >= 14), Cuda-safe farmhash. ++/// a wrapper for an inlined, constexpr, Cuda-safe farmhash. + inline constexpr size_t + strhash (size_t len, const char *s) + { +-return OIIO::farmhash::inlined::Hash(s, len); ++return size_t(OIIO::farmhash::inlined::Hash64(s, len)); + } + + Index: patches/patch-src_libutil_strutil_test_cpp === RCS file: patches/patch-src_libutil_strutil_test_cpp diff -N patches/patch-src_libutil_strutil_test_cpp --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_libutil_strutil_test_cpp 30 Mar 2024 23:05:59 - @@ -0,0 +1,24 @@ +fix: Restore internals of strhash to compile on 32 bit architectures +https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4213 + +Index: src/libutil/strutil_test.cpp +--- src/libutil/strutil_test.cpp.orig src/libutil/strutil_test.cpp +@@ -346,13 +346,13 @@ void + test_hash() + { + using namespace Strutil; +-OIIO_CHECK_EQUAL(strhash("foo"), 6150913649986995171); +-OIIO_CHECK_EQUAL(strhash(std::string("foo")), 6150913649986995171); +-OIIO_CHECK_EQUAL(strhash(string_view("foo")), 6150913649986995171); ++OIIO_CHECK_EQUAL(strhash("foo"),
Re: UPDATE: OpenImageIO 2.5.9
On 2024-03-30 3:55 p.m., Stuart Henderson wrote: On 2024/03/30 11:34, Stuart Henderson wrote: On 2024/03/29 08:20, Stuart Henderson wrote: On 2024/03/28 21:51, Brad Smith wrote: On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: On 2024/03/25 23:07, Brad Smith wrote: Here is an update to OpenImageIO 2.5.9. 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it I noticed a package missing on amd64 for the last two bulk builds but haven't seen anything from naddy@ yet. It builds for me on my amd64 build host. That will have been due to the problem with the cmake update and tiff - it built on amd64 in the current bulk. This appears to have something to do with the last commit to strutil_test.cpp. Try the following.. Will do. FAILED: src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o oops, missed -p0 on the patch command. will try again in the next bulk. Fired up an i386 VM. Verified it fails before and builds with the diff.
Re: UPDATE: OpenImageIO 2.5.9
On 2024/03/30 11:34, Stuart Henderson wrote: > On 2024/03/29 08:20, Stuart Henderson wrote: > > On 2024/03/28 21:51, Brad Smith wrote: > > > On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > > > > On 2024/03/25 23:07, Brad Smith wrote: > > > > > Here is an update to OpenImageIO 2.5.9. > > > > > > > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it > > > > > > I noticed a package missing on amd64 for the last two bulk builds but > > > haven't seen anything from naddy@ yet. It builds for me on my amd64 > > > build host. > > > > That will have been due to the problem with the cmake update and > > tiff - it built on amd64 in the current bulk. > > > > > This appears to have something to do with the last commit to > > > strutil_test.cpp. > > > Try the following.. > > > > Will do. > > FAILED: src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o oops, missed -p0 on the patch command. will try again in the next bulk.
Re: UPDATE: OpenImageIO 2.5.9
On 2024/03/29 08:20, Stuart Henderson wrote: > On 2024/03/28 21:51, Brad Smith wrote: > > On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > > > On 2024/03/25 23:07, Brad Smith wrote: > > > > Here is an update to OpenImageIO 2.5.9. > > > > > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it > > > > I noticed a package missing on amd64 for the last two bulk builds but > > haven't seen anything from naddy@ yet. It builds for me on my amd64 > > build host. > > That will have been due to the problem with the cmake update and > tiff - it built on amd64 in the current bulk. > > > This appears to have something to do with the last commit to > > strutil_test.cpp. > > Try the following.. > > Will do. FAILED: src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o /pobj/openimageio-2.4.17.0/bin/c++ -DOIIO_INTERNAL=1 -DUSE_BOOST_FILESYSTEM -DUSE_EXTERNAL_PUGIXML=1 -DUSE_FREETYPE=1 -DUSE_JPEG_TURBO=1 -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/pobj/openimageio-2.4.17.0/build-i386/include/OpenImageIO -I/pobj/openimageio-2.4.17.0/build-i386/include -I/pobj/openimageio-2.4.17.0/build-i386/src/include -I/pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include -isystem /usr/local/include -isystem /usr/local/include/Imath -O2 -pipe -DNDEBUG -std=c++14 -Wall -Wno-unused-function -Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-private-field -Wno-tautological-compare -Qunused-arguments -Wunknown-warning-option -Wno-unused-local-typedefs -Wno-expansion-to-defined -fno-math-errno -MD -MT src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o -MF src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o.d -o src/libutil/CMakeFiles/strutil_test.dir/strutil_test.cpp.o -c /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/libutil/strutil_test.cpp /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/libutil/strutil_test.cpp:354:22: error: constexpr variable 'hash' must be initialized by a constant expression constexpr size_t hash = Strutil::strhash("much longer string"); ^ ~~ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/detail/farmhash.h:1207:24: note: cannot refer to element -4 of array of 19 elements in a constant expression uint32_t a = Fetch(s - 4 + (len >> 1)); ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/detail/farmhash.h:1246:9: note: in call to 'Hash32Len13to24(&"much longer string"[0], 18, 0)' Hash32Len13to24(s, len); ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/detail/farmhash.h:2070:7: note: in call to 'Hash32(&"much longer string"[0], 18)' farmhashmk::Hash32(s, len)); ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/detail/farmhash.h:2100:49: note: in call to 'Hash32(&"much longer string"[0], 18)' return sizeof(size_t) == 8 ? Hash64(s, len) : Hash32(s, len); ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/strutil.h:377:12: note: in call to 'Hash(&"much longer string"[0], 18)' return OIIO::farmhash::inlined::Hash(s, len); ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/include/OpenImageIO/strutil.h:389:25: note: in call to 'strhash(18, &"much longer string"[0])' return s.length() ? strhash(s.length(), s.data()) : 0; ^ /pobj/openimageio-2.4.17.0/OpenImageIO-2.4.17.0/src/libutil/strutil_test.cpp:354:29: note: in call to 'strhash({&"much longer string"[0], 18})' constexpr size_t hash = Strutil::strhash("much longer string"); ^ 1 error generated. ninja: build stopped: subcommand failed. *** Error 1 in . (/usr/ports/devel/cmake/cmake.port.mk:46 'do-build': @cd /pobj/openimageio-2.4.17.0/build-i386 && exec /usr/bin/env -i LIBO...) *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3057 '/pobj/openimageio-2.4.17.0/build-i386/.build_done': @cd /usr/ports/graphics...) *** Error 2 in /usr/ports/graphics/openimageio (/usr/ports/infrastructure/mk/bsd.port.mk:2704 'all': @lock=openimageio-2.4.17.0p0; export _...) > > > > Index: Makefile > > === > > RCS file: /cvs/ports/graphics/openimageio/Makefile,v > > retrieving revision 1.69 > > diff -u -p -u -p -r1.69 Makefile > > --- Makefile22 Mar 2024 12:25:32 - 1.69 > > +++ Makefile29 Mar 2024 01:33:57 - > > @@ -7,6 +7,7 @@ GH_ACCOUNT =AcademySoftwareFoundation > > GH_PROJECT = OpenImageIO > > GH_TAGNAME = v2.4.17.0 > > PKGNAME = ${DISTNAME:L} > > +REVISION = 0 > > > > SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 > > SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 > > Index:
Re: UPDATE: OpenImageIO 2.5.9
On 2024/03/28 21:51, Brad Smith wrote: > On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > > On 2024/03/25 23:07, Brad Smith wrote: > > > Here is an update to OpenImageIO 2.5.9. > > > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it > > I noticed a package missing on amd64 for the last two bulk builds but > haven't seen anything from naddy@ yet. It builds for me on my amd64 > build host. That will have been due to the problem with the cmake update and tiff - it built on amd64 in the current bulk. > This appears to have something to do with the last commit to strutil_test.cpp. > Try the following.. Will do. > > Index: Makefile > === > RCS file: /cvs/ports/graphics/openimageio/Makefile,v > retrieving revision 1.69 > diff -u -p -u -p -r1.69 Makefile > --- Makefile 22 Mar 2024 12:25:32 - 1.69 > +++ Makefile 29 Mar 2024 01:33:57 - > @@ -7,6 +7,7 @@ GH_ACCOUNT = AcademySoftwareFoundation > GH_PROJECT = OpenImageIO > GH_TAGNAME = v2.4.17.0 > PKGNAME =${DISTNAME:L} > +REVISION = 0 > > SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 > SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 > Index: patches/patch-src_include_OpenImageIO_detail_farmhash_h > === > RCS file: patches/patch-src_include_OpenImageIO_detail_farmhash_h > diff -N patches/patch-src_include_OpenImageIO_detail_farmhash_h > --- /dev/null 1 Jan 1970 00:00:00 - > +++ patches/patch-src_include_OpenImageIO_detail_farmhash_h 29 Mar 2024 > 01:33:57 - > @@ -0,0 +1,92 @@ > +Revert fix(strutil.h): ensure proper constexpr of string hashing (#3901) > +8e8dab1215f584ff940ea6240768abecd5c63f07 > + > +Index: src/include/OpenImageIO/detail/farmhash.h > +--- src/include/OpenImageIO/detail/farmhash.h.orig > src/include/OpenImageIO/detail/farmhash.h > +@@ -244,77 +244,21 @@ STATIC_INLINE uint32_t Fetch32(const char *p) { > + > + #else > + > +-#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L > +-// C++20 compiler with constexpr support std::bitcast > +-STATIC_INLINE uint64_t Fetch64(const char *p) { > +- struct BlockOfBytes { > +-char bytes[8]; > +- }; > +- BlockOfBytes bob{p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7]}; > +- return std::bit_cast(bob); > ++template > ++STATIC_INLINE T FetchType(const char *p) { > ++ T result = 0; > ++ for (size_t i = 0; i < sizeof(T); i++) > ++ reinterpret_cast()[i] = p[i]; > ++ return result; > + } > +-STATIC_INLINE uint32_t Fetch32(const char *p) { > +- struct BlockOfBytes { > +-char bytes[4]; > +- }; > +- BlockOfBytes bob{p[0],p[1],p[2],p[3]}; > +- return std::bit_cast(bob); > +-} > + > +-#else > +- > +-// constexpr supported for C++14,17 versions that manually load bytes and > +-// bitshift into proper order for the unsigned integer. > +-// NOTE: bigendian untested > + STATIC_INLINE uint64_t Fetch64(const char *p) { > +-// Favor letting uint8_t construction to handle > +-// signed to unsigned conversion vs. uint64_t(p[0]&0xff) > +-uint8_t b0 = p[0]; > +-uint8_t b1 = p[1]; > +-uint8_t b2 = p[2]; > +-uint8_t b3 = p[3]; > +-uint8_t b4 = p[4]; > +-uint8_t b5 = p[5]; > +-uint8_t b6 = p[6]; > +-uint8_t b7 = p[7]; > +-return littleendian() ? > +-(uint64_t(b0)) | // LSB > +-(uint64_t(b1) << 8) | > +-(uint64_t(b2) << 16) | > +-(uint64_t(b3) << 24) | > +-(uint64_t(b4) << 32) | > +-(uint64_t(b5) << 40) | > +-(uint64_t(b6) << 48) | > +-(uint64_t(b7) << 56) // MSB > +- : // Big Endian byte order > +-(uint64_t(b0) << 56) | // MSB > +-(uint64_t(b1) << 48) | > +-(uint64_t(b2) << 40) | > +-(uint64_t(b3) << 32) | > +-(uint64_t(b4) << 24) | > +-(uint64_t(b5) << 16) | > +-(uint64_t(b6) << 8) | > +-(uint64_t(b7)) ; // LSB > ++ return FetchType(p); > + } > + > + STATIC_INLINE uint32_t Fetch32(const char *p) { > +-uint8_t b0 = p[0]; > +-uint8_t b1 = p[1]; > +-uint8_t b2 = p[2]; > +-uint8_t b3 = p[3]; > +-return littleendian() ? > +-(uint32_t(b0)) | // LSB > +-(uint32_t(b1) << 8) | > +-(uint32_t(b2) << 16) | > +-(uint32_t(b3) << 24) // MSB > +- : // Big Endian byte order > +-(uint32_t(b0) << 24) | // MSB > +-(uint32_t(b1) << 16) | > +-(uint32_t(b2) << 8) | > +-(uint32_t(b3));// LSB > ++ return FetchType(p); > + } > +-#endif > +- > + > + // devices don't seem to have bswap_64() or bswap_32() > + template > Index: patches/patch-src_include_OpenImageIO_string_view_h > === > RCS file: patches/patch-src_include_OpenImageIO_string_view_h > diff -N
Re: UPDATE: OpenImageIO 2.5.9
On Thu, Mar 28, 2024 at 04:12:55PM +, Stuart Henderson wrote: > On 2024/03/25 23:07, Brad Smith wrote: > > Here is an update to OpenImageIO 2.5.9. > > 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it I noticed a package missing on amd64 for the last two bulk builds but haven't seen anything from naddy@ yet. It builds for me on my amd64 build host. This appears to have something to do with the last commit to strutil_test.cpp. Try the following.. Index: Makefile === RCS file: /cvs/ports/graphics/openimageio/Makefile,v retrieving revision 1.69 diff -u -p -u -p -r1.69 Makefile --- Makefile22 Mar 2024 12:25:32 - 1.69 +++ Makefile29 Mar 2024 01:33:57 - @@ -7,6 +7,7 @@ GH_ACCOUNT =AcademySoftwareFoundation GH_PROJECT = OpenImageIO GH_TAGNAME = v2.4.17.0 PKGNAME = ${DISTNAME:L} +REVISION = 0 SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 Index: patches/patch-src_include_OpenImageIO_detail_farmhash_h === RCS file: patches/patch-src_include_OpenImageIO_detail_farmhash_h diff -N patches/patch-src_include_OpenImageIO_detail_farmhash_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_detail_farmhash_h 29 Mar 2024 01:33:57 - @@ -0,0 +1,92 @@ +Revert fix(strutil.h): ensure proper constexpr of string hashing (#3901) +8e8dab1215f584ff940ea6240768abecd5c63f07 + +Index: src/include/OpenImageIO/detail/farmhash.h +--- src/include/OpenImageIO/detail/farmhash.h.orig src/include/OpenImageIO/detail/farmhash.h +@@ -244,77 +244,21 @@ STATIC_INLINE uint32_t Fetch32(const char *p) { + + #else + +-#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L +-// C++20 compiler with constexpr support std::bitcast +-STATIC_INLINE uint64_t Fetch64(const char *p) { +- struct BlockOfBytes { +-char bytes[8]; +- }; +- BlockOfBytes bob{p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7]}; +- return std::bit_cast(bob); ++template ++STATIC_INLINE T FetchType(const char *p) { ++ T result = 0; ++ for (size_t i = 0; i < sizeof(T); i++) ++ reinterpret_cast()[i] = p[i]; ++ return result; + } +-STATIC_INLINE uint32_t Fetch32(const char *p) { +- struct BlockOfBytes { +-char bytes[4]; +- }; +- BlockOfBytes bob{p[0],p[1],p[2],p[3]}; +- return std::bit_cast(bob); +-} + +-#else +- +-// constexpr supported for C++14,17 versions that manually load bytes and +-// bitshift into proper order for the unsigned integer. +-// NOTE: bigendian untested + STATIC_INLINE uint64_t Fetch64(const char *p) { +-// Favor letting uint8_t construction to handle +-// signed to unsigned conversion vs. uint64_t(p[0]&0xff) +-uint8_t b0 = p[0]; +-uint8_t b1 = p[1]; +-uint8_t b2 = p[2]; +-uint8_t b3 = p[3]; +-uint8_t b4 = p[4]; +-uint8_t b5 = p[5]; +-uint8_t b6 = p[6]; +-uint8_t b7 = p[7]; +-return littleendian() ? +-(uint64_t(b0)) | // LSB +-(uint64_t(b1) << 8) | +-(uint64_t(b2) << 16) | +-(uint64_t(b3) << 24) | +-(uint64_t(b4) << 32) | +-(uint64_t(b5) << 40) | +-(uint64_t(b6) << 48) | +-(uint64_t(b7) << 56) // MSB +- : // Big Endian byte order +-(uint64_t(b0) << 56) | // MSB +-(uint64_t(b1) << 48) | +-(uint64_t(b2) << 40) | +-(uint64_t(b3) << 32) | +-(uint64_t(b4) << 24) | +-(uint64_t(b5) << 16) | +-(uint64_t(b6) << 8) | +-(uint64_t(b7)) ; // LSB ++ return FetchType(p); + } + + STATIC_INLINE uint32_t Fetch32(const char *p) { +-uint8_t b0 = p[0]; +-uint8_t b1 = p[1]; +-uint8_t b2 = p[2]; +-uint8_t b3 = p[3]; +-return littleendian() ? +-(uint32_t(b0)) | // LSB +-(uint32_t(b1) << 8) | +-(uint32_t(b2) << 16) | +-(uint32_t(b3) << 24) // MSB +- : // Big Endian byte order +-(uint32_t(b0) << 24) | // MSB +-(uint32_t(b1) << 16) | +-(uint32_t(b2) << 8) | +-(uint32_t(b3));// LSB ++ return FetchType(p); + } +-#endif +- + + // devices don't seem to have bswap_64() or bswap_32() + template Index: patches/patch-src_include_OpenImageIO_string_view_h === RCS file: patches/patch-src_include_OpenImageIO_string_view_h diff -N patches/patch-src_include_OpenImageIO_string_view_h --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-src_include_OpenImageIO_string_view_h 29 Mar 2024 01:33:57 - @@ -0,0 +1,39 @@ +Revert fix(strutil.h): ensure proper constexpr of string hashing (#3901) +8e8dab1215f584ff940ea6240768abecd5c63f07 + +Index: src/include/OpenImageIO/string_view.h +--- src/include/OpenImageIO/string_view.h.orig src/include/OpenImageIO/string_view.h +@@ -106,8
Re: UPDATE: OpenImageIO 2.5.9
On 2024/03/25 23:07, Brad Smith wrote: > Here is an update to OpenImageIO 2.5.9. 2.4.17.0 is broken on i386 - 2.5.9 doesn't fix it >>> Building on localhost under graphics/openimageio BDEPENDS = [devel/fmt;x11/qt6/qtbase;devel/tbb;devel/cmake;devel/boost;devel/py-pybind11,python3;graphics/openexr;multimedia/libheif;lang/python/3;devel/robin-map;graphics/giflib;graphics/openjp2;graphics/ffmpeg;textproc/pugixml;graphics/png;graphics/opencolorio;textproc/txt2man;devel/ninja;graphics/libraw;graphics/libwebp;graphics/tiff;graphics/jpeg;x11/qt6/qttools] DIST = [graphics/openimageio:OpenImageIO-2.4.17.0.tar.gz] FULLPKGNAME = openimageio-2.4.17.0 RDEPENDS = [devel/boost;graphics/openexr;x11/qt6/qtbase;devel/tbb;graphics/openjp2;graphics/ffmpeg;graphics/giflib;lang/python/3;multimedia/libheif;graphics/opencolorio;graphics/png;textproc/pugixml;graphics/tiff;graphics/jpeg;graphics/libraw;graphics/libwebp] Woken up x11/qt6/qt5compat Woken up x11/polkit-qt (Junk lock failure for localhost at 1711628803.39281) Received IO (Junk lock obtained for localhost at 1711628840.75) Received IO Woken up graphics/openimageio Woken up graphics/openimageio Short-cut: depends already handled by x11/qt6/qt5compat >>> Running show-prepare-results in graphics/openimageio at 1711628841.60 ===> graphics/openimageio ===> Building from scratch openimageio-2.4.17.0 ===> openimageio-2.4.17.0 depends on: fmt-* -> fmt-8.1.1 ===> openimageio-2.4.17.0 depends on: py3-pybind11-* -> py3-pybind11-2.11.1 ===> openimageio-2.4.17.0 depends on: robin-map-* -> robin-map-1.2.1 ===> openimageio-2.4.17.0 depends on: txt2man-* -> txt2man-1.5.6p3 ===> openimageio-2.4.17.0 depends on: cmake-* -> cmake-3.28.3v1 ===> openimageio-2.4.17.0 depends on: ninja-* -> ninja-1.11.1 ===> openimageio-2.4.17.0 depends on: python->=3.11,<3.12 -> python-3.11.8p2 ===> openimageio-2.4.17.0 depends on: qt6-qttools->=6.6.3,<6.7.0 -> qt6-qttools-6.6.3 ===> openimageio-2.4.17.0 depends on: boost-* -> boost-1.84.0p3v0 ===> openimageio-2.4.17.0 depends on: tbb-* -> tbb-2020.3.3p0 ===> openimageio-2.4.17.0 depends on: ffmpeg-* -> ffmpeg-4.4.4p3v1 ===> openimageio-2.4.17.0 depends on: giflib-* -> giflib-5.2.2 ===> openimageio-2.4.17.0 depends on: jpeg-* -> jpeg-3.0.2v0 ===> openimageio-2.4.17.0 depends on: libraw-* -> libraw-0.21.2 ===> openimageio-2.4.17.0 depends on: libwebp-* -> libwebp-1.3.2 ===> openimageio-2.4.17.0 depends on: opencolorio-* -> opencolorio-2.1.1v2 ===> openimageio-2.4.17.0 depends on: OpenEXR-* -> OpenEXR-3.2.3 ===> openimageio-2.4.17.0 depends on: openjp2-* -> openjp2-2.5.2 ===> openimageio-2.4.17.0 depends on: png-* -> png-1.6.43 ===> openimageio-2.4.17.0 depends on: tiff-* -> tiff-4.6.0 ===> openimageio-2.4.17.0 depends on: libheif-* -> libheif-1.16.2p1 ===> openimageio-2.4.17.0 depends on: pugixml-* -> pugixml-1.14 ===> openimageio-2.4.17.0 depends on: qt6-qtbase->=6.6.3,<6.7.0 -> qt6-qtbase-6.6.3 ===> Verifying specs: c++ c++abi pthread GL GLU Iex-3_2 IlmThread-3_2 Imath-3_1 OpenColorIO OpenEXR-3_2 OpenEXRCore-3_2 Qt6Core Qt6Gui Qt6OpenGL Qt6OpenGLWidgets Qt6Widgets avcodec avformat avutil boost_atomic-mt boost_chrono-mt boost_filesystem-mt boost_thread-mt bz2 c freetype gif heif jpeg m openjp2 png pugixml raw_r swscale tbb tiff webp webpdemux z ===> found c++.10.0 c++abi.7.0 pthread.27.1 GL.19.0 GLU.9.0 Iex-3_2.2.0 IlmThread-3_2.2.0 Imath-3_1.2.0 OpenColorIO.3.0 OpenEXR-3_2.2.0 OpenEXRCore-3_2.2.0 Qt6Core.4.1 Qt6Gui.6.0 Qt6OpenGL.2.1 Qt6OpenGLWidgets.1.0 Qt6Widgets.2.1 avcodec.25.0 avformat.22.0 avutil.15.0 boost_atomic-mt.23.0 boost_chrono-mt.23.0 boost_filesystem-mt.23.0 boost_thread-mt.23.0 bz2.10.4 c.99.0 freetype.30.3 gif.9.1 heif.1.6 jpeg.70.2 m.10.1 openjp2.6.0 png.18.0 pugixml.1.2 raw_r.5.0 swscale.7.0 tbb.1.0 tiff.42.0 webp.4.3 webpdemux.2.0 z.7.0 OpenEXR-3.2.3 boost-1.84.0p3v0 cmake-3.28.3v1 ffmpeg-4.4.4p3v1 fmt-8.1.1 giflib-5.2.2 jpeg-3.0.2v0 libheif-1.16.2p1 libraw-0.21.2 libwebp-1.3.2 ninja-1.11.1 opencolorio-2.1.1v2 openjp2-2.5.2 png-1.6.43 pugixml-1.14 py3-pybind11-2.11.1 python-3.11.8p2 qt6-qtbase-6.6.3 qt6-qttools-6.6.3 robin-map-1.2.1 tbb-2020.3.3p0 tiff-4.6.0 txt2man-1.5.6p3 Don't run junk because nojunk in x11/qt6/qt5compat (Junk lock released for localhost at 1711628847.18) Woken up x11/qt6/qtwayland distfiles size=47900800 >>> Running patch in graphics/openimageio at 1711628847.21 ===> graphics/openimageio ===> Checking files for openimageio-2.4.17.0 `/mnt/distfiles/OpenImageIO-2.4.17.0.tar.gz' is up to date. >> (SHA256) OpenImageIO-2.4.17.0.tar.gz: OK ===> Extracting for openimageio-2.4.17.0 ===> Patching for openimageio-2.4.17.0 ===> Compiler link: clang -> /usr/bin/clang ===> Compiler link: clang++ -> /usr/bin/clang++ ===> Compiler link: cc -> /usr/bin/cc ===> Compiler link: c++ -> /usr/bin/c++ >>> Running configure in graphics/openimageio at 1711628849.96 ===> graphics/openimageio ===> Generating configure for openimageio-2.4.17.0 ===> Configuring for openimageio-2.4.17.0
UPDATE: OpenImageIO 2.5.9
Here is an update to OpenImageIO 2.5.9. https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/dev-2.5/CHANGES.md Index: Makefile === RCS file: /cvs/ports/graphics/openimageio/Makefile,v retrieving revision 1.69 diff -u -p -u -p -r1.69 Makefile --- Makefile22 Mar 2024 12:25:32 - 1.69 +++ Makefile25 Mar 2024 03:53:18 - @@ -5,11 +5,11 @@ COMMENT = library for reading and writi GH_ACCOUNT = AcademySoftwareFoundation GH_PROJECT = OpenImageIO -GH_TAGNAME = v2.4.17.0 +GH_TAGNAME = v2.5.9.0 PKGNAME = ${DISTNAME:L} -SHARED_LIBS += OpenImageIO 14.0 # 2.4.10 -SHARED_LIBS += OpenImageIO_Util9.0 # 2.4.10 +SHARED_LIBS += OpenImageIO 15.0 # 2.4.10 +SHARED_LIBS += OpenImageIO_Util10.0 # 2.4.10 CATEGORIES = graphics devel Index: distinfo === RCS file: /cvs/ports/graphics/openimageio/distinfo,v retrieving revision 1.19 diff -u -p -u -p -r1.19 distinfo --- distinfo22 Mar 2024 12:25:32 - 1.19 +++ distinfo25 Mar 2024 03:53:18 - @@ -1,2 +1,2 @@ -SHA256 (OpenImageIO-2.4.17.0.tar.gz) = f+gdjlvOMMxKIS8CCsPMQ0Tmt8HAhCR146BIUVCZxlw= -SIZE (OpenImageIO-2.4.17.0.tar.gz) = 47900800 +SHA256 (OpenImageIO-2.5.9.0.tar.gz) = tqaONpvEdVJeuEO9wMuK3JEMxxAAgl+NubXhNhZs3Hg= +SIZE (OpenImageIO-2.5.9.0.tar.gz) = 52051925 Index: pkg/PLIST === RCS file: /cvs/ports/graphics/openimageio/pkg/PLIST,v retrieving revision 1.20 diff -u -p -u -p -r1.20 PLIST --- pkg/PLIST 27 Apr 2023 06:00:30 - 1.20 +++ pkg/PLIST 25 Mar 2024 03:53:18 - @@ -21,11 +21,13 @@ include/OpenImageIO/detail/ include/OpenImageIO/detail/farmhash.h include/OpenImageIO/detail/fmt/ include/OpenImageIO/detail/fmt.h +include/OpenImageIO/detail/fmt/chrono.h include/OpenImageIO/detail/fmt/core.h include/OpenImageIO/detail/fmt/format-inl.h include/OpenImageIO/detail/fmt/format.h include/OpenImageIO/detail/fmt/ostream.h include/OpenImageIO/detail/fmt/printf.h +include/OpenImageIO/detail/fmt/std.h include/OpenImageIO/errorhandler.h include/OpenImageIO/export.h include/OpenImageIO/filesystem.h