Fix Arch Linux build failures (doomtype.h enum error, ATOMIC_FLAG_INIT deprecation)
Credits
Issue discovered by @Valeryum999 - thank you!
Problem
Building meniOS on Arch Linux fails with compilation errors and deprecation warnings.
Error Details
Critical Error
doomtype.h:80:5: error: cannot use keyword 'false' as enumeration constant
This is blocking the build completely.
Deprecation Warnings
warning: ATOMIC_FLAG_INIT is deprecated
Multiple warnings throughout the codebase about deprecated atomic initialization.
Screenshots
Screenshots of the actual build failures on Arch Linux will be added here.
To add screenshots:
- Drag and drop images into this comment
- Or paste from clipboard
- Include full terminal output showing the errors
Root Cause
Arch Linux uses a very recent toolchain (cutting-edge GCC/Clang), which:
- Enforces stricter C/C++ standards
- Deprecates older atomic APIs
- May have different default compilation flags
The codebase currently builds on older/stable distributions but breaks on modern ones.
Steps to Reproduce
- Get an Arch Linux system (VM or bare metal)
- Follow the README.md build instructions
- Observe compilation failures
Expected: Clean build Actual: Build fails with enum/atomic errors
Files Affected
-
doomtype.h:80- enum using 'false' keyword - Various files using
ATOMIC_FLAG_INIT
Proposed Solution
1. Fix doomtype.h enum issue
The 'false' keyword is reserved in modern C/C++. Likely need to:
- Use integer literals (0, 1) instead of bool keywords in enums
- Or convert to proper boolean type instead of enum
2. Fix ATOMIC_FLAG_INIT deprecation
Modern C11/C++11 deprecates ATOMIC_FLAG_INIT in favor of:
atomic_flag flag = ATOMIC_FLAG_INIT; // Old (deprecated)
atomic_flag flag = {0}; // Modern
3. Test on modern toolchains
- Arch Linux (rolling release)
- Recent GCC (13+)
- Recent Clang (16+)
Acceptance Criteria
- [ ] Build succeeds on Arch Linux
- [ ] No compilation errors in doomtype.h
- [ ] ATOMIC_FLAG_INIT warnings resolved
- [ ] Tested with GCC 13+ and Clang 16+
- [ ] README updated if specific toolchain versions required
- [ ] CI/build testing on modern distributions
Priority
Medium-High - Blocks adoption on modern Linux distributions
Testing Environment Needed
- Arch Linux VM or bare metal
- Or Docker container with Arch Linux
- Follow exact README steps to reproduce
Environment Info
When reporting or testing, please provide:
# Compiler versions
gcc --version
clang --version
# Distribution info
uname -a
cat /etc/os-release
# Build command used
make ... # (include full command)
Notes
This is a portability/compatibility issue. The codebase should ideally support:
- Stable distros (Ubuntu LTS, Debian stable)
- Rolling distros (Arch Linux, Fedora)
- Range of compiler versions
Consider adding CI builds for multiple distributions to catch these early.
Related
- Build system: #195 (userland build)
- Doom integration: #300-#312 (Doom build system)
Thanks Again
@Valeryum999 - Your testing on Arch Linux helps make meniOS more portable!