google / jpegli

BSD 3-Clause "New" or "Revised" License
132 stars 13 forks source link

Cannot build jpegli on macOS Sonoma #55

Open mplewis opened 3 weeks ago

mplewis commented 3 weeks ago

Describe the bug I am unable to build this project from source on MacOS after following the instructions on https://github.com/google/jpegli/blob/main/BUILDING_OSX.md.

The build fails on a fatal error: 'jpeglib.h' file not found despite me having jpeg-turbo installed and configured in the CMAKE_PREFIX_PATH.

To Reproduce

❯ which cmake
/opt/homebrew/bin/cmake

❯ cmake --version
cmake version 3.30.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

❯ which clang
/opt/homebrew/opt/llvm/bin/clang

❯ clang --version
Homebrew clang version 19.1.3
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.3/bin
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin23.cfg

❯ brew install llvm coreutils cmake giflib jpeg-turbo libpng ninja zlib
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################## 100.0%
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake or specify the `--cask` flag. To silence this message, use the `--formula` flag.
Warning: llvm 19.1.3 is already installed and up-to-date.
To reinstall 19.1.3, run:
  brew reinstall llvm
Warning: coreutils 9.5 is already installed and up-to-date.
To reinstall 9.5, run:
  brew reinstall coreutils
Warning: cmake 3.30.5 is already installed and up-to-date.
To reinstall 3.30.5, run:
  brew reinstall cmake
Warning: giflib 5.2.2 is already installed and up-to-date.
To reinstall 5.2.2, run:
  brew reinstall giflib
Warning: jpeg-turbo 3.0.4 is already installed and up-to-date.
To reinstall 3.0.4, run:
  brew reinstall jpeg-turbo
Warning: libpng 1.6.44 is already installed and up-to-date.
To reinstall 1.6.44, run:
  brew reinstall libpng
Warning: ninja 1.12.1 is already installed and up-to-date.
To reinstall 1.12.1, run:
  brew reinstall ninja
Warning: zlib 1.3.1 is already installed and up-to-date.
To reinstall 1.3.1, run:
  brew reinstall zlib

