Add graphics package to existing switches#12674
Conversation
☀️ All lint checks passed 0c4c0de
☀️ Installability check (10785 → 10822)
|
|
The Camelus broken package is because this PR assumes #12669. #12451 fixed the checksum for the clang patch in 4.00.1, but for some reason skipped 4.01.0, so that's bundled in here. I've added stuff which seems to fix pkg-config detection of X11 on macOS! I'm at a loss as to how to make DataKitCI happy - the first time it installed |
I guess there is a |
|
I don't understand the problem.. :/ The file already has the right permissions.. Anyone has any idea? |
|
I tried a test commit changing the call to be |
|
Basically, there are various things which could be going on (error in opam’s logic to find the command, error in the script, etc.), but I gave up when it appeared that the process wasn’t stable. |
|
@samoht - any ideas? avsm I know is way too snowed under to be able to look at this atm (of course, you may be too!) |
|
I think I may have solved this - please don't merge, even if CI passes this time round |
|
Ahhh Somehow it's a silent error :/ |
|
I've pushed a fix to get the error sooner next time: avsm/mirage-ci@5d761ef |
|
Thanks, @kit-ty-kate! The log now reveals the problem as well: The error message from opam should be better (ocaml/opam#3649), but why is the file system not correct for DataKit CI? |
|
OK, not sure how much more poking around I can sensibly do: https://ci.ocamllabs.io/log/saved/docker-build-2b6c0b6fad0045aab224e73d3691e9d1/e4aa5092ef8815c8d2ddad5b249ea940689f19ce shows that the |
4ac1b79 to
298086e
Compare
If the OCaml graphics library is not installed, it is installed to ocamlc -where (for opam-built compilers) or as a findlib package (for system compilers).
|
This looks ok. Should I go ahead and merge it? |
|
Huzzah - finally green! Please do 🙂 |
|
Thanks a lot!! |
At present, the
graphicspackage allows the absence of the OCaml graphics library to be detected as a dependency failure (which is neater than a build system error). This PR enhances that by building and installing the graphics library if it's missing. Here's an example:For system switches, the library is installed as a findlib package only so, just as with nums in 4.06.0 onwards, users of system switches will need to be using something more sophisticated than
#load "graphics.cma". For opam-built compilers, they are installed to the OCaml libdir as OCaml would - the package installs a META file if ocamlfind has already been installed (ocamlfind will automatically generate META on any future installations).A
conf-libX11package is added which at the moment is based entirely on pkg-config. Part of removinggraphandwin32graphfrom OCaml may include transferring theconfigurelogic to this package, but for now I kept it simple.Reviewers may wish to note that the
install.shis identical in all packages and theopamfile differs only by version-specific patches. Originally I did this all inopamfiles, but it's really difficult to deal with both system and non-system compilers and the fact that graphics may be already installed in the commands, so a script seemed somewhat less unclear.These packages were generated by the scripts in dra27@14f9326.