root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.7k stars 1.28k forks source link

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

Closed guitargeek closed 3 weeks ago

guitargeek commented 2 months ago

See also this discussion here: https://github.com/root-project/root/pull/15812#issuecomment-2252107168

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 commented 2 months ago

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.

osschar commented 2 months ago

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.