Bug 478765

Summary: dolphin-plugins-git Target "fileviewgitplugin" links to: KF6::XmlGui
Product: [Applications] dolphin Reporter: Mike Lothian <mike>
Component: plugins: gitAssignee: Sebastian Dörner <sebastian>
Status: RESOLVED FIXED    
Severity: normal CC: kfm-devel, meven29, mkyral
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 24.04
Sentry Crash Report:

Description Mike Lothian 2023-12-20 11:00:35 UTC
When compiling this I get the error:

 * Build directory  (BUILD_DIR):     "/var/tmp/portage/kde-apps/dolphin-plugins-git-9999/work/dolphin-plugins-git-9999_build"
cmake -C /var/tmp/portage/kde-apps/dolphin-plugins-git-9999/work/dolphin-plugins-git-9999_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DQT_MAJOR_VERSION=6 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DKDE_INSTALL_DOCBUNDLEDIR=/usr/share
/help -DBUILD_git=ON -DBUILD_bazaar=OFF -DBUILD_dropbox=OFF -DBUILD_hg=OFF -DBUILD_mountiso=OFF -DBUILD_svn=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/kde-apps/dolphin-plugins-git-9999/work/dolphin-plugins-git-9999_bu
ild/gentoo_toolchain.cmake /var/tmp/portage/kde-apps/dolphin-plugins-git-9999/work/dolphin-plugins-git-9999
loading initial cache file /var/tmp/portage/kde-apps/dolphin-plugins-git-9999/work/dolphin-plugins-git-9999_build/gentoo_common_config.cmake
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/llvm/17/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/llvm/17/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_DATE_TIME
-- Performing Test HAVE_DATE_TIME - Success
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE  
-- Found OpenGL: /usr/lib64/libOpenGL.so   
-- Found WrapOpenGL: TRUE  
-- Found XKB: /usr/lib64/libxkbcommon.so (found suitable version "1.6.0", minimum required is "0.5.0") 
-- Found WrapVulkanHeaders: /usr/include  
-- Found Gettext: /usr/bin/msgmerge (found version "0.22.4") 
-- Found KF6I18n: /usr/lib64/cmake/KF6I18n/KF6I18nConfig.cmake (found version "5.247.0") 
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found KF6KIO: /usr/lib64/cmake/KF6KIO/KF6KIOConfig.cmake (found version "5.247.0") 
-- Found KF6TextWidgets: /usr/lib64/cmake/KF6TextWidgets/KF6TextWidgetsConfig.cmake (found version "5.247.0") 
-- Found KF6CoreAddons: /usr/lib64/cmake/KF6CoreAddons/KF6CoreAddonsConfig.cmake (found version "5.247.0") 
-- Found KF6: success (found suitable version "5.247.0", minimum required is "5.240.0") found components: I18n KIO TextWidgets CoreAddons 
-- The following OPTIONAL packages have been found:

 * Qt6Core5Compat (required version >= 6.5.0)
 * OpenGL
 * Vulkan
 * Qt6CoreTools (required version >= 6.6.1)
 * Qt6DBusTools (required version >= 6.6.1)
 * Qt6QmlTools (required version >= 6.6.1)
 * Qt6WidgetsTools (required version >= 6.6.1)
 * XKB (required version >= 0.5.0), XKB API common to servers and clients., <http://xkbcommon.org>
 * WrapVulkanHeaders
 * Qt6GuiTools (required version >= 6.6.1)
 * freetype
 * Freetype
 * PkgConfig
 * Fontconfig

-- The following REQUIRED packages have been found:

 * ECM (required version >= 5.240.0)
 * Qt6 (required version >= 6.5.0)
 * Gettext
 * KF6I18n (required version >= 5.246.0)
 * KF6TextWidgets (required version >= 5.240.0)
 * KF6 (required version >= 5.240.0)
 * Qt6Core (required version >= 6.5.0)
 * Qt6Widgets (required version >= 6.5.0)
 * DolphinVcs, the Dolphin version control plugin library, <https://commits.kde.org/dolphin>
   Provides the version control plugin interface.

-- The following OPTIONAL packages have not been found:

 * Qt6QmlCompilerPlusPrivate

-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C               -O3 -pipe -flto=thin -march=native -fno-common -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wmissing-format-attribute -Wwrite-strings -Werror=implicit-function-declaration
C++             -O3 -pipe -flto=thin -march=native -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -pedantic -Wzero-as-null-pointer-constant -fdiagnostics-color=always
Linker flags:
Executable      -Wl,--enable-new-dtags -O3 -pipe -flto=thin -march=native -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -Wl,--thinlto-jobs=16 -Wl,--build-id=sha1
Module          -Wl,--no-undefined -Wl,--enable-new-dtags -O3 -pipe -flto=thin -march=native -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -Wl,--thinlto-jobs=16 -Wl,--build-id=sha1
Shared          -Wl,--no-undefined -Wl,--enable-new-dtags -O3 -pipe -flto=thin -march=native -Wl,-O1 -Wl,--as-needed -fuse-ld=lld -Wl,--thinlto-jobs=16 -Wl,--build-id=sha1

-- Configuring done (2.6s)
CMake Error at git/CMakeLists.txt:27 (target_link_libraries):
  Target "fileviewgitplugin" links to:

    KF6::XmlGui

  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.


kxmlgui is installed:


 * Contents of kde-frameworks/kxmlgui-9999:
