RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.74k stars 160 forks source link

error: call to non-'constexpr' function 'long int sysconf(int)' #106

Closed luyatshimbalanga closed 3 years ago

luyatshimbalanga commented 3 years ago

Due to the glibc change to MINSIGSTKSZ such that it's no longer a compile-time constant, oidn failed to build as a result on the following line:


In file included from /usr/include/signal.h:315,
                 from /builddir/build/BUILD/oidn-1.3.0/apps/catch.hpp:8034,
                 from /builddir/build/BUILD/oidn-1.3.0/apps/oidnTest.cpp:12:
/builddir/build/BUILD/oidn-1.3.0/apps/catch.hpp:10822:58: error: call to non-'constexpr' function 'long int sysconf(int)'
10822 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
                 from /usr/include/signal.h:315,
                 from /builddir/build/BUILD/oidn-1.3.0/apps/catch.hpp:8034,
                 from /builddir/build/BUILD/oidn-1.3.0/apps/oidnTest.cpp:12:
/usr/include/unistd.h:630:17: note: 'long int sysconf(int)' declared here
  630 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
In file included from /builddir/build/BUILD/oidn-1.3.0/apps/oidnTest.cpp:12:
/builddir/build/BUILD/oidn-1.3.0/apps/catch.hpp:10881:45: error: size of array 'altStackMem' is not an integral constant-expression
10881 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                        

Affected version of oidn: 1.3.0

Originally reported on Red Hat bugzilla running Fedora Rawhide build system

atafra commented 3 years ago

This has been fixed in the devel branch. Thanks!