microsoft / microsoft/msix-packaging
[BUG] ./makelinux.sh fails on Ubuntu 22.04 and clang14
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 193
- Avg merge
- 2h 16m
- Merged PRs (30d)
- 2
Description
Project
MSIX SDK
Describe the bug
Running "./makelinux.sh" fails with the error:
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8749:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression
constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8749:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression
constexpr static 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/mattb/msix-packaging/src/test/msixtest/msixtest.cpp:6:
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8808:33: error: variable length array declaration 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/CMakeFiles/msixtest.dir/msixtest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:619: src/test/msixtest/CMakeFiles/msixtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
To Reproduce
Steps to reproduce the behavior:
- Install Ubuntu 22.04 LTS on WSL 2
sudo apt install clang cmake- run ./makelinux.sh
Expected behavior
A successful compile
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Ubuntu 22.04 LTS running on Windows 11 22000.613
Additional context
I would be happy to provide more information upon request.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with ./makelinux.sh on Ubuntu 22.04 using clang and cmake, then inspect lib/catch2/catch.hpp and the msixtest build entry at src/test/msixtest/msixtest.cpp. Compare the compiler diagnostics with the bundled Catch2 code and verify that the project compiles successfully after the compatibility issue is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, ubuntu
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100