Skip to content

build: clear Require.private for static-only builds in libcurl.pc - #22548

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:pc-full-static
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:pc-full-static

Conversation

@vszakats

@vszakats vszakats commented Aug 11, 2026

Copy link
Copy Markdown
Member

Before this patch static-only libcurl builds stored the list of module
dependencies in both Require and Require.private. The new pccritic
tool flagged this as an issue. Having (or not) a duplicate in
Require.private does not change the output created by pkgconf and
pkg-config, as tested with both with and without --static option.
Thus, fix by deleting the private copy.

Fixing:

$ pccritic libcurl.pc
bld/libcurl.pc
  score: 63/100  grade: D  (0 critical, 0 major, 9 minor, 1 info)
  [minor   ] 'libssh2' appears in both Requires and Requires.private (requires/PC051)
  [minor   ] 'libidn2' appears in both Requires and Requires.private (requires/PC051)
  [minor   ] 'openssl' appears in both Requires and Requires.private (requires/PC051)
[...]

Ref: https://github.com/curl/curl/actions/runs/31495008715/job/93790403026#step:10:210 (macOS, CM clang OpenSSL torture)
Ref: https://github.com/curl/curl/actions/runs/31495008825/job/93790433646#step:9:216 (mingw, AM ucrt-x86_64 wolfssl c-ares U)

Follow-up to f057de5 #13911
Follow-up to 98e5904 #5373
Cherry-picked from #22543

@vszakats vszakats added the build label Aug 11, 2026
@vszakats
vszakats marked this pull request as draft August 11, 2026 14:32
@vszakats vszakats changed the title build: clear Require.private for full-static builds in libcurl.pc build: clear Require.private for static-only builds in libcurl.pc Aug 11, 2026
@testclutch

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Prevents duplicate dependency modules in static-only libcurl.pc files.

Changes:

  • Clears Requires.private after promoting dependencies to Requires.
  • Applies the fix consistently to Autotools and CMake builds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
configure.ac Clears private requirements for static-only Autotools builds.
CMakeLists.txt Mirrors the behavior for CMake builds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vszakats
vszakats marked this pull request as ready for review August 12, 2026 08:45
@vszakats vszakats closed this in b9254da Aug 12, 2026
@vszakats
vszakats deleted the pc-full-static branch August 12, 2026 08:47
vszakats added a commit that referenced this pull request Aug 12, 2026
To keep it tidy and to support properties in the template that only
appear in the generated `libcurl.pc` when filled.

E.g. `Required.private` may remain empty after #22548.

Also:
- GHA/windows: dump `libcurl.pc` to log in every job
- tidy up a pre-existing regex in the updated command.
  2c22d30 #22544

Ref: b9254da #22548
Cherry-picked from #22543

Closes #22553
vszakats added a commit that referenced this pull request Aug 12, 2026
…pccritic` tool

`pccritic` is available on the latest macOS runner revision (not every
job runs get it yet), Cygwin, MSYS2/mingw-w64 (one job, others will
follow on the next msys2/setup-msys2 Action bump). It will be
automatically used on BSDs, once they start offering it. Missing from
Linux jobs.

Also:
- GHA/windows: convert `libcurl.pc` to Unix newlines to bump score
  96 to 100 in mingw-w64 jobs.
  CMake-specific fix pending in: #22556
- GHA: verify with minimum `pccritic` score 94 to 100 (depending on CI
  job).
- build: fill `Maintainer:` `libcurl.pc` property when run curl CI.

Issues remaining:

macOS:
```
[info    ] Cflags adds an include path already on the default search path (pkgconf strips it): -I/usr/local/include (cflags/PC031)
[info    ] Libs adds a library path already on the default search path (pkgconf strips it): -L/usr/local/lib (libs/PC040)
[minor   ] Libs.private contains an unexpected flag: /Applications/Xcode_26.6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.5.sdk/System/Library/Frameworks/GSS.framework (libs/PC041)
```

Windows:
```
[minor   ] file uses CRLF line endings (style/PC061)
```

Ref: #22556
Follow-up to b9254da #22548
Follow-up to 852f5d3 #22553
Follow-up to 4d9ba9f #22545
Follow-up to 6c7993d #22536
Follow-up to 3f1c033 #22519

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

Labels

Development

Successfully merging this pull request may close these issues.

3 participants