wolfpld / wolfpld/moderncore

libjxl 0.12.0 breaks build

Open
#5 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
43
Forks
3
PR merge metrics
No merged PRs in 30d

Description

We've updated libjxl in pkgsrc to 0.12.0 and this broke vv:
https://reports.pkgci.org/Darwin/14.5/arm64/20260703T154034Z/vv-3.2nb12/build.log

I've tried updating to today's snapshot of moderncore, but:

FAILED: [code=1] CMakeFiles/mcoreimage.dir/src/image/JxlLoader.cpp.o
/tmp/graphics/vv/work/.cwrapper/bin/c++ -Dmcoreimage_EXPORTS -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/cmake-pkgsrc-build -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a
36b12ae7e9b -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src -I/usr/pkg/include/cairo -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libpng16 -I/usr/pkg/include/pixman-1
 -I/usr/pkg/include/OpenEXR -I/usr/pkg/include/Imath -I/usr/pkg/include/libraw -I/usr/pkg/include/librsvg-2.0 -I/usr/pkg/include/gdk-pixbuf-2.0 -I/usr/pkg/include/libxml2 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/f
ribidi -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/webp -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/stb -isystem /tmp/graphic
s/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/tracy/public -O2 -g -fstack-clash-protection -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib
-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/libxml2 -g -std=gnu++20 -fPIC -fdiagnostics-color=always -MD -MT CMakeFiles/mcoreimage.dir/src/image/JxlLoader.cpp.o -MF CMakeFiles
/mcoreimage.dir/src/image/JxlLoader.cpp.o.d -fmodules-ts -fmodule-mapper=CMakeFiles/mcoreimage.dir/src/image/JxlLoader.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++ -o CMakeFiles/mcoreimage.dir/src/image/JxlLoader.cpp.o
-c /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/image/JxlLoader.cpp
In file included from /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/image/JxlLoader.cpp:7:
/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/image/JxlLoader.hpp:15:33: error: conflicting declaration 'typedef struct JxlDecoderStruct JxlDecoder'
   15 | typedef struct JxlDecoderStruct JxlDecoder;
      |                                 ^~~~~~~~~~
In file included from /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/image/JxlLoader.cpp:3:
/tmp/graphics/vv/work/.buildlink/include/jxl/decode.h:84:27: note: previous declaration as 'typedef struct JxlDecoder JxlDecoder'
   84 | typedef struct JxlDecoder JxlDecoder;
      |                           ^~~~~~~~~~
[101/135] Building CXX object CMakeFiles/mcoreimage.dir/src/image/ExrLoader.cpp.o
In file included from /tmp/graphics/vv/work/.buildlink/include/OpenEXR/ImfFrameBuffer.h:16,
                 from /tmp/graphics/vv/work/.buildlink/include/OpenEXR/ImfRgbaFile.h:23,
                 from /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/image/ExrLoader.cpp:4:
/tmp/graphics/vv/work/.buildlink/include/OpenEXR/ImfForward.h:25:51: warning: type attributes ignored after type is already defined [-Wattributes]
   25 | struct IMF_EXPORT_TYPE                            Chromaticities;
      |                                                   ^~~~~~~~~~~~~~

I also see a second problem with gcc 14.3.0 on NetBSD 11.99.6, for the sake of simplicity I'll include it here:

[89/135] Building CXX object CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o
FAILED: [code=1] CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o
/tmp/graphics/vv/work/.cwrapper/bin/c++ -Dmcoreutil_EXPORTS -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/cmake-pkgsrc-build -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a3
6b12ae7e9b -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src -I/usr/pkg/include -I/usr/pkg/include/OpenEXR -I/usr/pkg/include/Imath -I/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3
f6826a36b12ae7e9b/stb -I/usr/pkg/include/libpng16 -isystem /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/tracy/public -O2 -g -fstack-clash-protection -I/usr/pkg/include -I/usr/include -I/usr/p
kg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/libxml2 -g -std=gnu++20 -fPIC -fdiagnostics-color=always -MD
 -MT CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o -MF CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o.d -fmodules-ts -fmodule-mapper=CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o.modmap -MD -fdeps-format=p1689r5 -x c++
 -o CMakeFiles/mcoreutil.dir/src/util/Bitmap.cpp.o -c /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/util/Bitmap.cpp
In file included from /usr/include/gcc-14/immintrin.h:37,
                 from /usr/include/gcc-14/x86intrin.h:32,
                 from /tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/util/Bitmap.cpp:14:
/usr/include/gcc-14/tmmintrin.h: In member function 'void Bitmap::BgrToRgb()':
/usr/include/gcc-14/tmmintrin.h:136:1: error: inlining failed in call to 'always_inline' '__m128i _mm_shuffle_epi8(__m128i, __m128i)': target specific option mismatch
  136 | _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
      | ^~~~~~~~~~~~~~~~
/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/util/Bitmap.cpp:416:29: note: called from here
  416 |         v = _mm_shuffle_epi8( v, _mm_set_epi64x( 0x0f0c0d0e0b08090a, 0x0704050603000102 ) );
      |             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gcc-14/tmmintrin.h:136:1: error: inlining failed in call to 'always_inline' '__m128i _mm_shuffle_epi8(__m128i, __m128i)': target specific option mismatch
  136 | _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
      | ^~~~~~~~~~~~~~~~
/tmp/graphics/vv/work/moderncore-48305c3954cce830720b8b3f6826a36b12ae7e9b/src/util/Bitmap.cpp:416:29: note: called from here
  416 |         v = _mm_shuffle_epi8( v, _mm_set_epi64x( 0x0f0c0d0e0b08090a, 0x0704050603000102 ) );
      |             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do you have advice for that?
Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported pkgsrc builds and inspect src/image/JxlLoader.hpp, src/image/JxlLoader.cpp, and src/util/Bitmap.cpp at the cited error locations. Compare the libjxl 0.12.0 and GCC 14.3.0 failures, then verify that moderncore builds on Darwin 14.5 arm64 and NetBSD 11.99.6 with those toolchains.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.