Thank you so very much.
In the interim I had already opened an account on Upwork, waded through LLM spam and grifters, found someone willing to do it for $150, had money persistently rejected by Upwork, found its support intentionally disabled, then closed my account (takeaway: Upwork is a dumpster fire). That was 6 hours down the drain.
In comparison, this is a godsend, even if I might need to put in some work myself
I used to get around the install TARGETS given no BUNDLE DESTINATION
error by adding BUNDLE DESTINATION
after RUNTIME DESTINATION
but I had to do it for tools/CMakeLists.txt
as well.
I cleared everything and followed your instructions from scratch, verbatim.
My first attempt after git cloning and modifying the brotli/CMakeLists.txt
, I was getting the error:
CMake Error at tools/CMakeLists.txt:340 (install):
install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
target "cjxl".
Maybe your invocation was supposed to disable the building of tools, so I double-checked that mine's a verbatim copy of yours (it was) and considered whether your libjxl might be older. Since it seems tools was still being built for some reason, I appended the following to your command:
-DJPEGXL_ENABLE_DEVTOOLS=false \
-DJPEGXL_ENABLE_VIEWERS=false \
-DJPEGXL_ENABLE_PLUGINS=false \
-DJPEGXL_TEST_TOOLS=false \
-DJPEGXL_STATIC=true
Same error. So I applied your fix by removing the offending install call from tools/CMakeLists.txt
and reverted to your original command. The config succeeds but always has zsh: no such file or directory: -DCMAKE_INSTALL_PREFIX=/Users/username/Desktop/compiled
at the end (Note: I clear build.ios
between every attempt).
I then ran make
:
[ 61%] Linking CXX executable tests/codec_test.app/tests/codec_test
ld: open() failed, errno=2 for 'tests/codec_test.app/tests/codec_test'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/tests/codec_test.app/tests/codec_test] Error 1
make[1]: *** [lib/CMakeFiles/codec_test.dir/all] Error 2
make: *** [all] Error 2
Little did I know, I'll be yearning to see this error in an hour.
I saw "executable" and "test" and realized it was still compiling executables for tests, so I went back and added the extra flags above, then ran make
again.
[ 20%] Linking CXX shared library libjxl_dec.dylib
ld: unknown options: --exclude-libs=ALL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libjxl_dec.0.10.2.dylib] Error 1
make[1]: *** [lib/CMakeFiles/jxl_dec.dir/all] Error 2
make: *** [all] Error 2
Why is it building a dylib? Is there an issue with the flags? I tried variations of the invocation
your flags + -DJPEGXL_STATIC=true
:
Same error
I decided to give your vanilla command another try:
Same error?
Clearly some state is being saved somewhere, so I wiped the entire libjxl
folder and copied in the untouched original, then reapplied CMakeLists.txt changes:
Still the same error!?
This was where grand attempt 1 was reset since I was stuck with the dylib error (I'm writing this log as I retrace my steps with grand attempt 2)
I tried various changes, including retracing my precise steps above, but I couldn't return to the previous error. I suspected CMake has some sort of cache/state set somewhere, so I looked online, found nothing, then did what any good techie did and reset my mac. Still there.
Grand attempt 3 was basically the same except I never saw ld: open() failed, errno=2
.
env: macOS 14.5, CMake 3.29.6
The adventure continues...