saschanaz / jxl-winthumb

A JPEG XL (*.jxl) thumbnail handler for Windows File Explorer.
ISC License
366 stars 17 forks source link

Requesting an update #25

Closed woot000 closed 1 year ago

woot000 commented 1 year ago

It's been nearly a year since the update, and the project currently fails to compile on Windows 11 using 1.7.0 stable-x86_64-pc-windows-gnu and msys2's CLANG64 package mingw-w64-clang-x86_64-rust.

My three points of interest for an update to jxl-winthumb are to

The errors are as follows:

  [ 73%] Built target jxl_enc-obj
  [ 73%] Built target jxl_dec-obj

  --- stderr
  CMake Deprecation Warning at third_party/brotli/CMakeLists.txt:5 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 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.

  -- Compiler is not EMSCRIPTEN
  CMake Deprecation Warning at third_party/sjpeg/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 2.8.12 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.

  CMake Warning at CMakeLists.txt:378 (message):
    sphinx-build not found, skipping rtd documentation

  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_FLAGS

  SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Dev\masm\msys64\mingw64\bin\a2x.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details
  make[2]: *** [CMakeFiles/manpages.dir/build.make:74: cjxl.1] Error 1
  make[2]: *** Waiting for unfinished jobs....
  SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Dev\masm\msys64\mingw64\bin\a2x.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details
  make[2]: *** [CMakeFiles/manpages.dir/build.make:78: djxl.1] Error 1
  make[1]: *** [CMakeFiles/Makefile2:292: CMakeFiles/manpages.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  C:/Dev/masm/msys64/opt/cargo/registry/src/index.crates.io-6f17d22bba15001f/libjxl-src-0.7.6/submodules/libjxl/lib/jxl/dec_external_image.cc: In function 'jxl::Status jxl::{anonymous}::ConvertChannelsToExternal(const jxl::ImageF**, size_t, size_t, bool, JxlEndianness, size_t, jxl::ThreadPool*, void*, size_t, const jxl::PixelCallback&, jxl::Orientation)':
  C:/Dev/masm/msys64/opt/cargo/registry/src/index.crates.io-6f17d22bba15001f/libjxl-src-0.7.6/submodules/libjxl/lib/jxl/dec_external_image.cc:290:21: warning: storing the address of local variable 'temp_channels' in '*channels.31_20 + _15' [-Wdangling-pointer=]
    290 |         channels[c] = &(temp_channels[c]);
        |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
  C:/Dev/masm/msys64/opt/cargo/registry/src/index.crates.io-6f17d22bba15001f/libjxl-src-0.7.6/submodules/libjxl/lib/jxl/dec_external_image.cc:284:10: note: 'temp_channels' declared here
    284 |   ImageF temp_channels[kConvertMaxChannels];
        |          ^~~~~~~~~~~~~
  C:/Dev/masm/msys64/opt/cargo/registry/src/index.crates.io-6f17d22bba15001f/libjxl-src-0.7.6/submodules/libjxl/lib/jxl/dec_external_image.cc:246:48: note: 'channels' declared here
    246 | Status ConvertChannelsToExternal(const ImageF* channels[], size_t num_channels,
        |                                  ~~~~~~~~~~~~~~^~~~~~~~~~
  make: *** [Makefile:146: all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit code: 2

  build script failed, must exit now', C:/Dev/masm/msys64/opt/cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.48\src\lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
saschanaz commented 1 year ago

This was stalled because of some libjxl regression, maybe time to revisit.

BTW, the build error doesn't seem like a Rust build failure, are you sure you can build raw libjxl on your environment?

woot000 commented 1 year ago

libjxl builds fine for me on Windows 11 using MINGW64 and CLANG64 with the same cmake settings found here, it just doesn't seem to work through Rust for some reason

saschanaz commented 1 year ago

It's not Rust but with some Python encoding thing per:

SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Dev\masm\msys64\mingw64\bin\a2x.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details
  make[2]: *** [CMakeFiles/manpages.dir/build.make:74: cjxl.1] Error 1
  make[2]: *** Waiting for unfinished jobs....
  SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Dev\masm\msys64\mingw64\bin\a2x.exe on line 1, but no encoding declared; see https://peps.python.org/pep-0263/ for details
  make[2]: *** [CMakeFiles/manpages.dir/build.make:78: djxl.1] Error 1
  make[1]: *** [CMakeFiles/Makefile2:292: CMakeFiles/manpages.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....

But yeah, whatever that is, JPEGXL_ENABLE_MANPAGES should probably be disabled.