Skip to content
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 an issue where PNG images cannot be loaded on Ubuntu #470

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nsfisis
Copy link
Contributor

@nsfisis nsfisis commented Jan 21, 2025

Problem

The latest CI failed because SATySFi failed to load PNG images on Ubuntu.

https://github.com/gfngfn/SATySFi/actions/runs/12861909507/job/35855999813

SATySFi manually built on Ubuntu failed to load PNG too.

Cause

It is because camlimages, which provides functionalities to load PNG images, was built without libpng.

As conf-libpng is optional for camlimages, libpng (technically, libpng-dev apt package on Ubuntu) is not installed by opam install . --deps-only in CI.

https://gitlab.com/camlspotter/camlimages/-/blob/83c53c196fc1e7766ed5c636c3f1d2418ce41293/dune-project#L27-38

 (depopts
  lablgtk
  graphics
  conf-libpng
  conf-libjpeg
  ; conf-libexif
  ; conf-libtiff
  ; conf-libxpm
  conf-libwebp
  conf-freetype
  conf-libgif
  conf-ghostscript))

Solution

Add conf-libpng to package.depends of dune-project.

P.S. I am completely new to OCaml and its ecosystem and am not sure about the correctness of the changes.

@nsfisis nsfisis marked this pull request as draft January 21, 2025 15:16
@nsfisis
Copy link
Contributor Author

nsfisis commented Jan 21, 2025

CI still failed:

Accoding to the build log, opam install . --deps-only did not install conf-libpng:

[EDIT] It was because I did not update satysfi.opam. I'll fix it soon.
[EDIT] fixed

@nsfisis nsfisis marked this pull request as ready for review January 21, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant