Skip to content
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

pkgconfig: Fix linking to a custom target #7996

Merged
merged 1 commit into from Dec 22, 2021

Conversation

xclaesse
Copy link
Member

When generating pkgconfig file for a library that links to an
uninstalled static library built by custom_target() Meson was crashing
when trying to access some attributes that does not exist on that class.

Also fix is_internal() implementation, it only really make sense on a
CustomTargetIndex or if CustomTarget has only a single output.

@xclaesse xclaesse added this to the 0.56.1 milestone Nov 17, 2020
@xclaesse
Copy link
Member Author

This fix meson crash seen in GStreamer: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/133#note_696355.

CC @nirbheek

@gdesmott
Copy link

gdesmott commented Dec 4, 2020

@nirbheek nirbheek modified the milestones: 0.56.1, 0.56.3 Jan 9, 2021
@jpakkane
Copy link
Member

The test failure is hard to pick up from the test output but fairly straightforward when run locally:

Failed test during install: 'test cases/common/45 pkgconfig-gen'
Reason: 
Extra file usr/lib/pkgconfig/simple6.pc found.

@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #7996 (eb8d9f0) into master (ee0baa9) will increase coverage by 0.02%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7996      +/-   ##
==========================================
+ Coverage   67.12%   67.15%   +0.02%     
==========================================
  Files         404      404              
  Lines       85763    85761       -2     
  Branches    18917    18915       -2     
==========================================
+ Hits        57568    57591      +23     
+ Misses      23665    23642      -23     
+ Partials     4530     4528       -2     
Impacted Files Coverage Δ
mesonbuild/build.py 77.49% <60.00%> (+0.29%) ⬆️
mesonbuild/modules/pkgconfig.py 82.29% <100.00%> (+0.04%) ⬆️
mesonbuild/scripts/vcstagger.py 87.50% <0.00%> (-4.17%) ⬇️
modules/pkgconfig.py 82.29% <0.00%> (+0.04%) ⬆️
build.py 73.94% <0.00%> (+0.29%) ⬆️
modules/python.py 67.08% <0.00%> (+0.49%) ⬆️
mesonbuild/dependencies/base.py 85.67% <0.00%> (+0.59%) ⬆️
mesonbuild/minstall.py 67.87% <0.00%> (+0.72%) ⬆️
mesonbuild/dependencies/dev.py 68.35% <0.00%> (+1.19%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee0baa9...eb8d9f0. Read the comment docs.

@xclaesse
Copy link
Member Author

xclaesse commented Dec 8, 2021

Rebased and hopefully fixed the CI. Targetting 0.60.3 because it's a bugfix.

mesonbuild/build.py Outdated Show resolved Hide resolved
@xclaesse
Copy link
Member Author

xclaesse commented Dec 8, 2021

The Windows failure seems unrelated, happens on master too.

When generating pkgconfig file for a library that links to an
uninstalled static library built by custom_target() Meson was crashing
when trying to access some attributes that does not exist on that class.

Also fix is_internal() implementation, it only really make sense on a
CustomTargetIndex or if CustomTarget has only a single output.
@nirbheek
Copy link
Member

LGTM, rebased to see if fixes from master fix the CI.

@nirbheek nirbheek merged commit 95a4c6a into mesonbuild:master Dec 22, 2021
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.

None yet

5 participants