Trouble compiling on macos (Monterey 12.7.4) #3568
Labels
building/portability
Platform-specific issues, build issues
unrelated to 1.0
Things that need not be done before the 1.0 version milestone
Describe the bug
I had a hard time compiling libjxl. First, it failed because could not find “-lgmock”. Second, it failed because could not find the header files for highway.
To Reproduce
In addition to the OS mentioned, libjxl-0.10.2, my Clang is Apple clang version 14.0.0 (clang-1400.0.29.202); my gtest (gmock) is 1.14.0; my highway is 1.1.0; and my gcc is gcc (the real one) is 10.2.0 (do not think is relevant, but list it anyway).
Expected behavior
I expected the libraries and associated files to compile.
Solution
I was able to compile everything I wanted successfully, by doing the following:
./deps.sh
cmake -S . -B build -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_LCMS2=ON -DJPEGXL_FORCE_SYSTEM_HWY=ON -DJPEGXL_ENABLE_DEVTOOLS=ON -DJPEGXL_TEST_TOOLS=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_JPEGLI=OFF -DJPEGXL_ENABLE_SKCMS=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DCMAKE_INSTALL_RPATH=/usr/local -DCMAKE_BUILD_TYPE=Release
find ./ -name link.txt -exec sed -i '.bak' 's/-lgmock//usr/local/lib/libgmock.a/g' {} ;
ln -s third_party/highway/hwy hwy
cmake --build build
built everything without issues.
Environment
ZP
The text was updated successfully, but these errors were encountered: