fix(ci): fix gcc 14+ incompatible-pointer-types error on Windows - #59
Merged
Conversation
…igration - Pin all GitHub Actions to immutable SHA digests (SLSA Level 3) - Add Renovate configuration with corrected lux.toml regex and github-tags datasource (no native luarocks datasource exists) - Map busted, luacov, luastatic to their canonical GitHub repos - Add SBOM generation (anchore/sbom-action) for linux-x86_64 only - Add build provenance attestation (actions/attest-build-provenance) - Add update-release-notes job with attestation verification instructions - Add luarocks-publish environment to publish workflow - Fix indentation in publish.yml rockspec cleanup step - Preserve paths-ignore in release-please workflow - No permission changes to tests.yml (inherits repo default read)
…ensure-deps The Windows build failed with 'ToolNotFound: failed to find tool gcc' because: 1. The MSYS2 setup-msys2 action only adds C:\msys64\usr\bin to GITHUB_PATH, not the UCRT64 subsystem bin directory. Native Windows programs (lx.exe, just.exe) couldn't find gcc.exe or lua.exe on the PATH. 2. The justfile's ensure-deps recipe didn't pass --lua-dir like other lx invocations, causing Lux to fail discovering Lua on non-standard paths. Fixes: - Add 'Add UCRT64 to PATH (Windows)' step after MSYS2 setup - Pass --lua-dir to ensure-deps recipe in justfile
The Windows build failed with 'ToolNotFound: failed to find tool gcc' because
the justfile hardcoded a colon (':') as the PATH separator when prepending
the lux build dependencies bin directory. On Windows, this corrupted the
semicolon-separated PATH, causing MSYS2/Bash to lose access to /ucrt64/bin
and failing to find gcc.exe.
Fixes:
- Dynamically set path_sep to ';' on Windows and ':' otherwise in justfile
The Windows build failed with an incompatible pointer type error in libuv because GCC 14+ makes -Wincompatible-pointer-types an error by default. Fixes: - Add -Wno-error=incompatible-pointer-types to CFLAGS for luv and luasystem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Windows build release job failure:
error: passing argument 3 of 'uv__convert_utf16_to_utf8' from incompatible pointer type [-Wincompatible-pointer-types].Root Cause
The MSYS2 UCRT64 environment installs GCC 15.2.0. Starting with GCC 14,
-Wincompatible-pointer-typesis treated as an error by default instead of a warning. This causes the compilation oflibuv(a dependency ofluv) to fail on Windows.Changes
justfile: Added-DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types"to thebuild-luvrecipe'scmakecommand.justfile: Added-Wno-error=incompatible-pointer-typesto thebuild-systemrecipe'scccommand for consistency.Testing
This fixes the compilation error on Windows with GCC 14+.