Skip to content

qt6.qtbase: fix the libexecdir in the pkg-config config file#210134

Merged
NickCao merged 1 commit intoNixOS:stagingfrom
lilyinstarlight:fix/qt6-pkg-config
Jan 12, 2023
Merged

qt6.qtbase: fix the libexecdir in the pkg-config config file#210134
NickCao merged 1 commit intoNixOS:stagingfrom
lilyinstarlight:fix/qt6-pkg-config

Conversation

@lilyinstarlight
Copy link
Member

Description of changes

A few lines above this change, libexec is explicitly moved to the dev output. Therefore the pkg-config should point to it too. This was causing qt6 builds from meson to not function correctly (see #208433 (comment))

cc: @LunNova @NickCao

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

A few lines above this change, libexec is explicitly moved to the dev
output. Therefore the pkg-config should point to it too.
@lilyinstarlight lilyinstarlight mentioned this pull request Jan 11, 2023
13 tasks
@NickCao
Copy link
Member

NickCao commented Jan 11, 2023

There are a few other .pc files from qtbase, aren't they affected by this?

lib/pkgconfig/
├── Qt6Concurrent.pc
├── Qt6Core.pc
├── Qt6DBus.pc
├── Qt6Gui.pc
├── Qt6Network.pc
├── Qt6OpenGL.pc
├── Qt6OpenGLWidgets.pc
├── Qt6Platform.pc
├── Qt6PrintSupport.pc
├── Qt6Sql.pc
├── Qt6Test.pc
├── Qt6Widgets.pc
└── Qt6Xml.pc

If so, we can patch qtbase as such:

diff --git a/cmake/PkgConfigLibrary.pc.in b/cmake/PkgConfigLibrary.pc.in
index 9393cec0c5..cc33e21409 100644
--- a/cmake/PkgConfigLibrary.pc.in
+++ b/cmake/PkgConfigLibrary.pc.in
@@ -1,9 +1,9 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}
-bindir=${prefix}/@INSTALL_BINDIR@
-libexecdir=${prefix}/@INSTALL_LIBEXECDIR@
-libdir=${prefix}/@INSTALL_LIBDIR@
-includedir=${prefix}/@INSTALL_INCLUDEDIR@
+bindir=@CMAKE_INSTALL_FULL_BINDIR@
+libexecdir=@CMAKE_INSTALL_FULL_LIBEXECDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 $<$<BOOL:@contains_mkspecs@>:mkspecsdir=${prefix}/@INSTALL_MKSPECSDIR@>
 $<1: >
 Name: @pkgconfig_name@

(not that mkspecsdir is still broken, they are moved to $dev as well)

@lilyinstarlight
Copy link
Member Author

There are a few other .pc files from qtbase, aren't they affected by this?

None of the other modules have a libexec separately moved to the dev output and also don't override the .pc file. So it's just qtbase afaik. But I'm also not knowledgeable enough to confidently say for sure

Copy link
Member

@NickCao NickCao left a comment

Choose a reason for hiding this comment

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

Let's fix it as such until we encounter other issues.

@ofborg ofborg bot requested review from LunNova and NickCao January 11, 2023 01:26
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jan 11, 2023
@NickCao NickCao merged commit 3496a76 into NixOS:staging Jan 12, 2023
@lilyinstarlight lilyinstarlight deleted the fix/qt6-pkg-config branch January 12, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants