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

ROOT doesn't build anymore with opengl=ON and asimage=OFF #16250

Closed
guitargeek opened this issue Aug 15, 2024 · 2 comments · Fixed by #16605
Closed

ROOT doesn't build anymore with opengl=ON and asimage=OFF #16250

guitargeek opened this issue Aug 15, 2024 · 2 comments · Fixed by #16605

Comments

@guitargeek
Copy link
Contributor

guitargeek commented Aug 15, 2024

See also this discussion here:
#15812 (comment)

The PR #15812 introduced a direct dependency of graf3d/gl on TASImage, which is only built if asimage=ON. It would be better if the PNG export would be done via the TImage plugin system, so there is no dependency at build time. Or if this can't be done, at least error out at configuration time if one attempts to build with this combination of flags.

Here is the culprit:
https://github.com/root-project/root/blob/master/graf3d/gl/src/TGLSdfFontMaker.cxx#L198

@osschar @linev

See also:

@guitargeek
Copy link
Contributor Author

Not sure if this should be assigned to @couet or @bellenot. This is a regression caused recently by #15812, so @alja and @osschar should better address this I think.

@guitargeek guitargeek assigned alja and unassigned couet and bellenot Aug 27, 2024
@osschar
Copy link
Contributor

osschar commented Aug 27, 2024

Hi! :) RGL cmake file has already listed the dependency on ASImage before this. There are functions in TGLViewer that use TImage to export screenshots and to load textures. I assume the problem now is that there is an explicit include of stuff from TASImage.

Should we just make this dependency explicit in the initial configure / cmake run?

Vincenzo also commented (in the above PR discussion or on MM) that builtin asimage is now always used, there is no external option. And asimage includes fallback implementations of all commonly use graphics file formats.

How does TImage work if there is no TASImage? I guess it all just silently fails. And there is no other implementation of the TImage interface.

I vote for cmake-time dependency -- as an error or to exclude RGL if asimage=off.

guitargeek added a commit to guitargeek/root that referenced this issue Oct 4, 2024
The opengl flag enables the graf3d features that depend on OpenGL, and
these features also depend on asimage. Therefore, the configuration
should fail if `asimage` is OFF and `opengl` is ON.

An alternative would have been to automatically enable `asimage` then,
but `asimage=ON` is already the default. So if it's actually off, it's
probably set to OFF by the user with some intention, and we better raise
awareness about this inconsistency with a configuration error.

Closes root-project#16250.
guitargeek added a commit to guitargeek/root that referenced this issue Oct 4, 2024
The opengl flag enables the graf3d features that depend on OpenGL, and
these features also depend on asimage. Therefore, the configuration
should fail if `asimage` is OFF and `opengl` is ON.

An alternative would have been to automatically enable `asimage` then,
but `asimage=ON` is already the default. So if it's actually off, it's
probably set to OFF by the user with some intention, and we better raise
awareness about this inconsistency with a configuration error.

Closes root-project#16250.
guitargeek added a commit to guitargeek/root that referenced this issue Oct 4, 2024
The opengl flag enables the graf3d features that depend on OpenGL, and
these features also depend on asimage. Therefore, the configuration
should fail if `asimage` is OFF and `opengl` is ON.

An alternative would have been to automatically enable `asimage` then,
but `asimage=ON` is already the default. So if it's actually off, it's
probably set to OFF by the user with some intention, and we better raise
awareness about this inconsistency with a configuration error.

Closes root-project#16250.
guitargeek added a commit to guitargeek/root that referenced this issue Oct 4, 2024
The opengl flag enables the graf3d features that depend on OpenGL, and
these features also depend on asimage. Therefore, the configuration
should fail if `asimage` is OFF and `opengl` is ON.

An alternative would have been to automatically enable `asimage` then,
but `asimage=ON` is already the default. So if it's actually off, it's
probably set to OFF by the user with some intention, and we better raise
awareness about this inconsistency with a configuration error.

Closes root-project#16250.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants