Skip to content

libssh2-sys: write relative paths in libssh2.pc - #366

Merged
yodaldevoid merged 1 commit into
rust-lang:masterfrom
AlJohri:relative-pc-file
Oct 3, 2026
Merged

yodaldevoid merged 1 commit into
rust-lang:masterfrom
AlJohri:relative-pc-file

Conversation

@AlJohri

@AlJohri AlJohri commented Sep 30, 2026

Copy link
Copy Markdown
Contributor
  • Write libssh2.pc relative to ${pcfiledir} instead of absolute OUT_DIR paths, so the build output is reproducible and relocatable.
  • Point libdir at build/, where libssh2.a is actually written.
  • Fill the placeholders libssh2.pc.in uses today (@LIBSSH2_VERSION@, @LIBSSH2_PC_*@); previously Version: etc. held literal @...@ tokens.

Fixes #340

Root cause: build.rs substituted absolute OUT_DIR paths into the .pc and
used placeholder names libssh2.pc.in no longer has, so Version, Requires
and Libs kept literal @...@ tokens. libdir also pointed at lib/, while
the archive is built into build/.
@AlJohri
AlJohri marked this pull request as ready for review September 30, 2026 07:31
@yodaldevoid
yodaldevoid merged commit 011f16d into rust-lang:master Oct 3, 2026
9 of 12 checks passed
@yodaldevoid

Copy link
Copy Markdown
Collaborator

Thank you for the fix!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pc file includes absolute paths

2 participants