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

Create conf-* packages for OpenGL related system libraries #25506

Merged
merged 15 commits into from
Mar 15, 2024

Conversation

Leonidas-from-XIV
Copy link
Contributor

Given the depexts for OpenGL can be kinda hairy with complicated dependency names, this PR attempts to move the dependencies of lablgl into its own conf-* packages (and updates raylib to use them where there is agreement).

The libraries in question:

  • libGL
  • libGLU (part of Mesa but still a separate library)
  • freeglut (implementation of GLUT)

Copy link
Contributor

@jmid jmid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice! 😃

A small plea:
I recently got tired of conf-* packages failing for me on Mint (an Ubuntu derivative distro) and hence started trawling the 240-something conf-* packages to fix them. I'm only at no.145 or so though 😅

Can I convince you to add os-family="ubuntu" cases and conditions, that just mirror the "debian" ones? 🙏
I just checked: freeglut3-dev, mesa-common-dev, and libglu1-mesa-dev are all available (originating from Ubuntu 🤷)

@Leonidas-from-XIV
Copy link
Contributor Author

Can I convince you to add os-family="ubuntu" cases and conditions, that just mirror the "debian" ones?

Sure! To be honest I sort of expected Ubuntu and Mint to be os-family Debian, given it takes (most) packages from Debian.

It's all a bit confusing wrt families. Is CentOS/Rocky/Alma the RHEL family? Is Fedora part of it? Is Oraclelinux part of it? I wish there was an overview of what is what.

@Leonidas-from-XIV
Copy link
Contributor Author

I've added exceptions for distributions that don't have .pc files to not use pkg-config, similar to conf-gles2. Debian 12 has them, Debian <12 is missing some but it is a bit tedious to add os-version checks for each of the failures accurately. Given it is just an installation check; I don't think it is that vital.

This seems to have worked on Debian and Ubuntu but somehow oraclelinux still runs the code? I don't quite know what is going on; os-distribution = "oraclelinux" seems to be the name that is used in opam-repository generally.

@jmid
Copy link
Contributor

jmid commented Mar 15, 2024

This seems to have worked on Debian and Ubuntu but somehow oraclelinux still runs the code? I don't quite know what is going on; os-distribution = "oraclelinux" seems to be the name that is used in opam-repository generally.

A quick skim at the conf-packages I recently fiddled with (and that actually make an attempt at oracle support), reveals that the following all use {os-distribution = "ol"} and achieve green CI lights on it:

  • conf-openssl
  • conf-ruby
  • conf-libtool
  • conf-jq

(just my 0.05$, not accounting for inflation)

@Leonidas-from-XIV
Copy link
Contributor Author

@jmid Thanks, that seemed to be the solution to the mystery! :) I picked up oraclelinux from other conf packages but seems like the right value is indeed ol.

To avoid this confusion in the future I opened #25511 to replace all occurences of oraclelinux with ol.

@Leonidas-from-XIV
Copy link
Contributor Author

Turns out there is a wiki page with documentation on the values: https://github.com/ocaml/opam-repository/wiki/Depexts-os-distribution---os-family-values

@mseri
Copy link
Member

mseri commented Mar 15, 2024

Thanks!

@mseri mseri merged commit ac9a846 into ocaml:master Mar 15, 2024
1 check was pending
@Leonidas-from-XIV Leonidas-from-XIV deleted the conf-lablgl branch March 18, 2024 09:28
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.

3 participants