Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions graf2d/asimage/README
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Some files have been modified compare to the official libAfterImage version:

configure.in: support clang++ by removing some warnings.

libpng/pngpriv.h: fp.h was moved into math.h. This fix was originated by G. Eullisse - ALICE (April 2025)

configure:
- has been modified to look at the ".dylib" file extension to find
the X11 libraries. This is needed on the Mac Leopard system.
Expand Down
6 changes: 1 addition & 5 deletions graf2d/asimage/src/libAfterImage/libpng/pngpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -520,11 +520,7 @@
* as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible.
*/
# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
# include <fp.h>
# endif
# else
# include <math.h>
# include <math.h>

@guitargeek guitargeek Apr 3, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to maintain a copy of libpng?

This is not the sustainable fix I think. Wouldn't be the right fix to make sure libpng is installed on the system, so it doesn't fall back to this builtin libpng?

https://github.com/root-project/root/blob/master/cmake/modules/SearchInstalledSoftware.cmake#L453

Maybe @ktf was building ROOT 6.34 on macOS? There, it forced the builtin libpng, but only until I fixed that recently:

I don't think we want to maintain a builtin libpng on the long term, especially if it starts to not compile with new compilers anymore.

In fact, if we really want to be transparent about builtins to our users and make it possible to disable them explicitly, we have to introduce new flags:

  • builtin_png
  • builtin_gif
  • builtin_tiff
  • builtin_jpeg

Then, looking for these dependencies would also benefit from the fail-on-missing mechanism.

The absence of these flag has already confused the Conda people, and they add their own patches to enforce disabling of these builtins:
https://github.com/conda-forge/root-feedstock/blob/main/recipe/0001-Enforce-fail-on-missing-with-afterimage-dependencies.patch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully agree that the builtins should not be enforced. I can confirm I am building 6.32 on macOS.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! That's what I suspected. Ok, let me backport #18074 then to 6.34 and 6.32, and then you should be able to build without problem as long as you have libpng installed on your system and find_package(PNG) succeeds.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to do the backport for me. We already have a vendored ROOT in ALICE and I can simply add one more patch.

# endif
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
Expand Down