❯ export CMAKE_PREFIX_PATH=`brew --prefix giflib`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix zlib`

❯ ./deps.sh
Current directory is a git repository, downloading dependencies via git:

  git submodule update --init --recursive

❯ mkdir build

❯ cd build

❯ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR is arm64
-- Performing Test CXX_FUZZERS_SUPPORTED
-- Performing Test CXX_FUZZERS_SUPPORTED - Failed
-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Success
-- Performing Test CXX_NO_RTTI_SUPPORTED
-- Performing Test CXX_NO_RTTI_SUPPORTED - Success
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
-- Compiled IDs C:AppleClang, C++:AppleClang
-- Disabled AVX512 (set JPEGXL_ENABLE_AVX512 to enable it)
-- Disabled AVX512_SPR (set JPEGXL_ENABLE_AVX512_SPR to enable it)
-- Disabled AVX512_ZEN4 (set JPEGXL_ENABLE_AVX512_ZEN4 to enable it)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
CMake Deprecation Warning at third_party/highway/CMakeLists.txt:25 (cmake_policy):
  The OLD behavior for policy CMP0111 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Performing Test HWY_EMSCRIPTEN
-- Performing Test HWY_EMSCRIPTEN - Failed
-- Performing Test HWY_RISCV
-- Performing Test HWY_RISCV - Failed
-- Looking for sys/auxv.h
-- Looking for sys/auxv.h - not found
-- Looking for asm/hwcap.h
-- Looking for asm/hwcap.h - not found
-- Found ZLIB: /opt/homebrew/opt/zlib/lib/libz.dylib (found version "1.3.1")
-- Found PNG: /opt/homebrew/opt/libpng/lib/libpng.dylib (found version "1.6.44")
CMake Deprecation Warning at third_party/sjpeg/CMakeLists.txt:15 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Failed
-- Performing Test HAS_COMPILE_FLAG
-- Performing Test HAS_COMPILE_FLAG - Success
-- Performing Test FLAG2
-- Performing Test FLAG2 - Failed
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Success
-- Found JPEG: /opt/homebrew/opt/jpeg-turbo/lib/libjpeg.dylib (found version "80")
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework
-- Found GLUT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/GLUT.framework
-- Looking for __GLIBCXX__
-- Looking for __GLIBCXX__ - not found
-- Looking for _LIBCPP_VERSION
-- Looking for _LIBCPP_VERSION - found
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Performing Test CXX_WPSABI_SUPPORTED
-- Performing Test CXX_WPSABI_SUPPORTED - Success
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS - Failed
-- Found GIF: /opt/homebrew/opt/giflib/lib/libgif.dylib (found suitable version "5.2.2", minimum required is "5.1")
-- Checking for module 'OpenEXR'
--   Found OpenEXR, version 3.3.1
-- Found Doxygen: /opt/homebrew/bin/doxygen (found version "1.12.0") found components: doxygen missing components: dot
CMake Warning at CMakeLists.txt:438 (message):
  asciidoc was not found, the man pages will not be installed.

-- Building with JPEGXL_VERSION=a7dcd776 (auto-updated)
-- Building tools: cjpegli;djpegli;benchmark_xl
-- Configuring done (19.0s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/mplewis/code/personal/jpegli/build

❯ cmake --build . -- -j$(nproc)
[  1%] Building CXX object lib/CMakeFiles/jxl_extras_jpegli-obj.dir/extras/dec/jpegli.cc.o
[  2%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/aligned_allocator.cc.o
[  3%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/alpha_blend.cc.o
[  4%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/alpha_blend.cc.o
[  4%] Building CXX object lib/CMakeFiles/jxl_threads.dir/threads/thread_parallel_runner.cc.o
[  4%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/bit_writer.cc.o
[  5%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/cache_aligned.cc.o
[  5%] Built target tool_version_git
[  5%] Building CXX object lib/CMakeFiles/jxl_extras_jpegli-obj.dir/extras/enc/jpegli.cc.o
[  6%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/nanobenchmark.cc.o
[  7%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/butteraugli.cc.o
[  8%] Building CXX object lib/CMakeFiles/jxl_threads.dir/threads/thread_parallel_runner_internal.cc.o
[  8%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/color_description.cc.o
[  9%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/color_description.cc.o
[ 10%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/colors_rgb.cc.o
[ 11%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/per_target.cc.o
[ 11%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/color_hints.cc.o
[ 12%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/color_hints.cc.o
[ 13%] Linking CXX shared library libjxl_threads.dylib
[ 13%] Built target jxl_threads
[ 14%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/convolve_separable5.cc.o
[ 15%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/dichotomy.cc.o
[ 17%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/decode.cc.o
[ 18%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/decode.cc.o
[ 18%] Built target jxl_extras_jpegli-obj
[ 18%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/print.cc.o
[ 18%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/convolve_slow.cc.o
[ 19%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/enc.cc.o
[ 20%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/encode.cc.o
[ 21%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/targets.cc.o
[ 22%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/encode.cc.o
[ 23%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/exif.cc.o
[ 24%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/image.cc.o
[ 24%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/fdct.cc.o
[ 24%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/exif.cc.o
[ 25%] Building CXX object third_party/highway/CMakeFiles/hwy.dir/hwy/timer.cc.o
[ 25%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/mmap.cc.o
[ 26%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/image_color_transform.cc.o
[ 27%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/headers.cc.o
[ 28%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/mmap.cc.o
[ 29%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/metrics.cc.o
[ 30%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/time.cc.o
[ 31%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/time.cc.o
[ 31%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/__/third_party/apngdis/dec.cc.o
[ 32%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/__/third_party/apngdis/enc.cc.o
[ 32%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/packed_image_convert.cc.o
[ 34%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/jpeg_tools.cc.o
[ 35%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/simd_util.cc.o
[ 36%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/__/third_party/apngdis/dec.cc.o
[ 37%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/score_7.cc.o
[ 38%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/exr.cc.o
[ 39%] Linking CXX static library libhwy.a
[ 39%] Building CXX object third_party/sjpeg/CMakeFiles/sjpeg.dir/src/yuv_convert.cc.o
[ 39%] Built target hwy
[ 40%] Building CXX object lib/CMakeFiles/jxl_extras_internal-obj.dir/extras/xyb_transform.cc.o
[ 41%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/exr.cc.o
[ 42%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/__/third_party/apngdis/enc.cc.o
[ 43%] Building CXX object third_party/highway/CMakeFiles/hwy_test.dir/hwy/tests/test_util.cc.o
[ 43%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/jpg.cc.o
[ 44%] Linking CXX static library libsjpeg.a
[ 44%] Built target sjpeg
[ 44%] Linking CXX static library libhwy_test.a
[ 44%] Building CXX object third_party/highway/CMakeFiles/hwy_list_targets.dir/hwy/tests/list_targets.cc.o
[ 45%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/jpg.cc.o
[ 45%] Built target hwy_test
[ 45%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/exr.cc.o
[ 45%] Building CXX object lib/CMakeFiles/jxl_cms.dir/cms/jxl_cms.cc.o
[ 46%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/pgx.cc.o
[ 47%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/exr.cc.o
[ 48%] Building CXX object lib/CMakeFiles/jxl_cms.dir/__/third_party/skcms/skcms.cc.o
[ 48%] Built target jxl_extras_internal-obj
[ 50%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/pgx.cc.o
[ 51%] Building CXX object tools/CMakeFiles/jxl_gauss_blur.dir/gauss_blur.cc.o
[ 52%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/jpg.cc.o
[ 53%] Building CXX object tools/CMakeFiles/jxl_tool.dir/cmdline.cc.o
[ 54%] Linking CXX executable hwy_list_targets
[ 55%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/jpg.cc.o
Config: emu128:0 scalar:0 static:0 all_attain:0 is_test:0
Compiled HWY_TARGETS:   NEON
HWY_ATTAINABLE_TARGETS: NEON NEON_WITHOUT_AES EMU128
HWY_BASELINE_TARGETS:   NEON NEON_WITHOUT_AES EMU128
HWY_STATIC_TARGET:      NEON
HWY_BROKEN_TARGETS:
HWY_DISABLED_TARGETS:   Unknown Unknown Unknown Unknown SVE2_128 SVE_256 SVE2 SVE Unknown
Current CPU supports:   NEON NEON_WITHOUT_AES EMU128 SCALAR
[ 55%] Built target hwy_list_targets
[ 56%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/adaptive_quantization.cc.o
[ 56%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/pnm.cc.o
[ 56%] Building CXX object tools/CMakeFiles/jxl_tool.dir/speed_stats.cc.o
[ 56%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/pgx.cc.o
[ 57%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/pgx.cc.o
[ 58%] Building CXX object tools/CMakeFiles/jxl_tool.dir/tool_version.cc.o
[ 58%] Linking CXX static library libjxl_gauss_blur.a
[ 58%] Built target jxl_gauss_blur
[ 59%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/pnm.cc.o
[ 60%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/bit_writer.cc.o
[ 61%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/pnm.cc.o
[ 62%] Linking CXX static library libjxl_tool.a
[ 63%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/enc/npy.cc.o
[ 63%] Built target jxl_tool
[ 64%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/bitstream.cc.o
[ 64%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/pnm.cc.o
[ 65%] Linking CXX shared library libjxl_cms.dylib
[ 65%] Building CXX object lib/CMakeFiles/jxl_extras_core_nocodec-obj.dir/extras/dec/gif.cc.o
[ 65%] Built target jxl_cms
[ 67%] Building CXX object lib/CMakeFiles/jxl_testlib-internal.dir/extras/test_image.cc.o
[ 67%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/color_quantize.cc.o
[ 68%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/color_transform.cc.o
[ 69%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/enc/npy.cc.o
[ 70%] Building CXX object lib/CMakeFiles/jxl_testlib-internal.dir/extras/test_utils.cc.o
[ 70%] Built target jxl_extras_core_nocodec-obj
[ 71%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/common.cc.o
[ 72%] Building CXX object lib/CMakeFiles/jxl_extras_core-obj.dir/extras/dec/gif.cc.o
[ 73%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/decode.cc.o
[ 73%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/decode_marker.cc.o
[ 74%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/decode_scan.cc.o
[ 75%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/destination_manager.cc.o
[ 76%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/downsample.cc.o
[ 76%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/encode.cc.o
[ 77%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/encode_finish.cc.o
[ 77%] Built target jxl_extras_core-obj
[ 78%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/encode_streaming.cc.o
[ 78%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/entropy_coding.cc.o
[ 79%] Linking CXX static library libjxl_testlib-internal.a
[ 80%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/error.cc.o
[ 80%] Linking CXX static library libjxl_extras_codec.a
[ 80%] Built target jxl_testlib-internal
[ 81%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/huffman.cc.o
[ 81%] Built target jxl_extras_codec
[ 82%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/idct.cc.o
[ 82%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/input.cc.o
[ 84%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/memory_manager.cc.o
[ 85%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/quant.cc.o
[ 86%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/render.cc.o
[ 86%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/simd.cc.o
[ 87%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/source_manager.cc.o
[ 88%] Building CXX object lib/CMakeFiles/jpegli-static.dir/jpegli/upsample.cc.o
[ 88%] Linking CXX static library libjpegli-static.a
[ 88%] Built target jpegli-static
[ 89%] Linking CXX static library libjxl_extras-internal.a
[ 89%] Built target jxl_extras-internal
[ 89%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_xl.cc.o
[ 90%] Building CXX object tools/CMakeFiles/cjpegli.dir/cjpegli.cc.o
[ 91%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_codec.cc.o
[ 91%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_file_io.cc.o
[ 92%] Building CXX object tools/CMakeFiles/djpegli.dir/djpegli.cc.o
[ 93%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_stats.cc.o
[ 94%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_args.cc.o
[ 95%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_utils.cc.o
In file included from /Users/mplewis/code/personal/jpegli/tools/cjpegli.cc:18:
In file included from /Users/mplewis/code/personal/jpegli/lib/jpegli/encode.h:24:
In file included from /Users/mplewis/code/personal/jpegli/lib/jpegli/common.h:24:
/Users/mplewis/code/personal/jpegli/lib/base/include_jpeglib.h:16:10: fatal error: 'jpeglib.h' file not found
#include <jpeglib.h>  // IWYU pragma: keep
         ^~~~~~~~~~~
1 error generated.
make[2]: *** [tools/CMakeFiles/cjpegli.dir/cjpegli.cc.o] Error 1
make[1]: *** [tools/CMakeFiles/cjpegli.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 96%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_codec_jpeg.cc.o
[ 96%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/ssimulacra2.cc.o
[ 97%] Building CXX object tools/CMakeFiles/benchmark_xl.dir/__/third_party/dirent.cc.o
[ 98%] Linking CXX executable djpegli
[ 98%] Built target djpegli
[100%] Linking CXX executable benchmark_xl
[100%] Built target benchmark_xl
make: *** [all] Error 2

Expected behavior The project builds successfully.

Environment

jonsneyers commented 4 days ago

I'm running into the same issue.

Can this repo be trimmed down to remove benchmark_xl and to reduce the dependencies on things like libjpeg-turbo? It would make more sense imo to have benchmark_xl in a separate repo with a dependency on jpegli (and libjxl, and whatever other encoders we want to benchmark).