Closed7

Homebrewで 'jpeg-xl' パッケージをビルドできない

ピン留めされたアイテム
四ツ山伊吹四ツ山伊吹

お断わり

$ brew doctor
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences.

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 11.3.1.

Warning: You are using macOS 10.14.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
$ brew --version
Homebrew 3.6.20-232-g39e158f
Homebrew/homebrew-core (git revision 3cb013317ee; last commit 2023-02-05)
Homebrew/homebrew-cask (git revision 0a3d46cc08; last commit 2023-02-05)
$ brew config
HOMEBREW_VERSION: 3.6.20-232-g39e158f
ORIGIN: https://github.com/Homebrew/brew
HEAD: 39e158fb939dadcdf6ee0a67a0930b15f9b16b39
Last commit: 17 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3cb013317ee128696c35ecf552d9186863d2c69f
Core tap last commit: 2 hours ago
Core tap branch: master
Core tap JSON: 03 Feb 00:22
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BAT: set
HOMEBREW_BAT_CONFIG_PATH: /Users/████████/.config/bat/brew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: quad-core 64-bit ivybridge
Clang: 10.0.1 build 1001
Git: 2.39.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A
四ツ山伊吹四ツ山伊吹

2022-02-05時点での状況

$ brew info jpeg-xl
==> jpeg-xl: stable 0.8.1
New file format for still image compression
https://jpeg.org/jpegxl/index.html
/usr/local/Cellar/jpeg-xl/0.7.0_1 (41 files, 12.3MB)
  Built from source on 2022-09-28 at 15:31:12
/usr/local/Cellar/jpeg-xl/0.8.1 (64B)
  Built from source
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jpeg-xl.rb
License: BSD-3-Clause
==> Dependencies
Build: cmake ✔, doxygen ✔, pkg-config ✔, sphinx-doc ✔
Required: brotli ✔, giflib ✔, highway ✔, imath ✔, jpeg-turbo ✔, libpng ✔, little-cms2 ✔, openexr ✔, webp ✔
==> Analytics
install: 353,424 (30 days), 799,652 (90 days), 2,987,824 (365 days)
install-on-request: 32,615 (30 days), 58,990 (90 days), 120,648 (365 days)
build-error: 1,793 (30 days)

_人人人人人人人人人人人人人人人人_
> build-error: 1,793 (30 days) <
 ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄

四ツ山伊吹四ツ山伊吹

検証

あれやこれや

Homebrewでのコマンド

$ brew upgrade jpeg-xl --build-from-source --debug --keep-tmp
[...]
BuildError: Failed executing: cmake --build build

An interactive debugging session

brewコマンドでエラーを起こしたところをデバッグセッションのシェルから改めて実行してみる。
なお、順序が分かりやすいよう、一度に回すジョブの数を1に制限している。

