Skip to content

deps: fix libunwind build with GCC < 11#58628

Merged
Keno merged 1 commit intomasterfrom
kf/libunwind-gcc-fix
Jun 5, 2025
Merged

deps: fix libunwind build with GCC < 11#58628
Keno merged 1 commit intomasterfrom
kf/libunwind-gcc-fix

Conversation

@Keno
Copy link
Copy Markdown
Member

@Keno Keno commented Jun 3, 2025

Apply patch from libunwind/libunwind#853 to add missing parameter names
in _UPT_ptrauth_insn_mask function to comply with ISO/IEC 9899.

Prior to GCC 11, omitting parameter names in function definitions
was an error. GCC 11 changed this behavior in commit
https://gcc.gnu.org/pipermail/gcc-cvs/2020-October/336068.html
to allow omitted parameter names as a C2x extension, making it
a pedantic warning instead of an error.

Since we build without -Wpedantic, the code compiles fine with
GCC 11+ but fails with older GCC versions.

Fixes scheduled CI failures in libunwind build:
https://buildkite.com/julialang/julia-master-scheduled/builds/1160

@Keno Keno force-pushed the kf/libunwind-gcc-fix branch from 74881a7 to 7499731 Compare June 3, 2025 22:50
@giordano giordano added the building Build system, or building Julia or its dependencies label Jun 3, 2025
@Keno
Copy link
Copy Markdown
Member Author

Keno commented Jun 4, 2025

Scheduled pipeline running at https://buildkite.com/julialang/julia-master-scheduled/builds/1161.

+unw_word_t _UPT_ptrauth_insn_mask (UNUSED unw_addr_space_t as, UNUSED void *arg)
{
return 0;
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what is worth, applying the patch is successful but there's a warning because of missing newline at the end of this line

% patch -p1 -f -u -l < libunwind-missing-parameter-names.patch 
patching file src/ptrace/_UPT_ptrauth_insn_mask.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 49 with fuzz 1.

Is there a way to instruct Claude & friends to use the GitHub-generated patch, which also retains attribution?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told it that in #58629 but only after I did the PR update. Let's see if it does better with the new instructions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See if you like this better.

Apply patch from libunwind/libunwind#853 to add missing parameter names
in _UPT_ptrauth_insn_mask function to comply with ISO/IEC 9899.

Prior to GCC 11, omitting parameter names in function definitions
was an error. GCC 11 changed this behavior in commit
https://gcc.gnu.org/pipermail/gcc-cvs/2020-October/336068.html
to allow omitted parameter names as a C2x extension, making it
a pedantic warning instead of an error.

Since we build without -Wpedantic, the code compiles fine with
GCC 11+ but fails with older GCC versions.

Fixes scheduled CI failures in libunwind build:
https://buildkite.com/julialang/julia-master-scheduled/builds/1160
@Keno Keno force-pushed the kf/libunwind-gcc-fix branch 2 times, most recently from c85874d to e3a32d4 Compare June 5, 2025 03:13
@Keno Keno merged commit 4632cd2 into master Jun 5, 2025
8 of 10 checks passed
@Keno Keno deleted the kf/libunwind-gcc-fix branch June 5, 2025 07:15
@Keno
Copy link
Copy Markdown
Member Author

Keno commented Jun 5, 2025

Sigh, looks like the patch got corrupted again. Not sure exactly how that happened, but may have happened after I accidentally pushed over this branch. Sorry! Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

building Build system, or building Julia or its dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants