POV-Ray / povray

The Persistence of Vision Raytracer (POV-Ray)
https://www.povray.org/
GNU Affero General Public License v3.0
1.37k stars 283 forks source link

[BUILD][UNIX] Check compatibility with current OpenEXR versions #408

Open c-lipka opened 3 years ago

c-lipka commented 3 years ago

Summary

On a GitHub Workflows runner I'm seeing configure failing to find ImfInputReadPixels in -lIlmImf, and therefore being unable to enable OpenEXR support during the build.

POV-Ray Version

Build Environment

Build Command Sequence

brew install automake
brew install boost
brew install openexr
brew install ilmbase
cd unix && ./prebuild.sh && cd ..
./configure --without-libsdl --without-x COMPILED_BY="GitHub"

Pre-Build Output

Detected autoconf 2.71
Detected automake 1.16.3
Create ../AUTHORS
Create ../ChangeLog
Create ../configure.ac
Create ../COPYING
Create ../NEWS
Create ../README
Create ../povray.1
Create ../povray.conf
Create ../scripts/
Create ../ini/
Create ../include/
Create ../scenes/
Create ../INSTALL
Create ../VERSION
Create ../icons/file_inc_crystal_48.png
Create ../icons/file_pov_crystal_48.png
Create ../icons/file_pov_classic_32.png
Create ../icons/file_pov_crystal_64.png
Create ../icons/file_inc_slick_32.png
Create ../icons/file_inc_crystal_64.png
Create ../icons/povray_16.png
Create ../icons/file_pov_slick_32.png
Create ../icons/file_inc_classic_32.png
Create ../icons/file_inc_crystal_16.png
Create ../icons/povray_64.png
Create ../icons/file_pov_crystal_16.png
Create ../icons/povray_48.png
Create ../icons/file_inc_classic_48.png
Create ../icons/file_pov_slick_48.png
Create ../icons/file_inc_slick_48.png
Create ../icons/file_pov_classic_48.png
Create ../icons/file_pov_classic_64.png
Create ../icons/file_pov_crystal_32.png
Create ../icons/file_inc_slick_64.png
Create ../icons/file_inc_crystal_32.png
Create ../icons/file_pov_slick_64.png
Create ../icons/file_inc_classic_64.png
Create ../icons/povray_32.png
Create ../icons/file_pov_slick_16.png
Create ../icons/file_inc_classic_16.png
Create ../icons/file_pov_classic_16.png
Create ../icons/file_inc_slick_16.png
Create ../doc/html
Create ./Makefile.am
Create ../kde_install.sh
Create ../povray.ini.in
Create ../Makefile.am
Create ../bootstrap
Create ../source/Makefile.am
Create ../vfe/Makefile.am
Create ../platform/Makefile.am
Run ../bootstrap
+ rm -f config.log config.status
+ aclocal -I .
+ autoheader --warnings=all
+ automake --add-missing --warnings=all
configure.ac:158: installing 'unix/config/ar-lib'
configure.ac:158: installing 'unix/config/compile'
configure.ac:149: installing 'unix/config/config.guess'
configure.ac:149: installing 'unix/config/config.sub'
configure.ac:152: installing 'unix/config/install-sh'
configure.ac:152: installing 'unix/config/missing'
platform/Makefile.am: installing 'unix/config/depcomp'
+ autoconf --warnings=all
configure.ac:295: warning: $as_echo is obsolete; use AS_ECHO(["message"]) instead
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
unix/config/ax_pthread.m4:88: AX_PTHREAD is expanded from...
configure.ac:295: the top level
configure.ac:529: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:529: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:529: the top level
+ cat ./configure
+ sed -e 's,configure.gnu  --help=recursive,& --srcdir=$ac_srcdir,g' -e 's,\(cd \)\($ac_\)\(pop\)*\(dir\),\1"\2\3\4",g' -e 's,$am_aux_dir/missing,\\"$am_aux_dir\\"/missing,g'
+ mv -f ./configure.tmp ./configure
+ chmod +x ./configure
+ rm -f -r ./autom4te.cache

Configure Output

