Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. KDE6 CMake - Kate plugin trying to link in wrong path

KDE6 CMake - Kate plugin trying to link in wrong path

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 330 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    grmpf
    wrote on last edited by grmpf
    #1

    Hi,
    A while ago I made a plugin for the Kate text editor. This was done when my machine was still running Qt5/KDE5. Since my Manjaro LInux was updated to KDE6 I am in the process of updating this plugin to Qt6, but upon building I am running in a linking error. Obviously the INSTALL_NAMESPACE is interpreted/used differently in Qt6.

    The build structure looks like this:
    In $project_dir I run:

    rm -rf build/
    cmake -B build/ -D CMAKE_BUILD_TYPE=Release -D QT_MAJOR_VERSION=6
    cmake --build build/
    

    This was running flawless with Qt5 and would create a $plugin_name.so in the build folder. A subsequent

    sudo cmake --install build/
    

    would then copy the plugin .so to

    /usr/lib/qt/plugins/ktexteditor/
    

    After updating my CMakeLists.txt to use Qt6 I get this error:

    [  0%] Built target kate_gpg_plugin_autogen_timestamp_deps
    [ 14%] Automatic MOC for target kate_gpg_plugin
    [ 14%] Built target kate_gpg_plugin_autogen
    [ 28%] Building CXX object CMakeFiles/kate_gpg_plugin.dir/kate_gpg_plugin_autogen/mocs_compilation.cpp.o
    [ 42%] Building CXX object CMakeFiles/kate_gpg_plugin.dir/kate_gpg_plugin.cpp.o
    [ 57%] Building CXX object CMakeFiles/kate_gpg_plugin.dir/GPGKeyDetails.cpp.o
    [ 71%] Building CXX object CMakeFiles/kate_gpg_plugin.dir/GPGMeWrapper.cpp.o
    [ 85%] Linking CXX shared module /ktexteditor/kate_gpg_plugin.so
    /usr/bin/ld: cannot open output file /ktexteditor/kate_gpg_plugin.so: No such file or directory
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/kate_gpg_plugin.dir/build.make:153: /ktexteditor/kate_gpg_plugin.so] Error 1
    make[1]: *** [CMakeFiles/Makefile2:653: CMakeFiles/kate_gpg_plugin.dir/all] Error 2
    make: *** [Makefile:146: all] Error 2
    

    Where is the "/ktexteditor/" coming from? And is there any way to not use the install folder as the build folder?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I would recommend contacting the Kate developers. They will have more knowledge about the plugin building and installation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        grmpf
        wrote on last edited by grmpf
        #3

        After a short discussion in the KDE bug tracker I have found the magic CMake lines and order to make it build with Qt6. Apparently there were some changes to the "kcoreaddons_add_plugin()" CMake call that now requires the KF_DEP_VERSION variable to be set in the very beginning (this wasn't so crucial in Qt5).

        1 Reply Last reply
        1
        • G grmpf has marked this topic as solved on
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #4

          Thanks for the feedback ! :-)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved