-
Notifications
You must be signed in to change notification settings - Fork 1.2k
2 conf-files, one for the magick-core lib with the major version 6, and a second one for 7 #27798
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
base: master
Are you sure you want to change the base?
Conversation
Checks for the magick-core lib, with major version equal to "6" (there are api changes between 6 and 7)
Checks for the magick-core lib, with major version equal to "7" (there are api changes between 6 and 7)
I don't know how to make these conf-files work in case both a magick-core-6 and 7 are installed at the same time in the system. pkg-config will probably take the first .pc file found in its path. |
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.
Thank you for helping to provide these conf packages!
It looks we have a few issues to resolved, flagged by our CI:
build: [ | ||
[ "sh" "-c" | ||
"pkg-config --exists MagickCore && \ | ||
pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'" | ||
] |
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.
This appears to failing on all platforms with errors like
#=== ERROR while compiling conf-magick-core6.1 ================================#
# context 2.3.0 | linux/x86_64 | ocaml-base-compiler.5.3.0 | pinned
# path ~/.opam/5.3/.opam-switch/build/conf-magick-core6.1
# command ~/.opam/opam-init/hooks/sandbox.sh build sh -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'
# exit-code 1
# env-file ~/.opam/log/conf-magick-core6-7-671145.env
# output-file ~/.opam/log/conf-magick-core6-7-671145.out
Except for on windows, where it is failing with
#=== ERROR while compiling conf-magick-core6.1 ================================#
# context 2.3.0 | win32/x86_64 | ocaml.5.3.0 | file://D:/a/opam-repository/opam-repository
# path D:\opamroot\default\.opam-switch\build\conf-magick-core6.1
# command D:\opamroot\.cygwin\root\bin\sh.exe -c pkg-config --exists MagickCore && pkg-config --modversion MagickCore | awk -F. '{ if ($1 == 6) exit 0; else exit 1; }'
# exit-code 2
# env-file D:\opamroot\log\conf-magick-core6-3744-45fb94.env
# output-file D:\opamroot\log\conf-magick-core6-3744-45fb94.out
### output ###
# Can't open perl script "/cygdrive/c/Strawberry/perl/bin/pkg-config": No such file or directory
(Cf. https://github.com/ocaml/opam-repository/actions/runs/14553589502/job/40827624818?pr=27798)
I'm not sure if the right fix is to use a different check on windows via a conditional guard or if this can be changed to work on all platforms.
Maybe the error code just means that the deps that are checked by this conf-file are not installed, (which is the expected result). The Windows error code 2 maybe means that awk is not installed in Windows. Do you have a suggestion on a better way to check the major version of the lib ? Is there a current conf-file that I could use as an example ? |
Co-authored-by: Shon Feder <[email protected]>
Maybe we should do it with an ocaml script, rather than with awk ? |
Provides 2 different conf-files, because the magick-core library version 6 is still the one that seems to be provided in Debian 12.