Opened 12 months ago

Last modified 2 weeks ago

#67346 assigned defect

openimageio @2.4.5.0: error: use of bitwise '&' with boolean operands

Reported by: elteck Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), cooljeanius (Eric Gallager), someuser12
Port: openimageio

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Build of openimageio fails on what appears to be a coding error (or compiler mismatch?)::info:build

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/libtexture/texturesys.cpp:2305:26: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
        bool s_onetile = (tile_st[S0] != tilewhmask[S0])
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/libtexture/texturesys.cpp:2305:26: note: cast one or both operands to int to silence this warning
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/libtexture/texturesys.cpp:2307:26: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
        bool t_onetile = (tile_st[T0] != tilewhmask[T0])
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/libtexture/texturesys.cpp:2307:26: note: cast one or both operands to int to silence this warning
2 errors generated.

I will attach the full build log file.

Attachments (1)

main.log (1.1 MB) - added by elteck 12 months ago.
Build log of imageio

Download all attachments as: .zip

Change History (16)

Changed 12 months ago by elteck

Attachment: main.log added

Build log of imageio

comment:1 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: set to MarcusCalhoun-Lopez
Status: newassigned
Summary: Build error in openimageioopenimageio @2.4.5.0: error: use of bitwise '&' with boolean operands

comment:2 Changed 11 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:3 Changed 11 months ago by Christopher Nielsen <mascguy@…>

In 3c2fbd25fe73335e2fac1e726be888a669365813/macports-ports (master):

openimageio: relax compiler warnings/errors
See: #67346

comment:4 Changed 11 months ago by Christopher Nielsen <mascguy@…>

In a94cf447e443badaf8c5576c687b1a4c93be73ae/macports-ports (master):

openimageio: update patch, to fix unknown-warning-option
See: #67346

comment:5 Changed 11 months ago by jmroot (Joshua Root)

The problem is not the warnings, it's the use of -Werror.

comment:6 in reply to:  5 ; Changed 11 months ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

Replying to jmroot:

The problem is not the warnings, it's the use of -Werror.

That is only one of the problems, fixed via the first commit. The other is that upstream's cmake script is enabling unknown-warning-option, and that appears to be a bug: The comments suggests that they actually want to DISABLE that, but they enable it instead.

Anyhow, the second issue was fixed via the subsequent commit, and the build now appears to be fixed.

comment:7 Changed 11 months ago by jmroot (Joshua Root)

The first commit did not fix it; the builds triggered by both of the above commits still have -Werror in all the compile commands. That is why the warnings, including the warning about unknown warning options, are stopping compilation.

comment:8 in reply to:  7 Changed 11 months ago by mascguy (Christopher Nielsen)

Replying to jmroot:

The first commit did not fix it; the builds triggered by both of the above commits still have -Werror in all the compile commands. That is why the warnings, including the warning about unknown warning options, are stopping compilation.

Apart from builds for older macOS releases, which are covered by a separate ticket, I no longer see any failures.

Which ones are you referring to...?

comment:9 Changed 11 months ago by jmroot (Joshua Root)

Yes, you've won warning whack-a-mole for the time being by disabling a bunch of warnings, but -Werror is still being used and will break things next time a new warning pops up. Look at literally any of the logs for the builds triggered by those commits. As a single example: https://build.macports.org/builders/ports-12_arm64-builder/builds/98924/steps/install-port/logs/stdio

The very first compile command run is:

[  1%] Building CXX object src/libutil/CMakeFiles/OpenImageIO_Util.dir/errorhandler.cpp.o
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/build/src/libutil && /usr/bin/clang++ -DOIIO_INTERNAL=1 -DOpenImageIO_EXPORTS -DOpenImageIO_Util_EXPORTS -DUSE_BOOST_FILESYSTEM -DUSE_FREETYPE=1 -DUSE_JPEG_TURBO=1 -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -DUSE_OPENCV=1 -DUSE_OPENVDB=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/build/include/OpenImageIO -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/build/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/build/src/include -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/include -I/opt/local/include/libfmt9 -isystem /opt/local/include -isystem /opt/local/libexec/boost/1.76/include -isystem /opt/local/include/Imath -isystem /opt/local/libexec/tbb/include -pipe -I/opt/local/libexec/boost/1.76/include -Os -Wno-deprecated-declarations -Wno-error=unknown-warning-option -Wno-unknown-warning-option -DNDEBUG -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-version-min=12.0 -fPIC -Werror -Wno-unused-function -Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-private-field -Wno-tautological-compare -Qunused-arguments -Wno-unknown-warning-option -Wno-unused-local-typedefs -fno-math-errno -std=c++14 -MD -MT src/libutil/CMakeFiles/OpenImageIO_Util.dir/errorhandler.cpp.o -MF CMakeFiles/OpenImageIO_Util.dir/errorhandler.cpp.o.d -o CMakeFiles/OpenImageIO_Util.dir/errorhandler.cpp.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_openimageio/openimageio/work/oiio-2.4.5.0/src/libutil/errorhandler.cpp

comment:10 in reply to:  9 Changed 10 months ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: closedreopened

Replying to jmroot:

Yes, you've won warning whack-a-mole for the time being by disabling a bunch of warnings, but -Werror is still being used and will break things next time a new warning pops up. Look at literally any of the logs for the builds triggered by those commits. As a single example: https://build.macports.org/builders/ports-12_arm64-builder/builds/98924/steps/install-port/logs/stdio

Agreed, they're still there, and a more thorough fix is needed. Reopening to track that, and will take a look ASAP.

comment:11 Changed 10 months ago by mascguy (Christopher Nielsen)

Cc: MarcusCalhoun-Lopez added; mascguy removed
Owner: changed from MarcusCalhoun-Lopez to mascguy
Status: reopenedassigned

comment:12 Changed 10 months ago by Christopher Nielsen <mascguy@…>

In 67edbae5e5700c19e8b57636029feb3fcd393740/macports-ports (master):

openimageio: avoid using Wall/Werror; rev-bump to rebuild
See: #67346

comment:13 Changed 2 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:14 in reply to:  6 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to mascguy:

upstream's cmake script is enabling unknown-warning-option, and that appears to be a bug: The comments suggests that they actually want to DISABLE that, but they enable it instead.

Have you filed an upstream bug report or pull request about that?

comment:15 Changed 2 weeks ago by someuser12

Cc: someuser12 added
Note: See TracTickets for help on using tickets.