Repository navigation
configure: fix libtirpc pkg-config detection - #4639
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
BsAtHome
reviewed
Oct 5, 2026
Comment on lines
92
to
93
| if pkg-config --exists libtirpc; then | ||
|
|
Contributor
There was a problem hiding this comment.
You removed the $PKG_CONFIG indirection?
The conditional tested whether the string "pkg-config libtirpc" is empty, which it never is, so the fallback block ran unconditionally. Use $PKG_CONFIG --exists as intended, and route the block's other pkg-config calls through $PKG_CONFIG too so a cross pkg-config is honored. Behavior is unchanged in practice: without libtirpc.pc the block is now skipped and configure fails later with the same explicit error. Refs LinuxCNC#652.
grandixximo
force-pushed
the
tirpc-conditional-2.9
branch
from
October 6, 2026 04:59
b278fc1 to
9dc0eed
Compare
Contributor
Author
|
Good catch, I did not think about the cross-compile case. The guard now uses $PKG_CONFIG --exists and the block's three pkg-config calls go through $PKG_CONFIG as well, so a prefixed or wrapped pkg-config is honored. Worth fixing while I am at it: those three calls were bare pkg-config since the block was added in 3e809b6. |
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.
Refs #652.
The libtirpc fallback in configure.ac was guarded by
if ! test -z "$PKG_CONFIG libtirpc", which tests whether a fixed string is empty. It never is, so the block ran unconditionally. Replaced with$PKG_CONFIG --exists libtirpc, and the block's three pkg-config calls now go through $PKG_CONFIG too, so a cross pkg-config is honored.Tested both paths on Debian trixie (no /usr/include/rpc/rpc.h, libtirpc 1.3.6):
No behavior change in practice; the old guard just happened to be always true.