Skip to content

Conversation

@tallpsmith
Copy link
Contributor

Fixes compilation error on macOS without libuv where pmWebGroupDestroy
(declared void) incorrectly returns -EOPNOTSUPP.

Issue

Commit 5903430 added pmWebGroupDestroy stub to nowebgroup.c but
included return -EOPNOTSUPP; in a void function, causing:

nowebgroup.c:111:5: error: void function 'pmWebGroupDestroy' 
should not return a value [-Wreturn-mismatch]

Why CI Passes But Local Builds Fail

GitHub macOS runners have Node.js pre-installed, which depends on
libuv as a Homebrew dependency. This means CI builds use webgroup.c
(real implementation) instead of nowebgroup.c (stub), masking this bug.

Local macOS builds without libuv installed hit this error with modern
Clang's strict -Wreturn-mismatch enforcement.

Solution

Remove the return statement from the void stub function, matching the
pattern of other stubs in the same file (pmWebGroupDerive,
pmWebGroupFetch, etc).

Testing

Verified clean build on macOS 25.2.0 (arm64) without libuv using:

./Makepkgs --verbose

Build completes successfully (exit code 0) after this fix.

Fix compile error in nowebgroup.c:111 where pmWebGroupDestroy
(declared as void) incorrectly returns -EOPNOTSUPP.

This bug was introduced in commit 5903430 (Dec 17, 2025) which
added the stub but included a return statement in a void function.

Fixes compilation on macOS without libuv installed, where modern
Clang enforces -Wreturn-mismatch.
@tallpsmith tallpsmith added the bug label Dec 26, 2025
@kurik
Copy link
Contributor

kurik commented Dec 26, 2025

Thanks @tallpsmith . I hit the same issue a few days back, when building manually PCP on Fedora using rpm-build. So it is not specific just for macOS, it fails even for other distros, when built manually, while passing in CI.

Copy link
Member

@kmcdonell kmcdonell left a comment

Choose a reason for hiding this comment

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

LGTM

@kmcdonell kmcdonell merged commit db22c2e into performancecopilot:main Dec 27, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants