microsoft / microsoft/msix-packaging

[BUG] does not compile on linux fedora 36 64bits

Open
#535 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-MSIX SDK Bug
Dominant language
C
Stars
1.1k
Forks
193
Avg merge
2h 16m
Merged PRs (30d)
2

Description

Project
MSIX SDK

Describe the bug
In file included from /home/src/msix-packaging/src/test/msixtest/msixtest.cpp:6:
/home/src/msix-packaging/lib/catch2/catch.hpp:8749:34: error: constexpr variable 'sigStack Size' must be initialized by a constant expression
constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/src/msix-packaging/lib/catch2/catch.hpp:8749:58: note: non-constexpr function 'sysco nf' cannot be used in a constant expression
constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ ;
^
/usr/include/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
^
/usr/include/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/src/msix-packaging/src/test/msixtest/msixtest.cpp:6:
/home/src/msix-packaging/lib/catch2/catch.hpp:8808:33: error: variable length array declar ation not allowed at file scope
char FatalConditionHandler::altStackMem[sigStackSize] = {};
^ ~~~~~~~~~~~~
2 errors generated.
make[2]: *** [src/test/msixtest/CMakeFiles/msixtest.dir/build.make:90: src/test/msixtest/C MakeFiles/msixtest.dir/msixtest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:619: src/test/msixtest/CMakeFiles/msixtest.dir/all] Err or 2
make: *** [Makefile:136: all] Error 2

To Reproduce
./makelinux.sh

Expected behavior
must compile!

Platform
Fedora linux 36 64bits

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ./makelinux.sh on Fedora 36 and inspect the failure in src/test/msixtest/msixtest.cpp through lib/catch2/catch.hpp. Check the reported sigStackSize and MINSIGSTKSZ errors, then verify that the msixtest target compiles successfully with make.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, fedora, linux
Domain
build-system, operating-systems, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.