keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Add GuiPrivate Qt Component

Open Germano0 opened this issue 3 months ago • 1 comments

Add missing GuiPrivate Qt Component which caused failure of build process

Testing strategy

Step 1 - Without this pull request patch On Fedora 43, with RPMdevtools and mock builder installed. spec file

$ rpmdev-setuptree
$ cd ~/rpmbuild/SPECS
$ wget https://src.fedoraproject.org/fork/germano/rpms/keepassxc/blob/98fac501fc037f356a70d687566a83a522a935ab/f/keepassxc.spec
$ cd ~/rpmbuild/SOURCES
$ wget https://github.com/varjolintu/keepassxc/archive/refs/heads/qt6_ver2.zip
$ mv qt6_ver2.zip keepassxc-qt6_ver2.zip
$ rpmbuild -bs ~/rpmbuild/SPECS/keepassxc.spec
$ mock -n -r fedora-rawhide-x86_64 ~/rpmbuild/SRPMS/keepassxc-2.8.0-1.fc43.src.rpm

failed with errors

CMake Error at src/CMakeLists.txt:369 (target_link_libraries):
  Target "keepassxc_gui" links to:
    Qt6::GuiPrivate
  but the target was not found.  Possible reasons include:
    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
CMake Error at src/autotype/xcb/CMakeLists.txt:6 (target_link_libraries):
  Target "keepassxc-autotype-xcb" links to:
    Qt6::GuiPrivate
  but the target was not found.  Possible reasons include:
    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
-- Generating done (0.5s)

complete logs build_no_patch.log root_no_patch.log

Step 2 - applying this pull request patch

$ cd ~/rpmbuild/SOURCES
$ unzip keepassxc-qt6_ver2.zip
$ cp -R keepassxc-qt6_ver2 keepassxc-qt6_ver2-orig
$ sed -i 's/set(QT_COMPONENTS Core Network Concurrent Gui Svg Widgets Test LinguistTools)/set(QT_COMPONENTS Core Network Concurrent Gui GuiPrivate Svg Widgets Test LinguistTools)/' keepassxc-qt6_ver2/CMakeLists.txt
$ diff -urNr keepassxc-qt6_ver2-orig keepassxc-qt6_ver2 > cmake.patch

then adding to keepassxc.spec

Patch0:         cmake.patch # line number 12
%autopatch -p1 # line number 113
$ rpmbuild -bs ~/rpmbuild/SPECS/keepassxc.spec
$ mock -n -r fedora-rawhide-x86_64 ~/rpmbuild/SRPMS/keepassxc-2.8.0-1.fc43.src.rpm

then build process proceeds way further and fails for other reasons

complete logs build.log root.log

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

Germano0 avatar Nov 26 '25 23:11 Germano0

I updated previous comment

Germano0 avatar Nov 27 '25 21:11 Germano0