Opened 9 months ago

Closed 9 months ago

#69447 closed defect (duplicate)

libjxl @0.10.1: error: constexpr function never produces a constant expression

Reported by: ctreleaven (Craig Treleaven) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libjxl

Description

Build fails with the same error message on both my system and the 10.15 buildbot:

:info:build [ 29%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/gif.cc.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/build/lib && /usr/bin/clang++ -DFJXL_ENABLE_AVX512=0 -DHWY_DISABLED_TARGETS="(HWY_SSSE3|HWY_AVX3|HWY_AVX3_SPR|HWY_AVX3_ZEN4|HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_GIF=1 -DJPEGXL_ENABLE_JPEG=1 -DJXL_EXPORT="" -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/build/lib/include -I/opt/local/include/giflib5 -I/opt/local/include/OpenEXR -I/opt/local/include/Imath -isystem /opt/local/include -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fno-rtti -DNDEBUG -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -fPIC -fmacro-prefix-map=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1=. -funwind-tables -Xclang -mrelax-all -fno-omit-frame-pointer -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -Wdeprecated-increment-bool -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wgnu-redeclared-enum -Winfinite-recursion -Wliteral-conversion -Wno-c++98-compat -Wno-unused-command-line-argument -Wprivate-header -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety-analysis -Wundefined-func-template -Wunreachable-code -Wunused-comparison -fsized-deallocation -fno-exceptions -fmath-errno -fnew-alignment=8 -fno-cxx-exceptions -fno-slp-vectorize -fno-vectorize -disable-free -disable-llvm-verifier -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/gif.cc.o -MF CMakeFiles/jxl_extras_core-obj.dir/extras/dec/gif.cc.o.d -o CMakeFiles/jxl_extras_core-obj.dir/extras/dec/gif.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/extras/dec/gif.cc
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/extras/enc/pnm.cc:18:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/jxl/dec_external_image.h:16:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/jxl/dec_cache.h:26:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/jxl/coeff_order.h:33:42: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
:info:build static JXL_MAYBE_UNUSED constexpr size_t CoeffOrderOffset(size_t order,
:info:build                                          ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_libjxl/libjxl/work/libjxl-0.10.1/lib/jxl/coeff_order.h:35:10: note: non-constexpr function 'operator[]' cannot be used in a constant expression
:info:build   return kCoeffOrderOffset[3 * order + c] * kDCTBlockSize;
:info:build          ^
:info:build /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/array:195:21: note: declared here
:info:build     const_reference operator[](size_type __n) const _NOEXCEPT {return __elems_[__n];}
:info:build                     ^
:info:build 1 error generated.
:info:build make[2]: *** [lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/pnm.cc.o] Error 1

Attaching full build log.

Attachments (1)

10.15 2024Mar04 main.log (223.1 KB) - added by ctreleaven (Craig Treleaven) 9 months ago.

Download all attachments as: .zip

Change History (3)

Changed 9 months ago by ctreleaven (Craig Treleaven)

Attachment: 10.15 2024Mar04 main.log added

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

Owner: changed from @… to jmroot
Summary: libjxl build fails on 10.15libjxl @0.10.1: error: constexpr function never produces a constant expression

comment:2 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: assignedclosed

Duplicate of #69436.

Note: See TracTickets for help on using tickets.