===============================================================================
Configure POV-Ray version 3.8.0-alpha
===============================================================================

This is an unofficial version compiled by:
 GitHub
The POV-Ray Team(tm) is not responsible for supporting this version.

Environment
-----------
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin19.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/sh: "/Users/runner/work/povray/povray/unix/config"/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... ./unix/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether $C_INCLUDE_PATH contains the "." path... no
checking whether $CPLUS_INCLUDE_PATH contains the "." path... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar

Programs
--------
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking whether the g++ compiler works... yes
checking how to run the C++ preprocessor... g++ -E
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for C++ compiler vendor... gnu
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for g++ -std=gnu++11 version... 12.0.0
checking for ranlib... ranlib
checking for stat format option... -f 

Libraries
---------
checking whether to link with cygwin DLL... no
checking whether to enable static linking... no
checking for a sed that does not truncate output... /usr/bin/sed
checking whether gcc is Clang... yes
checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for boostlib >= 1.38... yes
checking for sin in -lmkl... no
checking for sin in -lm... yes
checking for clock_gettime in -lrt... no
checking whether to use the ZLIB library... yes
checking for library containing zlibVersion... -lz
checking for zlib.h... yes
checking for libz version >= 1.2.1... 1.2.11, ok
checking whether to use the PNG library... yes
checking for library containing png_get_libpng_ver... -lpng
checking for png.h... yes
checking for libpng version >= 1.2.5... 1.6.37, ok
checking whether to use the JPEG library... yes
checking for library containing jpeg_std_error... -ljpeg
checking for jpeglib.h... yes
checking for libjpeg version >= 6b (62)... 90, ok
checking whether to use the TIFF library... yes
checking for library containing TIFFGetVersion... -ltiff
checking for tiffio.h... yes
checking for libtiff version >= 3.6.1... 4.3.0, ok
checking whether to use the OpenEXR library... yes
checking for pkg-config... pkg-config
checking for OpenEXR's pkg-config... yes
checking for OpenEXR version >= 1.2... 3.0.3, ok
checking for OpenEXR/ImfCRgbaFile.h... yes
checking for ImfInputReadPixels in -lIlmImf... no
configure: WARNING: all program features using the OpenEXR library are disabled
checking for X... disabled
configure: X Window display will be disabled

Language constructs and functions
---------------------------------
checking for sys/time.h... yes
checking for time.h... yes
checking for limits.h... yes
checking for sys/resource.h... yes
checking for sys/time.h... (cached) yes
checking for sys/wait.h... yes
checking for unistd.h... (cached) yes
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of int... 4
checking size of long int... 8
checking size of size_t... 8
checking size of float... 4
checking for working memcmp... yes
checking for getcwd... yes
checking for readlink... yes
checking for nanosleep... yes
checking for usleep... yes
checking for useconds_t... yes
checking for clock_gettime... yes
checking for g++ -std=gnu++11 options needed to detect all undeclared functions... none needed
checking whether CLOCK_MONOTONIC is declared... yes
checking whether CLOCK_REALTIME is declared... yes
checking whether CLOCK_PROCESS_CPUTIME_ID is declared... yes
checking whether CLOCK_THREAD_CPUTIME_ID is declared... yes
checking for clockid_t... yes
checking for getrusage... yes
checking whether RUSAGE_SELF is declared... yes
checking whether RUSAGE_THREAD is declared... no
checking whether RUSAGE_LWP is declared... no
checking for gettimeofday... yes

