How to get Kdevelop to work properly

Asked by Wang Yu

Hello,

As mentioned in my previous question, I am going to use Kdevelop to write and debug my own constitutive model. In fact I already have an understanding of the basic framework of yade, but the Kdevelop I installed according to the tutorial does not work properly.

I've been using yade in Ubuntu 18.06 for the past two years. Whether I follow the ‘’sudo apt-get install kdevelop” command or directly download the packaged kdevelop.AppImage file on the official website, errors will occur. The code in the project I imported cannot find the existing library, and the terminal reports errors of "failed to parse translation unit" (although kdevelop will report a lot of errors, but I guess many can be ignored).

I tried a lot but couldn't solve it, so I guess it might be a version or dependency library issue. I installed ubuntu16.04 in vmware, and executed ''sudo apt-get install kdevelop' and things seemed to get better. The code can find its library, but the classes in some code files don't seem to be defined correctly (the code is absolutely correct, but Kdevelop doesn't seem to treat it as a class), so that their mutual references are still unrecognized.

Eventually I still want to be able to debug yade in Ubuntu 18.06. Can someone explain why? Do I have to install Kdevelop from source for it to work?

Thanks,
Yu

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Wang Yu
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

"Whether I follow the ‘’sudo apt-get install kdevelop” command ... errors will occur."

Which errors? Please provide the full text!

Why are you using old releases of the operating system? It could be worth trying to use Ubuntu 20.04 or 22.04 instead of the obsolete 16.04 release.

Revision history for this message
Wang Yu (wangyu93) said (last edit ):
#2

Hi, Manfred

I'm sorry I didn't express clearly.

I was using Ubuntu 18.04 in the past, I guessed whether kdevelop would adapt better in the old version, so I used the 16.04. But as you said, I just installed Kdevelop 5.5.0 in Ubuntu 20.04 with the 'sudo apt-get install kdevelop' command. When I try to import the yade-trunk project, I still get error:

----in the terminal----
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Yaru/16x16/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Yaru/22x22/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Yaru/24x24/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Yaru/32x32/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Yaru/48x48/legacy/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Yaru/256x256@2x/apps/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Yaru/256x256@2x/mimetypes/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Yaru/scalable/mimetypes/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/8x8/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/16x16/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/16x16/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/22x22/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/24x24/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/24x24/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/32x32/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/32x32/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/48x48/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/48x48/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/64x64/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/64x64/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/96x96/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/96x96/ui/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/256x256/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/512x512/legacy/"
Invalid Context= "Legacy" line for icon theme: "/usr/share/icons/Adwaita/scalable/legacy/"
Invalid Context= "UI" line for icon theme: "/usr/share/icons/Adwaita/scalable/ui/"
Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdevplatform.util: Path::init: invalid/unsupported Path encountered: http://clang-tidy
kdevelop.plugins.konsole: Failed to load 'konsolepart' plugin
kdevplatform.shell: Could not load plugin "kdevkonsoleview" , it reported the error: "Failed to load 'konsolepart' plugin" Disabling the plugin now.
kdevplatform.shell: Could not load plugin "kdevperforce" , it reported the error: "The variable P4CONFIG is not set. Is perforce installed on the system?" Disabling the plugin now.
qrc:/qml/Develop.qml:139:21: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:87:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/area_code.qml:63:9: QML Heading: Binding loop detected for property "font.pointSize"
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
qrc:/qml/storage.js:24: TypeError: Cannot call method 'openDatabaseSync' of undefined
Couldn't start kuiserver from org.kde.kuiserver.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kuiserver was not provided by any .service files")
kdevplatform.shell: Could not load plugin "KDevNinjaBuilder" , it reported the error: "Unable to find ninja executable. Is it installed on the system?" Disabling the plugin now.
kdevplatform.shell: Could not load plugin "KDevMesonManager" , it reported the error: "Meson builder error: Failed to acquire the Ninja builder plugin" Disabling the plugin now.
kdevplatform.shell: Could not load plugin "kdevbazaar" , it reported the error: "Unable to find Bazaar (bzr) executable. Is it installed on the system?" Disabling the plugin now.
kdevelop.plugins.git: couldn't find the git root for QUrl("file:///home/wangyu/yade2022/trunk-2022")
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code 4
kdevelop.plugins.clang: (start KDevelop with `KDEV_CLANG_DISPLAY_DIAGS=1 kdevelop` to see more diagnostics)
kdevelop.plugins.clang: Failed to parse translation unit: "/home/wangyu/yade2022/trunk-2022/pkg/common/Gl1_Primitives.cpp"
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code 4
kdevelop.plugins.clang: (start KDevelop with `KDEV_CLANG_DISPLAY_DIAGS=1 kdevelop` to see more diagnostics)
kdevelop.plugins.clang: Failed to parse translation unit: "/home/wangyu/yade2022/trunk-2022/pkg/dem/ViscoelasticCapillarPM.cpp"
........
........
........
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
sonnet.plugins.hspell: HSpellDict::HSpellDict: Init failed

--------------------------------------
I didn't post the error message before because there are too many errors.
This time, I guess that the key to the problem is these lines:

-----
kdevelop.plugins.clang: clang_parseTranslationUnit2 return with error code 4
kdevelop.plugins.clang: (start KDevelop with `KDEV_CLANG_DISPLAY_DIAGS=1 kdevelop` to see more diagnostics)
kdevelop.plugins.clang: Failed to parse translation unit: "/home/wangyu/yade2022/trunk-2022/pkg/dem/ViscoelasticCapillarPM.cpp"
-------

These lines are repeated many times and appear when parsing and translating each source code file.

I'm still very confused, and I'd like to know how you installed kdevelop.

Thanks a lot
Yu

Revision history for this message
Robert Caulk (rcaulk) said :
#3

KDevelop is obsolete.

Consider using VSCode instead.

Revision history for this message
Wang Yu (wangyu93) said :
#4

Hi, Robert

Actually I have seen that you mentioned VSCode in your answer to this question [1].

I'd love to use VSCode for code writing and debugging. In fact, I already use VSCode in Windows, but just to read code. I don't know how to use VSCode in Ubuntu to debug Yade. Can you give me some guidance?

Thanks a lot
Yu

[1]https://answers.launchpad.net/yade/+question/702251

Revision history for this message
Manfred Hampl (m-hampl) said :
#5
Revision history for this message
Robert Caulk (rcaulk) said :
#6
Revision history for this message
Wang Yu (wangyu93) said :
#7

Thank you very much. VSCODE is very easy to use