Skip to content

Make pkg-config files relocatable post-installation #1346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

albinahlback
Copy link
Contributor

@albinahlback albinahlback commented Oct 24, 2024

Fixes #1338, but I haven't tested this.

Ping @giordano.

@giordano
Copy link
Member

but I haven't tested this.

Add tests please, for example like in #1105

@albinahlback albinahlback force-pushed the relocatable_pkgconfig branch from b9a9965 to f7eadaf Compare October 24, 2024 11:29
@albinahlback albinahlback force-pushed the relocatable_pkgconfig branch from f7eadaf to 043ed45 Compare October 24, 2024 11:30
@albinahlback
Copy link
Contributor Author

I don't know how to finalize the test, this will not pass. I would appreciate some help here.

@maleadt maleadt requested a review from giordano November 6, 2024 15:14
@maleadt
Copy link
Contributor

maleadt commented Nov 6, 2024

Timeout looks unrelated, as it passes the added tests: https://dev.azure.com/JuliaPackaging/BinaryBuilder.jl/_build/results?buildId=24640&view=logs&j=54759826-d195-5ca2-1571-21806663cd36&t=9eb882d6-5a34-5e37-1506-d0b4bf16214f&l=2534

Test Summary:                           | Pass  Total
Auditor - relocatable pkg-config prefix |   28     28

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

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

Thanks for pushing this!

@test "lib/pkgconfig/libfoo.pc" in contents
libfoo_pc = read(joinpath(testdir, "lib/pkgconfig/libfoo.pc"), String)
@test contains(libfoo_pc, "prefix=\${pcfiledir}")
@test !contains(libfoo_pc, "/workplace/destdir")
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Co-authored-by: Mosè Giordano <[email protected]>
@maleadt maleadt merged commit 8348fb3 into JuliaPackaging:master Nov 7, 2024
9 checks passed
@albinahlback
Copy link
Contributor Author

Thanks for completing this!

jmert added a commit to jmert/Yggdrasil that referenced this pull request Nov 24, 2024
Following JuliaPackaging/BinaryBuilder.jl#1346 and the rebuild of
Expat_jll (JuliaPackaging#9791), the workaround for pkgconfig `.pc` files containing
the build `prefix` is no longer necessary.

(Is there a way to actually add the compat constraint to
`HostBuildDepencency`s?)
jmert added a commit to jmert/Yggdrasil that referenced this pull request Nov 24, 2024
Following JuliaPackaging/BinaryBuilder.jl#1346 and the rebuild of
Expat_jll (JuliaPackaging#9791), the workaround for pkgconfig `.pc` files containing
the build `prefix` is no longer necessary.

(Is there a way to actually add the compat constraint to
`HostBuildDepencency`s?)
jmert added a commit to jmert/Yggdrasil that referenced this pull request Dec 2, 2024
Following JuliaPackaging/BinaryBuilder.jl#1346 and the rebuild of
Expat_jll (JuliaPackaging#9791), the workaround for pkgconfig `.pc` files containing
the build `prefix` is no longer necessary.

(Is there a way to actually add the compat constraint to
`HostBuildDepencency`s?)
@giordano
Copy link
Member

giordano commented Dec 8, 2024

Apparently there are some packages which set exec_prefix=/workspace/destdir instead of doing exec_prefix=${prefix}:

% grep -r 'exec_prefix=/workspace/destdir' ~/.julia/artifacts --include='*.pc' | wc -l
      20
% grep -r 'exec_prefix=${prefix}' ~/.julia/artifacts --include='*.pc' | wc -l
     222

I guess we should do the same for exec_prefix.

jmert added a commit to jmert/Yggdrasil that referenced this pull request Jan 13, 2025
Following JuliaPackaging/BinaryBuilder.jl#1346 and the rebuild of
Expat_jll (JuliaPackaging#9791), the workaround for pkgconfig `.pc` files containing
the build `prefix` is no longer necessary.

(Is there a way to actually add the compat constraint to
`HostBuildDepencency`s?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add auditor pass to make pkgconfig files more relocatable
3 participants