# Problem in root installation due to AfterImage

**URL:** <https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270>\
**Category:** ROOT\
**Tags:** root\
**Created:** [April 2, 2025, 3:24am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270 "2025-04-02T03:24:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![arkasantra](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/arkasantra/32/37646_2.png) [@arkasantra](https://root-forum.cern.ch/u/arkasantra)\
**Post date:** [April 2, 2025, 3:24am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/1 "2025-04-02T03:24:55Z")

</div>

Hello,  
I am trying to install root v6.32.10 on my Mac from the source. Here are the cmake flags:

```auto
cmake -DCMAKE_INSTALL_PREFIX=/Users/arkasantra/Root6_Install -DPython3_EXECUTABLE=python3 -DCMAKE_CXX_STANDARD=20 -Dbuiltin_nlohmannjson=ON -Dhttp=ON -Droot7=ON -Dbuiltin_xrootd=ON -Dxrootd=ON -Dbuiltin_glew=ON /Users/arkasantra/root-6.32.10

```

The configuration output is the following:

> **[Root6.32.10\_Configuration](https://docs.google.com/document/d/1As4m43fARCiqj46RGFLPv9QgKEPpjnFQJL4y7VcSVjM/edit?usp=sharing)**
>
> CMake Deprecation Warning at CMakeLists.txt:36 (cmake\_policy): The OLD behavior for policy CMP0116 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated...

When I am building the directory, I am getting this error:

```auto
CMake Error at /Users/arkasantra/Root6_Build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-Release.cmake:49 (message):
  Command failed: 2

   '/Applications/Xcode.app/Contents/Developer/usr/bin/make'

  See also

    /Users/arkasantra/Root6_Build/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-*.log

make[2]: *** [AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build] Error 1
make[1]: *** [CMakeFiles/AFTERIMAGE.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

```

The contents of the AfterImage log file is :

```auto
make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
In file included from libpng/png.c:14:
libpng/pngpriv.h:524:16: fatal error: 'fp.h' file not found
  524 | # include <fp.h>
      | ^ ~~~~~
1 error generated.
make[3]: *** [libpng/png.o] Error 1

```

I checked the problem here: [Root6 compilation fails with AfterImage installation problem](https://root-forum.cern.ch/t/root6-compilation-fails-with-afterimage-installation-problem/53128)

but seems this did not help me.

May I know what a potential solution should be?

Thank you,  
Arka

_Please fill also the fields below. Note that **`root -b -q`** will tell you this info, and starting from 6.28/06 upwards, you can call **`.forum bug`** from the ROOT prompt to pre-populate a topic._

\_ROOT Version:6.32.10  
\_Platform: MacOSX\_15.4 (Intel x86\_64)  
\_Compiler:AppleClang 17.0.0.17000013 (Xcode 16.3)

* * *

---

<div class="post-metadata">

**Author:** ![devajith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/devajith/32/37165_2.png) [@devajith](https://root-forum.cern.ch/u/devajith)\
**Post date:** [April 2, 2025, 7:22am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/2 "2025-04-02T07:22:27Z")

</div>

Hi @arkasantra,

Thanks for your question.

I am looking at this issue and will get back to you shortly.

Cheers,  
Dev

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 2, 2025, 8:13am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/3 "2025-04-02T08:13:17Z")

</div>

May be `-Dbuiltin_afterimage=ON` could help ?

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [April 2, 2025, 8:27am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/4 "2025-04-02T08:27:52Z")

</div>

I guess, here problem with `builtin_libpng`. Not sure that `#include <fp.h>` means.

One could try to install `libpng-devel` package and use for ROOT compilation?  
If I remember correctly, ROOT uses external libpng when all necessary include files found by cmake.

---

<div class="post-metadata">

**Author:** ![arkasantra](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/arkasantra/32/37646_2.png) [@arkasantra](https://root-forum.cern.ch/u/arkasantra)\
**Post date:** [April 2, 2025, 5:49pm UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/5 "2025-04-02T17:49:18Z")

</div>

> [@couet](#):
>
> -Dbuiltin\_afterimage=ON

I tried with this installation flag, but I am getting the same error while installing.

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [April 2, 2025, 8:42pm UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/6 "2025-04-02T20:42:32Z")

</div>

> [@arkasantra](#):
>
> but I am getting the same error while installing.

Try to install developer package for `libpng`

---

<div class="post-metadata">

**Author:** ![Youngju](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/youngju/32/24024_2.png) [@Youngju](https://root-forum.cern.ch/u/Youngju)\
**Post date:** [April 3, 2025, 1:21am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/7 "2025-04-03T01:21:55Z")

</div>

Hello,

I got excatly same message when tried to build AFTERIMAGE during the installation of ROOT (version 6.34.06, same as 6.32.10) after update to MacOSX\_15.4 (M2).  
Compiler was also AppleClang 17.0.0 (Xcode updated).

CMake Error at /Users/cyj6602/Packages/root\_build\_v6\_34/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-Release.cmake:49 (message):  
Command failed: 2

‘/Library/Developer/CommandLineTools/usr/bin/make’

See also

```
/Users/cyj6602/Packages/root_build_v6_34/AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build-*.log

```

make[2]: \*\*\* [AFTERIMAGE-prefix/src/AFTERIMAGE-stamp/AFTERIMAGE-build] Error 1  
make[1]: \*\*\* [CMakeFiles/AFTERIMAGE.dir/all] Error 2  
make: \*\*\* [all] Error 2

The content of the log file was same. “fp.h” not found.

It looks like the libpng should not include “fp.h” header file after version 1.6.45.  
The installed one in my PC is version 1.6.47 and the cmake also found it during the generation of makefile.

“Found PNG: /opt/homebrew/lib/libpng.dylib (1.6.47)”

But when I checked the /Users/cyj6602/Packages/root\_build\_v6\_34/AFTERIMAGE-prefix/src/AFTERIMAGE/libpng/png.h file which was made during the build, it looks like the builder try to use libpng version 1.6.40, not the 1.6.47.

Can I know what should I do? Does it related to the cmake problem?

Thank you,  
Youngju

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 3, 2025, 6:20am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/8 "2025-04-03T06:20:49Z")

</div>

> [@Youngju](#):
>
> builder try to use libpng version 1.6.40, not the 1.6.47.

On the web I found that this issue is fixed in libpng version1.6.45

> <https://github.com/wxWidgets/wxWidgets/issues/24590>
>
> \### Description
> 
> wxWidgets compiles fine using Apple Clang shipped with Xcode,… but when trying to use the newest \`clang\` from \`homebrew\`, the compilation fails.
> 
> This does not seem to be \`libpng\` issue, as this library (cloned from GitHub as a standalone project) compiles fine with the same \`cmake\` settings. It looks like it's a problem with wxWidgets' CMake scripts.
> 
> \`\`\`
> luke@Lukes-MacBook-Pro wxBuild % cmake -G Ninja -DCMAKE\_CXX\_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE\_C\_COMPILER=/opt/homebrew/opt/llvm/bin/clang ~/Developer/wxWidgets
> \-- Setting build type to 'Debug' as none was specified.
> \-- The C compiler identification is Clang 18.1.6
> \-- The CXX compiler identification is Clang 18.1.6
> \-- The OBJCXX compiler identification is Clang 18.1.6
> \-- Detecting C compiler ABI info
> \-- Detecting C compiler ABI info - done
> \-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - skipped
> \-- Detecting C compile features
> \-- Detecting C compile features - done
> \-- Detecting CXX compiler ABI info
> \-- Detecting CXX compiler ABI info - done
> \-- Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
> \-- Detecting CXX compile features
> \-- Detecting CXX compile features - done
> \-- Detecting OBJCXX compiler ABI info
> \-- Detecting OBJCXX compiler ABI info - done
> \-- Check for working OBJCXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - skipped
> \-- Looking for sys/types.h
> \-- Looking for sys/types.h - found
> \-- Looking for stdint.h
> \-- Looking for stdint.h - found
> \-- Looking for stddef.h
> \-- Looking for stddef.h - found
> \-- Check size of wchar\_t
> \-- Check size of wchar\_t - done
> \-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libz.tbd (found version "1.2.12")
> \-- Found EXPAT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libexpat.tbd (found version "2.5.0")
> \-- Performing Test wxHAVE\_CXX11
> \-- Performing Test wxHAVE\_CXX11 - Success
> \-- Performing Test wxHAVE\_CXX17
> \-- Performing Test wxHAVE\_CXX17 - Success
> \-- Performing Test CMAKE\_HAVE\_LIBC\_PTHREAD
> \-- Performing Test CMAKE\_HAVE\_LIBC\_PTHREAD - Success
> \-- Found Threads: TRUE
> \-- Found Iconv: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libiconv.tbd
> \-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/OpenGL.framework
> \-- Could NOT find MSPACK (missing: MSPACK\_LIBRARY MSPACK\_INCLUDE\_DIR)
> \-- libmspack not found
> \-- Looking for 4 include files stdlib.h, ..., float.h
> \-- Looking for 4 include files stdlib.h, ..., float.h - found
> \-- Performing Test HAVE\_VISIBILITY
> \-- Performing Test HAVE\_VISIBILITY - Success
> \-- Looking for va\_copy
> \-- Looking for va\_copy - found
> \-- Performing Test HAVE\_GCC\_ATOMIC\_BUILTINS
> \-- Performing Test HAVE\_GCC\_ATOMIC\_BUILTINS - Success
> \-- Looking for sigaction
> \-- Looking for sigaction - found
> \-- Performing Test wxHAVE\_BACKTRACE
> \-- Performing Test wxHAVE\_BACKTRACE - Success
> \-- Performing Test HAVE\_CXA\_DEMANGLE
> \-- Performing Test HAVE\_CXA\_DEMANGLE - Success
> \-- Looking for mkstemp
> \-- Looking for mkstemp - found
> \-- Looking for mktemp
> \-- Looking for mktemp - found
> \-- Performing Test HAVE\_STATFS
> \-- Performing Test HAVE\_STATFS - Success
> \-- Performing Test HAVE\_STATVFS
> \-- Performing Test HAVE\_STATVFS - Success
> \-- Looking for fcntl
> \-- Looking for fcntl - found
> \-- Looking for flock
> \-- Looking for flock - found
> \-- Looking for setenv
> \-- Looking for setenv - found
> \-- Looking for putenv
> \-- Looking for putenv - found
> \-- Looking for unsetenv
> \-- Looking for unsetenv - found
> \-- Looking for uname
> \-- Looking for uname - found
> \-- Looking for gethostname
> \-- Looking for gethostname - found
> \-- Looking for strtok\_r
> \-- Looking for strtok\_r - found
> \-- Looking for fdopen
> \-- Looking for fdopen - found
> \-- Looking for fseeko
> \-- Looking for fseeko - found
> \-- Looking for sysconf
> \-- Looking for sysconf - found
> \-- Looking for getpwuid\_r
> \-- Looking for getpwuid\_r - found
> \-- Looking for getgrgid\_r
> \-- Looking for getgrgid\_r - found
> \-- Looking for sys/soundcard.h
> \-- Looking for sys/soundcard.h - not found
> \-- Performing Test WX\_SOCKLEN\_T\_IS\_SOCKLEN\_T
> \-- Performing Test WX\_SOCKLEN\_T\_IS\_SOCKLEN\_T - Success
> \-- Performing Test SOCKOPTLEN\_T\_IS\_SOCKLEN\_T
> \-- Performing Test SOCKOPTLEN\_T\_IS\_SOCKLEN\_T - Success
> \-- Looking for gethostbyname
> \-- Looking for gethostbyname - found
> \-- Looking for gethostbyname\_r
> \-- Looking for gethostbyname\_r - not found
> \-- Looking for getservbyname
> \-- Looking for getservbyname - found
> \-- Looking for inet\_aton
> \-- Looking for inet\_aton - found
> \-- Looking for inet\_addr
> \-- Looking for inet\_addr - found
> \-- Performing Test wxHAVE\_PTHREAD\_CLEANUP
> \-- Performing Test wxHAVE\_PTHREAD\_CLEANUP - Success
> \-- Performing Test HAVE\_PTHREAD\_MUTEXATTR\_T
> \-- Performing Test HAVE\_PTHREAD\_MUTEXATTR\_T - Success
> \-- Performing Test HAVE\_PTHREAD\_MUTEXATTR\_SETTYPE\_DECL
> \-- Performing Test HAVE\_PTHREAD\_MUTEXATTR\_SETTYPE\_DECL - Success
> \-- Performing Test HAVE\_ABI\_FORCEDUNWIND
> \-- Performing Test HAVE\_ABI\_FORCEDUNWIND - Failed
> \-- Looking for localtime\_r
> \-- Looking for localtime\_r - found
> \-- Looking for gmtime\_r
> \-- Looking for gmtime\_r - found
> \-- Performing Test wxSIZE\_T\_IS\_NOT\_UINT
> \-- Performing Test wxSIZE\_T\_IS\_NOT\_UINT - Success
> \-- Performing Test wxSIZE\_T\_IS\_NOT\_ULONG
> \-- Performing Test wxSIZE\_T\_IS\_NOT\_ULONG - Failed
> \-- Performing Test wxWCHAR\_T\_IS\_REAL\_TYPE
> \-- Performing Test wxWCHAR\_T\_IS\_REAL\_TYPE - Success
> \-- Performing Test HAVE\_PW\_GECOS
> \-- Performing Test HAVE\_PW\_GECOS - Success
> \-- Looking for ftime
> \-- Looking for ftime - not found
> \-- Looking for wcsftime
> \-- Looking for wcsftime - found
> \-- Looking for wprintf
> \-- Looking for wprintf - found
> \-- Looking for putws
> \-- Looking for putws - not found
> \-- Looking for fputws
> \-- Looking for fputws - found
> \-- Looking for vswprintf
> \-- Looking for vswprintf - found
> \-- Looking for vswscanf
> \-- Looking for vswscanf - found
> \-- Looking for wcsdup
> \-- Looking for wcsdup - found
> \-- Looking for wcsnlen
> \-- Looking for wcsnlen - found
> \-- Looking for wcscasecmp
> \-- Looking for wcscasecmp - found
> \-- Looking for wcsncasecmp
> \-- Looking for wcsncasecmp - found
> \-- Looking for wcsrctombs
> \-- Looking for wcsrctombs - not found
> \-- Looking for wcstoull
> \-- Looking for wcstoull - found
> \-- Looking for wcslen
> \-- Looking for wcslen - found
> \-- Looking for fsync
> \-- Looking for fsync - found
> \-- Looking for snprintf
> \-- Looking for snprintf - found
> \-- Looking for vsnprintf
> \-- Looking for vsnprintf - found
> \-- Looking for strnlen
> \-- Looking for strnlen - found
> \-- Looking for strtoull
> \-- Looking for strtoull - found
> \-- Looking for setpriority
> \-- Looking for setpriority - found
> \-- Looking for gettimeofday
> \-- Looking for gettimeofday - found
> \-- Looking for fcntl.h
> \-- Looking for fcntl.h - found
> \-- Looking for langinfo.h
> \-- Looking for langinfo.h - found
> \-- Looking for sched.h
> \-- Looking for sched.h - found
> \-- Looking for unistd.h
> \-- Looking for unistd.h - found
> \-- Looking for wchar.h
> \-- Looking for wchar.h - found
> \-- Looking for wcstr.h
> \-- Looking for wcstr.h - not found
> \-- Performing Test wxTEST\_TZ\_timezone
> \-- Performing Test wxTEST\_TZ\_timezone - Success
> \-- Performing Test WX\_GMTOFF\_IN\_TM
> \-- Performing Test WX\_GMTOFF\_IN\_TM - Success
> \-- Looking for dlopen
> \-- Looking for dlopen - found
> \-- Looking for dladdr
> \-- Looking for dladdr - found
> \-- Looking for dl\_iterate\_phdr
> \-- Looking for dl\_iterate\_phdr - not found
> \-- Looking for sys/select.h
> \-- Looking for sys/select.h - found
> \-- Looking for sys/inotify.h
> \-- Looking for sys/inotify.h - not found
> \-- Looking for sys/event.h
> \-- Looking for sys/event.h - found
> \-- Looking for xlocale.h
> \-- Looking for xlocale.h - found
> \-- Check size of locale\_t
> \-- Check size of locale\_t - done
> \-- Check size of size\_t
> \-- Check size of size\_t - done
> \-- Check size of int
> \-- Check size of int - done
> \-- Check size of long
> \-- Check size of long - done
> \-- Check size of short
> \-- Check size of short - done
> \-- Check size of long long
> \-- Check size of long long - done
> \-- Check size of ssize\_t
> \-- Check size of ssize\_t - done
> \-- Which libraries should wxWidgets use?
> wxUSE\_REGEX: builtin (enable support for wxRegEx class)
> wxUSE\_ZLIB: sys (use zlib for LZW compression)
> wxUSE\_EXPAT: sys (use expat for XML parsing)
> wxUSE\_LIBJPEG: builtin (use libjpeg (JPEG file format))
> wxUSE\_LIBPNG: builtin (use libpng (PNG image format))
> wxUSE\_LIBTIFF: builtin (use libtiff (TIFF file format))
> wxUSE\_NANOSVG: builtin (use NanoSVG for rasterizing SVG)
> wxUSE\_LIBLZMA: OFF (use liblzma for LZMA compression)
> wxUSE\_LIBSDL: OFF (use SDL for audio on Unix)
> wxUSE\_LIBMSPACK: OFF (use libmspack (CHM help files loading))
> wxUSE\_WEBVIEW: ON (enable wxWebview with WebKit)
> 
> \-- Configured wxWidgets 3.3.0 for Darwin
> Min OS Version required at runtime: macOS 10.10 arm64
> Which GUI toolkit should wxWidgets use? osx\_cocoa
> Should wxWidgets be compiled into single library? OFF
> Should wxWidgets be linked as a shared library? ON
> Which wxWidgets API compatibility should be used? 3.2
> \-- Configuring done (7.5s)
> \-- Generating done (0.1s)
> \-- Build files have been written to: /Users/luke/Developer/wxBuild
> luke@Lukes-MacBook-Pro wxBuild % cmake --build . -j
> \[69/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngerror.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngerror.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngerror.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngerror.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngerror.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngerror.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngerror.c:19:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[73/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/png.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/png.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/png.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/png.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/png.c.o -c /Users/luke/Developer/wxWidgets/src/png/png.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/png.c:14:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[74/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngget.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngget.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngget.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngget.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngget.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngget.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngget.c:15:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[76/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngpread.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngpread.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngpread.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngpread.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngpread.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngpread.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngpread.c:14:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[77/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrio.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrio.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrio.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrio.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrio.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngrio.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngrio.c:21:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[78/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngmem.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngmem.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngmem.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngmem.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngmem.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngmem.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngmem.c:20:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[79/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngread.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngread.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngread.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngread.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngread.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngread.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngread.c:17:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[80/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngset.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngset.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngset.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngset.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngset.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngset.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngset.c:19:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[83/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrutil.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrutil.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrutil.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrutil.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrutil.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngrutil.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngrutil.c:17:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> \[84/1003\] Building C object libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrtran.c.o
> FAILED: libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrtran.c.o
> /opt/homebrew/opt/llvm/bin/clang -DPNG\_INTEL\_SSE -D\_FILE\_OFFSET\_BITS=64 -I/Users/luke/Developer/wxBuild/lib/wx/include/osx\_cocoa-unicode-3.3 -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=10.10 -fPIC -MD -MT libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrtran.c.o -MF libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrtran.c.o.d -o libs/CMakeFiles/wxpng.dir/\_\_/\_\_/\_\_/src/png/pngrtran.c.o -c /Users/luke/Developer/wxWidgets/src/png/pngrtran.c
> In file included from /Users/luke/Developer/wxWidgets/src/png/pngrtran.c:19:
> /Users/luke/Developer/wxWidgets/src/png/pngpriv.h:536:16: fatal error: 'fp.h' file not found
> 536 | # include \<fp.h\>
> | ^ ~~~~~
> 1 error generated.
> ninja: build stopped: subcommand failed.
> \`\`\`
> 
> 
> \### Platform and version information
> 
> \- wxWidgets version you use: pretty much all of them
> \- wxWidgets port you use: wxMac
> \- OS and its version: 14.5 (23F79)

---

<div class="post-metadata">

**Author:** ![jonas](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jonas/32/24756_2.png) [@jonas](https://root-forum.cern.ch/u/jonas)\
**Post date:** [April 3, 2025, 9:38am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/9 "2025-04-03T09:38:12Z")

</div>

The problem is that for whatever reason, ROOT forces the buildin libpng only on macOS.

I have changed this behavior for ROOT master in the upcoming 6.36 release:

> <https://github.com/root-project/root/pull/18074>
>
> There is probably no reason to do this anymore. These libraries should be instal…led on the system, and if not, the automatic detection a few lines above the removed lines will take care of it.
> 
> Both the ROOT conda package and the nix package have patches to circumvent this already, and it would be better to do this upstream too.

I’ll backport this to 6.34 and 6.32. Then, in the next patch releases, ROOT will pickup the system libpng and compile just fine.

---

<div class="post-metadata">

**Author:** ![vkireyeu](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/a8b319/32.png) [@vkireyeu](https://root-forum.cern.ch/u/vkireyeu)\
**Post date:** [April 6, 2025, 8:54pm UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/10 "2025-04-06T20:54:13Z")

</div>

Just tried to compile master – it fails at the same step with Afterimage:

```auto
In file included from libpng/png.c:14:
libpng/pngpriv.h:524:16: fatal error: 'fp.h' file not found
  524 | # include <fp.h>
      | ^ ~~~~~
1 error generated.
make[3]: *** [libpng/png.o] Error 1

```

Seems like this library is obsolete (last release was in 2010) – can ROOT be built without such legacy?

---

<div class="post-metadata">

**Author:** ![jonas](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jonas/32/24756_2.png) [@jonas](https://root-forum.cern.ch/u/jonas)\
**Post date:** [April 6, 2025, 10:02pm UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/11 "2025-04-06T22:02:42Z")

</div>

You’re sure that you are building ROOT master? I don’t see the `fp.h` include anymore:

> <https://github.com/root-project/root/blob/master/graf2d/asimage/src/libAfterImage/libpng/pngpriv.h>

Maybe you need to do a clean build?

Yes, you can build ROOT without AfterImage. You just need to set `-Dasimage=OFF` in your CMake configuration, as explained on [our website](https://root.cern/install/build_from_source/#all-build-options). You will lose some ROOT features though, but I’m not exactly sure what (maybe @couet knows?). I would rather not disable it as long as you can still build with it.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 21, 2025, 8:25am UTC](https://root-forum.cern.ch/t/problem-in-root-installation-due-to-afterimage/63270/13 "2025-04-21T08:25:00Z")

</div>

Closed on April 21, 2025, 8:25am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
