root icon indicating copy to clipboard operation
root copied to clipboard

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

Open guitargeek opened this issue 1 year ago • 2 comments

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:

  • https://root.cern.ch/doc/master/classTASImage.html
  • https://root.cern/doc/master/imgconv_8C.html

guitargeek avatar Aug 15 '24 14:08 guitargeek

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 avatar Aug 27 '24 15:08 guitargeek

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.

osschar avatar Aug 27 '24 16:08 osschar