pythoncmakeqt5kde-plasmakdevelop

KDevelop Python Support not compiling


I have already installed kdevelop and all it's packages from dnf but they don't kdev-python from https://invent.kde.org/kdevelop/kdev-python. So I am trying it to build from source. I have all the dependency but I am getting error when I type command 'cmake ..'. I have installed all the dependency using dnf. Also I have python3 installed. I am following instruction from INSTALL file of repository.

Following is output of command cmake .. -DCMAKE_BUILD_TYPE=debug -DKDE4_BUILD_TESTS=true:-

-- The following OPTIONAL packages have been found:

 * PythonInterp (required version >= 3.11)

-- The following REQUIRED packages have been found:

 * ECM (required version >= 5.78.0)
 * PythonLibs (required version == 3.11)
 * Qt5Test
 * Qt5 (required version >= 5.15.0)
 * KF5 (required version >= 5.78.0)
 * KF5Service (required version >= 5.100.0)
 * KF5Completion (required version >= 5.100.0)
 * KF5ItemViews (required version >= 5.100.0)
 * KF5JobWidgets (required version >= 5.100.0)
 * KF5Solid (required version >= 5.100.0)
 * KF5Sonnet (required version >= 5.100.0)
 * Gettext
 * KF5I18n (required version >= 5.100.0)
 * KF5TextWidgets (required version >= 5.100.0)
 * KF5CoreAddons (required version >= 5.100.0)
 * KF5Auth (required version >= 5.100.0)
 * KF5Codecs (required version >= 5.100.0)
 * Qt5Widgets (required version >= 5.15.2)
 * KF5WidgetsAddons (required version >= 5.100.0)
 * KF5ConfigWidgets (required version >= 5.100.0)
 * KF5XmlGui (required version >= 5.100.0)
 * KF5Parts (required version >= 5.100.0)
 * Qt5Gui (required version >= 5.15.2)
 * KF5SyntaxHighlighting (required version >= 5.100.0)
 * KF5TextEditor (required version >= 5.78.0)
 * Qt5Core (required version >= 5.15.2)
 * KF5ThreadWeaver (required version >= 5.78.0)
 * KDevPlatform (required version >= 5.7)
 * KDevelop (required version >= 5.7)

-- Configuring done
CMake Error at /usr/share/ECM/modules/ECMAddTests.cmake:97 (target_link_libraries):
  Target "pyasttest" links to:

    KDev::Tests

  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.

Call Stack (most recent call first):
  parser/tests/CMakeLists.txt:4 (ecm_add_test)


CMake Error at duchain/tests/CMakeLists.txt:17 (target_link_libraries):
  Target "pyduchaintest" links to:

    KDev::Tests

  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 duchain/tests/CMakeLists.txt:25 (target_link_libraries):
  Target "duchainbench" links to:

    KDev::Tests

  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 /usr/share/ECM/modules/ECMAddTests.cmake:97 (target_link_libraries):
  Target "pycompletiontest" links to:

    KDev::Tests

  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.

Call Stack (most recent call first):
  codecompletion/tests/CMakeLists.txt:5 (ecm_add_test)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Solution

  • This is caused by your distro (Fedora?) building KDevelop with its self-tests disabled by -DBUILD_TESTING=OFF - a non-standard configuration not recommended by upstream. kdev-python depends on KDevelop's self-test code for its own self-tests.

    It might help to install kdevelop-devel or kdevelop-libs if you haven't already, they exist but I'm not familiar with Fedora packaging.

    Otherwise you can hack around this by building kdev-python with its tests disabled in turn: cmake .. -DCMAKE_BUILD_TYPE=debug -DBUILD_TESTING=OFF.

    A better solution would be to build and install KDevelop locally without -DBUILD_TESTING=OFF before building kdev-python.

    P.S. I don't know where you found -DKDE4_BUILD_TESTS=true but don't use it, it's obsolete and won't help you.