ValeevGroup / BTAS

Basic Tensor Algebra Subroutines
http://itensor.org/btas
BSD 3-Clause "New" or "Revised" License
46 stars 19 forks source link

Unittests fail to build #143

Closed mbanck closed 1 year ago

mbanck commented 2 years ago

I get this build failure:

[ 90%] Building CXX object unittest/CMakeFiles/btas_test.dir/test.cc.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/unittest && /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBTAS_ASSERT_THROWS=1 -DBTAS_HAS_BOOST_CONTAINER=1 -DBTAS_HAS_BOOST_ITERATOR=1 -DBTAS_HAS_BOOST_SERIALIZATION=1 -DBTAS_TARGET_MAX_INDEX_RANK=6 -I/<<PKGBUILDDIR>>/unittest -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/unittest -I/<<PKGBUILDDIR>> -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++17 -MD -MT unittest/CMakeFiles/btas_test.dir/test.cc.o -MF CMakeFiles/btas_test.dir/test.cc.o.d -o CMakeFiles/btas_test.dir/test.cc.o -c /<<PKGBUILDDIR>>/unittest/test.cc
In file included from /usr/include/signal.h:328,
                 from /<<PKGBUILDDIR>>/unittest/catch.hpp:8034,
                 from /<<PKGBUILDDIR>>/unittest/test.h:4,
                 from /<<PKGBUILDDIR>>/unittest/test.cc:2:
/<<PKGBUILDDIR>>/unittest/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/x86_64-linux-gnu/bits/sigstksz.h:24:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
/<<PKGBUILDDIR>>/unittest/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10881 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};