Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to cmake is breaking this compile, updating cmake isnt enough to fix it #15

Closed
wanfuse123 opened this issue Apr 6, 2022 · 6 comments

Comments

@wanfuse123
Copy link

wanfuse123 commented Apr 6, 2022

[ 87%] Building CXX object tests/CMakeFiles/tests.dir/tests.cpp.o
In file included from /home/stevena/sfxr-qt/tests/tests.cpp:7:
/home/stevena/sfxr-qt/3rdparty/catch2/single_include/catch2/catch.hpp:10453:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression
    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                 ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/stevena/sfxr-qt/3rdparty/catch2/single_include/catch2/catch.hpp:10453:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression
    static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
                     ^
/usr/include/x86_64-linux-gnu/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ'
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
                  ^
/usr/include/unistd.h:640:17: note: declared here
extern long int sysconf (int __name) __THROW;
                ^
In file included from /home/stevena/sfxr-qt/tests/tests.cpp:7:
/home/stevena/sfxr-qt/3rdparty/catch2/single_include/catch2/catch.hpp:10512:33: error: variable length array declaration not allowed at file scope
    char FatalConditionHandler::altStackMem[sigStackSize] = {};
                                ^           ~~~~~~~~~~~~
2 errors generated.
make[2]: *** [tests/CMakeFiles/tests.dir/build.make:90: tests/CMakeFiles/tests.dir/tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1063: tests/CMakeFiles/tests.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
@agateau
Copy link
Owner

agateau commented Apr 13, 2022

Hi, to be able to help you I am going to need some more information:

  • Linux distribution and version
  • compiler name (gcc, clang, something else) and version
  • cmake version
  • How did you call cmake?
  • How did you call make?

@alexmyczko
Copy link
Contributor

alexmyczko commented Aug 15, 2022

This looks like: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013307
appears to be the same: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1017171

Debian GNU/Linux, sid (unstable)

gcc (Debian 12.1.0-8) 12.1.0

cmake version 3.24.0

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu ..

make -j16 "INSTALL=install --strip-program=true" VERBOSE=1

@wanfuse123
Copy link
Author

wanfuse123 commented Aug 15, 2022 via email

@alexmyczko
Copy link
Contributor

@agateau I guess the issue can be closed?

@wanfuse123
Copy link
Author

wanfuse123 commented Sep 30, 2022 via email

@agateau
Copy link
Owner

agateau commented Sep 30, 2022

OK, closing it.

@agateau agateau closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants