ITADN
r-lib/fs/Issues

Compilation error on Windows ARM64 (R 4.5.3 / Rtools45): undeclared identifier 'EINVAL' in windows/getmode.cc

#507Openbenediktclaus 创建于 2026-03-17
B
benediktclauscommented
### Description When trying to install `fs` from source on a Windows ARM64 machine (Surface Laptop 7) using the new Rtools45 (clang compiler), the compilation fails due to a missing include for `EINVAL`. ### Error Message ```text aarch64-w64-mingw32.static.posix-clang++ -std=gnu++17 [...] -c windows/getmode.cc -o windows/getmode.o windows/getmode.cc:50:13: error: use of undeclared identifier 'EINVAL' 50 | errno = EINVAL; | ^ 1 error generated. ERROR: compilation failed for package 'fs' ``` ### System Information - OS: Windows 11 on ARM64 (Surface Laptop 7) - R Version: 4.5.3 (arm64) - Compiler: Rtools45 (aarch64-w64-mingw32.static.posix-clang++) ### Proposed Fix Adding `#include <cerrno>` to the top of `src/windows/getmode.cc` resolves the issue and allows the package to compile successfully.
0 条评论