Help with macOS compiler

Hi, I am using Mac mini M2, macOS Ventura 13.6.3, Xcode 14.3.1 with command line 14.3.1. When trying to compile the dependencies with the script “osxbuild.sh builddeps”. It fails in the part of KWindowSystem. I don’t have installed home-brew or macPorts thinking that was causing the error.

[ 40%] Built target kimg_ani
[ 41%] Building CXX object src/imageformats/CMakeFiles/kimg_pic.dir/pic.cpp.o
[ 42%] Building CXX object src/imageformats/CMakeFiles/kimg_psd.dir/kimg_psd_autogen/mocs_compilation.cpp.o
3 errors generated.
make[6]: *** [src/imageformats/CMakeFiles/kimg_jxl.dir/jxl.cpp.o] Error 1
make[5]: *** [src/imageformats/CMakeFiles/kimg_jxl.dir/all] Error 2
make[5]: *** Waiting for unfinished jobs....
[ 44%] Building CXX object src/imageformats/CMakeFiles/kimg_psd.dir/psd.cpp.o
1 warning generated.
[ 45%] Linking CXX shared module ../../bin/imageformats/kimg_hdr.so
2 warnings generated.
[ 46%] Linking CXX shared module ../../bin/imageformats/kimg_pcx.so
[ 48%] Built target kimg_hdr
[ 49%] Linking CXX shared module ../../bin/imageformats/kimg_exr.so
[ 50%] Built target kimg_pcx
[ 52%] Linking CXX shared module ../../bin/imageformats/kimg_eps.so
[ 53%] Built target kimg_exr
[ 54%] Built target kimg_eps
[ 56%] Linking CXX shared module ../../bin/imageformats/kimg_pic.so
[ 57%] Built target kimg_pic
[ 58%] Linking CXX shared module ../../bin/imageformats/kimg_psd.so
[ 60%] Built target kimg_psd
make[4]: *** [all] Error 2
make[3]: *** [ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats-stamp/ext_kimageformats-build] Error 2
make[2]: *** [ext_frameworks/CMakeFiles/ext_kimageformats.dir/all] Error 2
make[1]: *** [ext_frameworks/CMakeFiles/ext_kwindowsystem.dir/rule] Error 2
make: *** [ext_kwindowsystem] Error 2
Error: Printing last lines of log output
[ 54%] Built target kimg_eps
[ 56%] Linking CXX shared module ../../bin/imageformats/kimg_pic.so
[ 57%] Built target kimg_pic
[ 58%] Linking CXX shared module ../../bin/imageformats/kimg_psd.so
[ 60%] Built target kimg_psd
make[4]: *** [all] Error 2
make[3]: *** [ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats-stamp/ext_kimageformats-build] Error 2
make[2]: *** [ext_frameworks/CMakeFiles/ext_kimageformats.dir/all] Error 2
make[1]: *** [ext_frameworks/CMakeFiles/ext_kwindowsystem.dir/rule] Error 2
make: *** [ext_kwindowsystem] Error 2
Error: Failed build ext_kwindowsystem
 build fail, attempting known fixes...

The text of the three errors isn’t in that piece of the log, but should be above that somewhere. Try searching for FAILED: or error:.

1 Like

The errors that I found were based on jxl.cpp

[ 65%] Building CXX object src/imageformats/CMakeFiles/kimg_raw.dir/kimg_raw_autogen/mocs_compilation.cpp.o
[ 66%] Building CXX object src/imageformats/CMakeFiles/kimg_kra.dir/kimg_kra_autogen/mocs_compilation.cpp.o
/Users/giorgio6846/dev/depbuild/ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats/src/imageformats/jxl.cpp:272:14: error: no matching function for call to 'JxlDecoderGetColorAsEncodedProfile'
    status = JxlDecoderGetColorAsEncodedProfile(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &color_encoding);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/giorgio6846/dev/i/include/jxl/decode.h:749:29: note: candidate function not viable: requires 3 arguments, but 4 were provided
JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsEncodedProfile(
                            ^
/Users/giorgio6846/dev/depbuild/ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats/src/imageformats/jxl.cpp:279:13: error: no matching function for call to 'JxlDecoderGetICCProfileSize'
        if (JxlDecoderGetICCProfileSize(m_decoder, &m_input_pixel_format, JXL_COLOR_PROFILE_TARGET_DATA, &icc_size) == JXL_DEC_SUCCESS) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/giorgio6846/dev/i/include/jxl/decode.h:775:29: note: candidate function not viable: requires 3 arguments, but 4 were provided
JXL_EXPORT JxlDecoderStatus JxlDecoderGetICCProfileSize(
                            ^
/Users/giorgio6846/dev/depbuild/ext_frameworks/ext_kimageformats-prefix/src/ext_kimageformats/src/imageformats/jxl.cpp:282:21: error: no matching function for call to 'JxlDecoderGetColorAsICCProfile'
                if (JxlDecoderGetColorAsICCProfile(m_decoder,
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/giorgio6846/dev/i/include/jxl/decode.h:793:29: note: candidate function not viable: requires 4 arguments, but 5 were provided
JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsICCProfile(
                            ^

Seems it’s caused by the recent update of libjxl to 0.9, as KImageFormats 5.101 doesn’t support it. Hopefully there’ll be a fix soon, in the meantime you could try reverting those commits (e10a9e0f, 1da5a7a6, 546765df) and rebuilding the deps.

1 Like

Now it compiles. Thanks!