qt +opengl: fix macOS w/ AppleClang (mesa libs)#16302
Conversation
| libs = find_libraries(['libGL', 'libOSMesa'], | ||
| join_path(self.prefix, dir), | ||
| shared=True, recursive=False) | ||
| if libs: |
There was a problem hiding this comment.
@adamjstewart @v-dobrev is it intentional to return None here instead of an empty list? This seams to be generally problematic when setting up the build environment for dependent packages, see the PR description error message.
There was a problem hiding this comment.
Returning None informs the libs handler that the search failed (and reporting it as an error is the right behavior). Simply returning an empty list is not treated as an error, see
Lines 862 to 891 in 4cd537f
Note that the default handler (used if the libs property is not explicitly defined by a package) works in a similar manner:
Lines 792 to 799 in 4cd537f
The raised exception is different but that is just unintentional inconsistency.
There was a problem hiding this comment.
Thanks for all the details 👍
Why do we set the property at all, isn't the default implementation that searches for all shared libs sufficient (for glvis)?
There was a problem hiding this comment.
The default search uses the name of the package only, so for mesa it will search for libmesa.{a,so,dylib} which is not the real name of the library, see the code just above the second link I posted above.
In glvis, we use spec['gl'].libs which is then delegated by spack to the specific provider for the virtual gl package -- the default for that being mesa.
|
@v-dobrev @hppritcha @chuckatkins @scottwittenburg @opadron |
I've primarily edited this package to ensure it works well as a (virtual) dependency of the That said, I don't mind to be added as a maintainer with the understanding that my knowledge of the package itself is very limited. |
d24469c to
69d3dc2
Compare
Building the `py-jupyter` stack on macOS with AppleClang breaks on the `py-qtconsole` -> `py-qtconsole` -> `qt +opengl` package build environment setup with: ``` ==> Error: AttributeError: Query of package 'mesa' for 'libs' failed ... ==> Error: Failed to install qt due to ChildError: AttributeError: Query of package 'mesa' for 'libs' failed ``` This tries to add more library targets build by `mesa` to avoid this.
69d3dc2 to
81954d0
Compare
|
I'll merge this for now since the GitHub action test confirms this fixes the build on macOS + AppleClang. |
Building the
py-jupyterstack on macOS with AppleClang breaks on thepy-qtconsole->py-qtconsole->qt +openglpackage build environment setup withThis tries to add more library targets build by
mesato avoid this.Refs.:
develop)