Fix pkgconfig issues in the official binary releases - #32328
Open
Nirbheek Chauhan (nirbheek) wants to merge 2 commits into
Open
Fix pkgconfig issues in the official binary releases#32328Nirbheek Chauhan (nirbheek) wants to merge 2 commits into
Nirbheek Chauhan (nirbheek) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Nirbheek Chauhan (nirbheek)
August 30, 2026 06:50
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Updates official binary packaging to make libonnxruntime.pc match the packaged directory layout and support relocation.
Changes:
- Rewrites the pkg-config include directory.
- Replaces the hard-coded installation prefix with a relative prefix.
Suppressed comments (1)
tools/ci_build/github/linux/copy_strip_binary.sh:25
pcfilediris the directory containing this file (<archive>/lib/pkgconfig), not the archive root. Since the template deriveslibdirandincludedirfromprefix, this value expands them to nonexistentlib/pkgconfig/libandlib/pkgconfig/includepaths. Go up two levels so the generated flags resolve within the extracted package.
sed -i.bak 's|^prefix=.*|prefix=${pcfiledir}|' "$ARTIFACT_NAME/lib/pkgconfig/libonnxruntime.pc"
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Nirbheek Chauhan (nirbheek)
force-pushed
the
release-pcfile
branch
2 times, most recently
from
August 30, 2026 07:22
d36a941 to
9e6e412
Compare
Copilot started reviewing on behalf of
Nirbheek Chauhan (nirbheek)
August 30, 2026 07:24
View session
copy_strip_binary.sh moves the includes from include/onnxruntime to include, and the libdir from lib64 to lib, but it wasn't updating the pc file to match.
The prefix was being hard-coded to /usr/local. Change it to
${pcfiledir} which makes it relocatable.
Nirbheek Chauhan (nirbheek)
force-pushed
the
release-pcfile
branch
from
August 30, 2026 07:32
c38e558 to
1ec047b
Compare
Copilot started reviewing on behalf of
Nirbheek Chauhan (nirbheek)
August 30, 2026 07:33
View session
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.
Description
includedirandprefixneeded changing in thelibonnxruntime.pcfile when included in the official binary release. The commit messages describe the two changes that were needed.Motivation and Context
You cannot consume the official binary releases using pkgconfig, since the include dir was wrong and the prefix was hard-coded.