(re)(re)Introducing the libglvnd OpenGL architecture (attempt #3)#26301
(re)(re)Introducing the libglvnd OpenGL architecture (attempt #3)#26301stephencrowell wants to merge 34 commits intospack:developfrom
Conversation
…dency, and removed comment about url
…d set osmesa to default off in mesa-demos pacakage
Generalize mesa demos
…n='@x.x') from opengl and libglvnd-fe. Added version 1.3.3 and 1.3.4 for libglvnd
|
Hi @stephencrowell! I noticed that the following package(s) don't yet have maintainers:
Are you interested in adopting any of these package(s)? If so, simply add the following to the package class: maintainers = ['stephencrowell']If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with $ spack blame libglvndThank you for your help! Please don't add maintainers without their consent. You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer. |
… into libglvnd-take-three
scheibelp
left a comment
There was a problem hiding this comment.
I started looking through this and have a few preliminary questions/comments. I'll be able to take a more-thorough look tomorrow.
lib/spack/docs/getting_started.rst
Outdated
| First, Spack would add directories under this root to environment variables | ||
| that would affect the process of building and installing other packages, such | ||
| as ``PATH`` and ``PKG_CONFIG_PATH``. These additions may potentially prevent | ||
| those packages from installing successfully, and this risk is especially great |
There was a problem hiding this comment.
(question) Spack should omit all system paths etc. from PATH - were you seeing an issue where some were in fact being added?
There was a problem hiding this comment.
I believe this is an artifact from previous attempts of introducing libglvnd to spack. After doing some preliminary testing, I am not seeing any issues with changing the prefix to / or some other directory that exists.
There was a problem hiding this comment.
Should this section paragraph be eliminated then, if the issues it describes no longer exists?
There was a problem hiding this comment.
Should be up to date now.
scheibelp
left a comment
There was a problem hiding this comment.
I've looked through this more and have a couple more requests. Also based on reading through these packages I think the following are all valid dependency trees for mesa-demos:
# Provided virtuals are given in parentheses before the dependency
mesa-demos+osmesa
- (gl, osmesa) mesa+osmesa+opengl~glvnd
mesa-demos+osmesa
- (osmesa) mesa+osmesa+opengl+glvnd
- libglvnd
- (gl) opengl~glvnd
mesa-demos+osmesa
- (osmesa) mesa+osmesa+opengl+glvnd
- libglvnd
- (gl) libglvnd-fe
- libglvnd
- (libglvnd-be-*) mesa+osmesa+opengl+glvnd
- libglvnd
mesa-demos~osmesa
- (gl) libglvnd-fe
- libglvnd
- (libglvnd-be-*) mesa+opengl+glvnd
- libglvnd
mesa-demos~osmesa
- (gl) libglvnd-fe
- libglvnd
- (libglvnd-be-*) opengl+glvnd
mesa-demos~osmesa
- (gl) mesa+opengl~glvnd
That's not comprehensive but I'm trying to get a sense of the overall organization of things. Please let me know if any of those look wrong.
After coming up with these examples I think it would be clearer if mesa's +opengl variant were renamed to +gl.
| variant('glvnd', default=is_linux, | ||
| description="Expose Graphics APIs through libglvnd") | ||
|
|
||
| provides('gl', when='~glvnd') |
There was a problem hiding this comment.
We might want to preserve the above constraints like:
provides('gl@:2.1', when='@2.1:')
Since that helps dependents determine whether they have a sufficiently new implementation of opengl (in particlular when requesting it via asking for a particular gl version).
There was a problem hiding this comment.
For 'gl', the version is runtime dependent, not compile time dependent. There is no meaning attached to a version at this level.
…xed errors in comments
…atement for opengl libs
|
Hi @stephencrowell I wanted to check in: was this ready for another review? |
|
@scheibelp Sorry, I was out of office for the holidays. Yes, the PR is ready for review again. Thanks in advance. |
@scheibelp Please do yes. We're trying to get all the GL rework landed this week. Regarding the GL version information, it's really a runtime API version so I'm not sure it makes sense to specify in the provides. For example, mesa can provide 4.6 but some drivers will only provide 3.2, etc. If we really need the version info tough then we can put it in, it will just be somewhat arbitrary. |
|
Regarding
in #26301 (review) - can you respond to that? |
If the drivers are automatically selected at runtime, then it could make sense to specify the highest version that is provided. If this highest version can change between systems/installations, then that is likely something that needs to be accounted for in Spack's model. |
We updated mesa-demos to no longer depend on |
|
Would it also be possible to model this by
? I think that might be easier to understand (if it works) |
I don't see why it wouldn't be possible; however, I am not sure how this makes it easier to understand. While this reduces the number of packages that can provide |
My intent is to simplify some of the trees like: into Overall, I think the variants which switch In this case, my understanding is that the complexity which would need to be transferred (EDIT) from |
It is complicated but the other ways I've tried to represent it don't actually work because of dependency inversions. The basic problem that brings the complexity is that different parts of |
One possibility is to create an analog of and then packages which would declare a depndency on |
|
BTW this is complex enough where if you want to discuss it in a meeting I could set one up: I'm hoping my suggestions are straightforward to implement but I may be overlooking something. |
That would push a fair ammount more complexity onto the consuming application's package, which I'd really like to avoid. The implementation here keeps the complexity restricted to the underlying gl stack in just a hand full of packages instead of requiring every consumer of opengl to be changed. We could simplify it some to use glvnd always when on linux instead of enabling it as a variant. This should be doable, even for It looks like we also had a large documentation section that got left out. Would that address your concerns: adding the documentation and removing glvnd as a variant to just always use the indirect implementation? Note that splitting libglvnd into multiple pseudo and virtual packages is a common approach and how all the primary distro package managers have been dealing with this for a few years now. |
Documentation might help, I'd be interested to read it and get a sense of whether it makes things easier to understand. That being said IMO the overall modeling is complex and I'd like to improve it.
That would simplify things, I think that would mean
I'm not sure about the ramifications of the second constraint: would some users potentially not be able to use this on older systems (in other words, what was |
|
Is this PR still relevant? |
|
This pull request has been automatically marked as stale because it has not had |
|
This pull request was closed because it had no activity for 30 days after being marked stale. |
libglvndas described herelibglvndglinstead ofmesaprovides(gl@:x.x, [email protected]:)toprovides(gl@:x.x, [email protected])for all versions except most recent insideopengl. The former version would not be solvable because of conflicting variants.