$ brew upgrade jpeg-xl --build-from-source --debug --keep-tmp
bash-3.2$ cmake --build build -- --jobs 1 1>stdout.log 2>stderr.log
標準出力のログ
/usr/local/Cellar/cmake/3.25.2/bin/cmake -S/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 -B/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_progress_start /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/CMakeFiles /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build//CMakeFiles/progress.marks
/usr/local/bin/gmake  -f CMakeFiles/Makefile2 all
gmake[1]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_threads.dir/build.make lib/CMakeFiles/jxl_threads.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/CMakeFiles/jxl_threads.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_threads.dir/build.make lib/CMakeFiles/jxl_threads.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[2]: Nothing to be done for 'lib/CMakeFiles/jxl_threads.dir/build'.
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[  1%] Built target jxl_threads
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_dec-obj.dir/build.make lib/CMakeFiles/jxl_dec-obj.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/CMakeFiles/jxl_dec-obj.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_dec-obj.dir/build.make lib/CMakeFiles/jxl_dec-obj.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[2]: Nothing to be done for 'lib/CMakeFiles/jxl_dec-obj.dir/build'.
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[ 34%] Built target jxl_dec-obj
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_dec.dir/build.make lib/CMakeFiles/jxl_dec.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/CMakeFiles/jxl_dec.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_dec.dir/build.make lib/CMakeFiles/jxl_dec.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[2]: Nothing to be done for 'lib/CMakeFiles/jxl_dec.dir/build'.
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[ 34%] Built target jxl_dec
/usr/local/bin/gmake  -f CMakeFiles/decode_oneshot.dir/build.make CMakeFiles/decode_oneshot.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/CMakeFiles/decode_oneshot.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f CMakeFiles/decode_oneshot.dir/build.make CMakeFiles/decode_oneshot.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[2]: Nothing to be done for 'CMakeFiles/decode_oneshot.dir/build'.
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[ 35%] Built target decode_oneshot
/usr/local/bin/gmake  -f CMakeFiles/decode_progressive.dir/build.make CMakeFiles/decode_progressive.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/CMakeFiles/decode_progressive.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f CMakeFiles/decode_progressive.dir/build.make CMakeFiles/decode_progressive.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[2]: Nothing to be done for 'CMakeFiles/decode_progressive.dir/build'.
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[ 36%] Built target decode_progressive
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_enc-obj.dir/build.make lib/CMakeFiles/jxl_enc-obj.dir/depend
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build && /usr/local/Cellar/cmake/3.25.2/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/CMakeFiles/jxl_enc-obj.dir/DependInfo.cmake --color=
Dependencies file "lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o.d" is newer than depends file "/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/CMakeFiles/jxl_enc-obj.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target jxl_enc-obj
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
/usr/local/bin/gmake  -f lib/CMakeFiles/jxl_enc-obj.dir/build.make lib/CMakeFiles/jxl_enc-obj.dir/build
gmake[2]: Entering directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
[ 36%] Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=1 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/include -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/third_party/skcms -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/include -fno-rtti -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -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_BUNDLE_SKCMS=1 -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -O3 -MD -MT lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o -MF CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o.d -o CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o -c /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc
gmake[2]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
gmake[1]: Leaving directory '/private/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build'
標準エラー出力のログ
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:369:7: error: invalid cpu feature string for builtin
  if (__builtin_cpu_supports("avx512vbmi2")) {
      ^                      ~~~~~~~~~~~~~
In file included from /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:3768:
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:768:33: error: use of undeclared identifier '_cvtmask16_u32'
    return CtzNonZero(~uint64_t{_cvtmask16_u32(mask)});
                                ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:824:19: error: use of undeclared identifier '_kand_mask32'
    return Mask16{_kand_mask32(mask, oth.mask)};
                  ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:827:33: error: use of undeclared identifier '_cvtmask32_u32'
    return CtzNonZero(~uint64_t{_cvtmask32_u32(mask)});
                                ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:995:23: error: use of undeclared identifier '_cvtu32_mask32'
    __mmask32 rmask = _cvtu32_mask32(0b11111111110000000000000000000000);
                      ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:996:24: error: use of undeclared identifier '_cvtu32_mask32'
    __mmask32 gbmask = _cvtu32_mask32(0b11111111111000000000000000000000);
                       ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2205:7: error: use of undeclared identifier '_mm512_cvtsi512_si32'; did you mean '_mm512_castsi512_si128'?
      _mm512_cvtsi512_si32(_mm512_alignr_epi32(bits, bits, 15));
      ^~~~~~~~~~~~~~~~~~~~
      _mm512_castsi512_si128
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/avx512fintrin.h:500:1: note: '_mm512_castsi512_si128' declared here
_mm512_castsi512_si128 (__m512i __A)
^
In file included from /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:3768:
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2204:12: error: cannot initialize a variable of type 'uint64_t' (aka 'unsigned long long') with an rvalue of type '__m128i' (vector of 2 'long long' values)
  uint64_t trail_bits =
           ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2207:7: error: use of undeclared identifier '_mm512_cvtsi512_si32'; did you mean '_mm512_castsi512_si128'?
      _mm512_cvtsi512_si32(_mm512_alignr_epi32(nbits, nbits, 15));
      ^~~~~~~~~~~~~~~~~~~~
      _mm512_castsi512_si128
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/avx512fintrin.h:500:1: note: '_mm512_castsi512_si128' declared here
_mm512_castsi512_si128 (__m512i __A)
^
In file included from /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:3768:
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2206:12: error: cannot initialize a variable of type 'uint64_t' (aka 'unsigned long long') with an rvalue of type '__m128i' (vector of 2 'long long' values)
  uint64_t trail_nbits =
           ^
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2230:25: error: use of undeclared identifier '_mm512_cvtsi512_si32'; did you mean '_mm512_castsi512_si128'?
  uint64_t simd_nbits = _mm512_cvtsi512_si32(_mm512_alignr_epi64(end, end, 7));
                        ^~~~~~~~~~~~~~~~~~~~
                        _mm512_castsi512_si128
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include/avx512fintrin.h:500:1: note: '_mm512_castsi512_si128' declared here
_mm512_castsi512_si128 (__m512i __A)
^
In file included from /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:3768:
/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc:2230:12: error: cannot initialize a variable of type 'uint64_t' (aka 'unsigned long long') with an rvalue of type '__m128i' (vector of 2 'long long' values)
  uint64_t simd_nbits = _mm512_cvtsi512_si32(_mm512_alignr_epi64(end, end, 7));
           ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 errors generated.
gmake[2]: *** [lib/CMakeFiles/jxl_enc-obj.dir/build.make:345: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:523: lib/CMakeFiles/jxl_enc-obj.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

当該のビルド対象とそのコマンド

上記のログから抜粋して整形:

[ 36%] Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o
cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib &&
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ \
    -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" \
    -DJPEGXL_MAJOR_VERSION=0 \
    -DJPEGXL_MINOR_VERSION=8 \
    -DJPEGXL_PATCH_VERSION=1 \
    -DJXL_INTERNAL_LIBRARY_BUILD \
    -D__DATE__=\"redacted\" \
    -D__TIMESTAMP__=\"redacted\" \
    -D__TIME__=\"redacted\" \
    -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1 \
    -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/include \
    -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/third_party/skcms \
    -I/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib/include \
    -fno-rtti \
    -funwind-tables \
    -Xclang \
    -mrelax-all \
    -Xclang \
    -mconstructor-aliases \
    -fno-omit-frame-pointer \
    -O3 \
    -DNDEBUG \
    -O2 \
    -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk \
    -fPIC \
    -fvisibility=hidden \
    -fvisibility-inlines-hidden \
    -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_BUNDLE_SKCMS=1 \
    -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 \
    -DJPEGXL_ENABLE_BOXES=1 \
    -std=c++11 \
    -O3 \
    -MD \
    -MT lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o \
    -MF CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o.d \
    -o CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o \
    -c /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc

CMakeによって生成されたMakefileの当該部分

build/lib/CMakeFiles/jxl_enc-obj.dir/build.make (341-345)
lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o: lib/CMakeFiles/jxl_enc-obj.dir/flags.make
lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o: /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc
lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o: lib/CMakeFiles/jxl_enc-obj.dir/compiler_depend.ts
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building CXX object lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o"
	cd /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/build/lib && /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -O3 -MD -MT lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o -MF CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o.d -o CMakeFiles/jxl_enc-obj.dir/jxl/enc_fast_lossless.cc.o -c /tmp/jpeg-xl-20230205-55263-3qliuk/libjxl-0.8.1/lib/jxl/enc_fast_lossless.cc
四ツ山伊吹四ツ山伊吹

jpeg-xlを必要とする主なパッケージ

imagemagickhomebrew-ffmpeg/ffmpeg/ffmpegの2パッケージがjpeg-xlを必要としている。つまりはImageMagickとFFmpegの両ソフトウェアがjpeg-xlパッケージに依存している。

Graphviz Online

四ツ山伊吹四ツ山伊吹

直近の課題と臨時の対応

差し当たってImageMagickとFFmpegの両ソフトウェアを問題なく利用するため、この2つのformulaeを編集することで急場を凌ぐことにする。

$ brew edit imagemagick
$ brew edit homebrew-ffmpeg/ffmpeg/ffmpeg
imagemagick.rb.diff
diff --git a/Formula/imagemagick.rb b/Formula/imagemagick.rb
index bc839e9233b..67cd2e995cf 100644
--- a/Formula/imagemagick.rb
+++ b/Formula/imagemagick.rb
@@ -25,7 +25,7 @@ class Imagemagick < Formula
   depends_on "freetype"
   depends_on "ghostscript"
   depends_on "jpeg-turbo"
-  depends_on "libheif"
+  #depends_on "libheif"
   depends_on "liblqr"
   depends_on "libpng"
   depends_on "libraw"
@@ -69,7 +69,7 @@ class Imagemagick < Formula
       "--with-openjp2",
       "--with-openexr",
       "--with-webp=yes",
-      "--with-heic=yes",
+      "--with-heic=no",
       "--with-raw=yes",
       "--with-gslib",
       "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts",
ffmpeg.rb.diff
diff --git a/Formula/ffmpeg.rb b/Formula/ffmpeg.rb
index 568e07a..d69a58f 100644
--- a/Formula/ffmpeg.rb
+++ b/Formula/ffmpeg.rb
@@ -39,7 +39,7 @@ class Ffmpeg < Formula
 
   depends_on "pkg-config" => :build
 
-  depends_on "aom"
+  #depends_on "aom"
   depends_on "dav1d"
   depends_on "fontconfig"
   depends_on "freetype"
@@ -113,7 +113,7 @@ class Ffmpeg < Formula
       --host-cflags=#{ENV.cflags}
       --host-ldflags=#{ENV.ldflags}
       --enable-gpl
-      --enable-libaom
+      --disable-libaom
       --enable-libdav1d
       --enable-libmp3lame
       --enable-libopus

保存したならば、

$ HOMEBREW_NO_INSTALL_FROM_API=y brew update && brew upgrade
このスクラップは2023/02/23にクローズされました