/usr
/usr/include
/usr/include/KF6
/usr/include/KF6/KXmlGui
/usr/include/KF6/KXmlGui/KAboutApplicationDialog
/usr/include/KF6/KXmlGui/KAboutPluginDialog
/usr/include/KF6/KXmlGui/KActionCategory
/usr/include/KF6/KXmlGui/KActionCollection
/usr/include/KF6/KXmlGui/KBugReport
/usr/include/KF6/KXmlGui/KEditToolBar
/usr/include/KF6/KXmlGui/KHelpMenu
/usr/include/KF6/KXmlGui/KKeySequenceWidget
/usr/include/KF6/KXmlGui/KMainWindow
/usr/include/KF6/KXmlGui/KShortcutWidget
/usr/include/KF6/KXmlGui/KShortcutsDialog
/usr/include/KF6/KXmlGui/KShortcutsEditor
/usr/include/KF6/KXmlGui/KToggleToolBarAction
/usr/include/KF6/KXmlGui/KToolBar
/usr/include/KF6/KXmlGui/KToolTipHelper
/usr/include/KF6/KXmlGui/KUndoActions
/usr/include/KF6/KXmlGui/KXMLGUIBuilder
/usr/include/KF6/KXmlGui/KXMLGUIClient
/usr/include/KF6/KXmlGui/KXMLGUIFactory
/usr/include/KF6/KXmlGui/KXmlGuiWindow
/usr/include/KF6/KXmlGui/kaboutapplicationdialog.h
/usr/include/KF6/KXmlGui/kaboutplugindialog.h
/usr/include/KF6/KXmlGui/kactioncategory.h
/usr/include/KF6/KXmlGui/kactioncollection.h
/usr/include/KF6/KXmlGui/kbugreport.h
/usr/include/KF6/KXmlGui/kedittoolbar.h
/usr/include/KF6/KXmlGui/khelpmenu.h
/usr/include/KF6/KXmlGui/kkeysequencewidget.h
/usr/include/KF6/KXmlGui/kmainwindow.h
/usr/include/KF6/KXmlGui/kshortcutsdialog.h
/usr/include/KF6/KXmlGui/kshortcutseditor.h
/usr/include/KF6/KXmlGui/kshortcutwidget.h
/usr/include/KF6/KXmlGui/ktoggletoolbaraction.h
/usr/include/KF6/KXmlGui/ktoolbar.h
/usr/include/KF6/KXmlGui/ktooltiphelper.h
/usr/include/KF6/KXmlGui/kundoactions.h
/usr/include/KF6/KXmlGui/kxmlgui_export.h
/usr/include/KF6/KXmlGui/kxmlgui_version.h
/usr/include/KF6/KXmlGui/kxmlguibuilder.h
/usr/include/KF6/KXmlGui/kxmlguiclient.h
/usr/include/KF6/KXmlGui/kxmlguifactory.h
/usr/include/KF6/KXmlGui/kxmlguiwindow.h
/usr/lib64
/usr/lib64/cmake
/usr/lib64/cmake/KF6XmlGui
/usr/lib64/cmake/KF6XmlGui/KF6XmlGuiConfig.cmake
/usr/lib64/cmake/KF6XmlGui/KF6XmlGuiConfigVersion.cmake
/usr/lib64/cmake/KF6XmlGui/KF6XmlGuiTargets-relwithdebinfo.cmake
/usr/lib64/cmake/KF6XmlGui/KF6XmlGuiTargets.cmake
/usr/lib64/libKF6XmlGui.so -> libKF6XmlGui.so.6
/usr/lib64/libKF6XmlGui.so.5.247.0
/usr/lib64/libKF6XmlGui.so.6 -> libKF6XmlGui.so.5.247.0
/usr/share
/usr/share/doc
/usr/share/doc/kxmlgui-9999
/usr/share/doc/kxmlgui-9999/README.md.bz2
/usr/share/locale
/usr/share/locale/en_GB
/usr/share/locale/en_GB/LC_MESSAGES
/usr/share/locale/en_GB/LC_MESSAGES/kxmlgui6.mo
/usr/share/qlogging-categories6
/usr/share/qlogging-categories6/kxmlgui.categories
/usr/share/qlogging-categories6/kxmlgui.renamecategories
Comment 1 Mike Lothian 2023-12-20 11:05:27 UTC
Adding XmlGui to the CMakeLists.txt gets things working here:

find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS

    I18n
    KIO
    TextWidgets
    CoreAddons
    XmlGui

)
Comment 2 Marian Kyral 2024-01-11 12:30:18 UTC
This is an issue in Gentoo ebuild, when it removes unused modules:

src_prepare() {
        ecm_src_prepare
        # solid, qtdbus only required by mountiso
        ecm_punt_qt_module DBus
        ecm_punt_kf_module Solid
        # kxmlgui, qtnetwork only required by dropbox
        ecm_punt_qt_module Network
        ecm_punt_kf_module XmlGui
        # delete non-${PN} translations
        find po -type f -name "*po" -and -not -name "*${MY_PLUGIN_NAME}plugin" -delete || die
}
Comment 3 Mike Lothian 2024-01-16 12:24:50 UTC
fileviewgitplugin.so

 0x0000000000000001 (NEEDED)             Shared library: [libKF6TextWidgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libdolphinvcs.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Core5Compat.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6KIOGui.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6KIOCore.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6JobWidgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6CoreAddons.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6I18n.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6ConfigGui.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6ConfigCore.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Widgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Gui.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Core.so.6]                                                                                                                                                                                  |
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]                                                                                                                                                                                   |
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

makefileactions.so

 0x0000000000000001 (NEEDED)             Shared library: [libKF6KIOWidgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6KIOGui.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6KIOCore.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6JobWidgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6CoreAddons.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Widgets.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6I18n.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libKF6ConfigCore.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Gui.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libQt6Core.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

I've started on a proper fix here: https://invent.kde.org/sdk/dolphin-plugins/-/merge_requests/50

I've been on holiday so I'll sort out the changes requested tonight