-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix macOS CI job #894
Fix macOS CI job #894
Conversation
As can be seen from the pkg-config output, libpng apparently no longer lives in /usr/local but rather in /opt/homebrew. We apply a hard-coded quick fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pkg-config
provides the correct values, we shouldn't need to override any of the PNG variables in the first place ...
@@ -58,14 +58,14 @@ jobs: | |||
pkg-config --libs libpng | |||
pkg-config --libs --cflags libpng16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should prob delete --libs
here since we already use that on the next line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is "debug" output, and should probably removed at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's helpful for troubleshooting this sort of thing :)
Oh, I was the last person to touch this file ... in December, 2023. |
Only if we used pkg-config for CMake configuration, but we don't (like for many other packages as well): Lines 127 to 130 in c2867fd
|
${{github.workspace}}/.github/scripts/removemono.sh | ||
|
||
- name: Configure CMake | ||
run: cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 | ||
-DENABLE_TIFF=1 -DENABLE_GD_FORMATS=1 -DENABLE_CPP=0 -DENABLE_HEIF=1 -D CMAKE_PREFIX_PATH=/usr/local | ||
-DBUILD_TEST=1 -DVERBOSE_MAKEFILE=1 -DPNG_PNG_INCLUDE_DIR=/usr/local/Cellar/libpng/${{ env.LIBPNG_VERSION }}/include -DPNG_PNG_LIBRARY_DIR=/usr/local/Cellar/libpng/${{ env.LIBPNG_VERSION }}/lib -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
-DBUILD_TEST=1 -DVERBOSE_MAKEFILE=1 -DPNG_PNG_INCLUDE_DIR=/opt/homebrew/Cellar/libpng/${{ env.LIBPNG_VERSION }}/include -DPNG_PNG_LIBRARY_DIR=/usr/local/Cellar/libpng/${{ env.LIBPNG_VERSION }}/lib -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still -DPNG_PNG_LIBRARY_DIR=/usr/local/Cellar/libpng/${{ env.LIBPNG_VERSION }}/lib
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, but that doesn't seem to matter: https://github.com/libgd/libgd/actions/runs/12518290911/job/34920495485#step:5:52
Should probably still be cleaned up, but I'm bad at macOS. Feel free to provide a PR! :)
As can be seen from the pkg-config output, libpng apparently no longer lives in /usr/local but rather in /opt/homebrew. We apply a hard-coded quick fix.