Compiling
---------
checking whether to enable pipes for communications... yes
checking whether g++ -std=gnu++11 accepts -pipe... yes
checking whether g++ -std=gnu++11 accepts -Wno-multichar... yes
checking whether g++ -std=gnu++11 accepts -Wno-write-strings... yes
checking whether g++ -std=gnu++11 accepts -fno-enforce-eh-specs... no
checking whether g++ -std=gnu++11 accepts -Wno-non-template-friend... no
checking whether g++ -std=gnu++11 accepts -Wsuggest-override... no
checking whether to enable I/O restrictions... yes
checking whether to enable debugging... no
checking whether to enable profiling... no
checking whether to enable stripping... yes
configure: WARNING: Cannot set stripping mode
checking whether g++ -std=gnu++11 accepts -s... no
checking whether to enable optimizations... yes
checking whether g++ -std=gnu++11 accepts -O3... yes
checking whether g++ -std=gnu++11 accepts -ffast-math... yes
checking whether to enable architecture-specific optimizations... yes
checking whether g++ -std=gnu++11 accepts -xHost... no
checking whether g++ -std=gnu++11 accepts -march=native... yes
checking which architecture to optimize for... x86_64-apple-darwin19.6.0 (using -march=native)
checking whether C++ compiler accepts -mavx... yes
checking whether C++ compiler accepts -mavx2... yes
checking whether C++ compiler accepts -mfma... yes
checking whether C++ compiler accepts -mfma4... yes

Floating Point Features
-----------------------
checking for limits... yes
checking whether NaNs are supported... yes
checking for cmath... yes
checking whether NaNs can be identified using std::isnan()... yes
checking whether infinite values are supported... yes
checking for cmath... (cached) yes
checking whether infinities can be identified using std::isinf()... yes

Makefiles
---------
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating source/Makefile
config.status: creating vfe/Makefile
config.status: creating platform/Makefile
config.status: creating unix/Makefile
config.status: creating unix/config.h
config.status: executing depfiles commands

===============================================================================
POV-Ray 3.8.0-alpha has been configured.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          disabled
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff
  Unsupported image formats: openexr

Compilation settings:
  Build architecture:  x86_64-apple-darwin19.6.0
  Built/Optimized for: x86_64-apple-darwin19.6.0 (using -march=native)
  Compiler vendor:     gnu
  Compiler version:    g++ -std=gnu++11 12.0.0
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pthread
  Libraries:           -ltiff -ljpeg -lpng -lz -lm  -pthread 

Type 'make check' to build the program and run a test render.
Type 'make install' to install POV-Ray on your system.

The POV-Ray components will be installed in the following directories:
  Program (executable):       /usr/local/bin
  System configuration files: /usr/local/etc/povray/3.8
  User configuration files:   /Users/runner/.povray/3.8
  Standard include files:     /usr/local/share/povray-3.8/include
  Standard INI files:         /usr/local/share/povray-3.8/ini
  Standard demo scene files:  /usr/local/share/povray-3.8/scenes
  Documentation (text, HTML): /usr/local/share/doc/povray-3.8
  Unix man page:              /usr/local/share/man
===============================================================================

Additional context (optional)

On GitHub Workflows runners using Ubuntu 18.04 or 20.04, and OpenEXR 2.0.2 and 2.3.0 respectively (unknown IlmImf versions), no such problem is seen.

Suggested Solution (optional)

We should examine whether this is a fundamental problem with OpenEXR 3.0.3 (possibly a change in 3.0.0), or whether it is due to an odd quirk of this particular machine.

c-lipka commented 3 years ago

Looks like the OpenEXR library proper has finally been renamed from libIlmImf to libOpenEXR. So all we'll have to do is update the unix/config/ax_check_openexr.m4 automake script, and we should be fine.

c-lipka commented 3 years ago

Well, with that out of the way, we're running into th next snag, namely that what had once been the IlmBase component of OpenEXR has been moved out into a whole new library, Imath. So we might have to address that, too.

For now, I'll probably just throw that library off the list of those that we give credit to. We're not depending on them directly anyway. If we ever upgrade the version of OpenEXR bundled with POV-Ray for Windows, I might have a closer look how best to proceed.

c-lipka commented 3 years ago

... and plenty more cans of worms. I'm tabling this thing for now. We clearly have a problem with OpenEXR 3.0.

c-lipka commented 3 years ago

Addressed for v3.7.0 with pull request #422.

Addendum: In v3.7.0, using OpenEXR 3 may require specifying CXXFLAGS="-std=c++11" when running the configure script. We may or may not change this behavior in the future.

c-lipka commented 3 years ago

Addressed for v3.8.0 with pull request #423.

Will be addressed for v4.0 by (effectively or actually) merging the v3.8.0 branch at some later point in time.