SUMMARY *** Snap version of kdevelop crashes immediately at launch on ubuntu 22.04 *** STEPS TO REPRODUCE 1. Install latest snap (5.8.220403) 2. run with /snap/bin/kdevelop 3. crash OBSERVED RESULT Crashes every boot with the error: Cannot mix incompatible Qt library (5.15.3) with this library (5.15.5) Aborted (core dumped) EXPECTED RESULT Software should run as normal SOFTWARE/OS VERSIONS Linux/KDE Plasma: Ubuntu 22.04.1 ADDITIONAL INFORMATION
This is a packaging issue, in a package not provided by KDE. Please report this to Ubuntu.
Hmm... is there any where i can get the latest kdevelop that functions? i cant use flatpak because it cant get access to /usr/bin (for protobuf), and i cant use the snap because it doesnt run. the latest version from 22.04.1 repo is 21.08 and gets stuck when you try to copy files. The latest app images on kdevelop.org is 5.6.1. Is there any reason that there are no available downloads for latest versions anymore?
Hi, unfortunately KDevelop is relatively short-staffed and simply nobody built an AppImage for the latest release. It would of course be possible to do that, though.
Thanks for your report, there was a new KDevelop snap published yesterday which is likely the cause of your issue Please paste output of `snap list kdevelop` and `ldd /snap/kdevelop/current/usr/bin/kdevelop | grep Qt`
A good debug method would be to run: QT_DEBUG_PLUGINS=1 kdevelop 2>&1 | tee ~/kdevelop_log.txt and then to upload ~/kdevelop_log.txt here.
(In reply to Jonathan Riddell from comment #4) > Thanks for your report, there was a new KDevelop snap published yesterday > which is likely the cause of your issue > > Please paste output of `snap list kdevelop` > > and `ldd /snap/kdevelop/current/usr/bin/kdevelop | grep Qt` snap list kdevelop Name Version Rev Tracking Publisher Notes kdevelop 22.04.3 23 latest/stable kde✓ classic ldd /snap/kdevelop/current/usr/bin/kdevelop |grep Qt libQt5Quick.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Quick.so.5 (0x00007f7fec325000) libQt5Widgets.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f7febbf2000) libQt5Gui.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f7feb439000) libQt5DBus.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f7feb2aa000) libQt5Core.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f7feacb9000) libQt5Xml.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007f7fe8735000) libQt5QmlModels.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5QmlModels.so.5 (0x00007f7fe8294000) libQt5Qml.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Qml.so.5 (0x00007f7fe7da4000) libQt5Network.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007f7fe7bc2000) libQt5X11Extras.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5X11Extras.so.5 (0x00007f7fe7bba000) libQt5WebKitWidgets.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5 (0x00007f7fe6d76000) libQt5WebKit.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5WebKit.so.5 (0x00007f7fe3e7d000) libQt5QuickWidgets.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5QuickWidgets.so.5 (0x00007f7fe3b84000) libQt5PrintSupport.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5PrintSupport.so.5 (0x00007f7fe357a000) libQt5TextToSpeech.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5TextToSpeech.so.5 (0x00007f7fe33fd000) libQt5WaylandClient.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5WaylandClient.so.5 (0x00007f7fe3222000) libQt5WebChannel.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5WebChannel.so.5 (0x00007f7fe12dd000) libQt5Positioning.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Positioning.so.5 (0x00007f7fe1235000) libQt5Sensors.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Sensors.so.5 (0x00007f7fe11e9000) libQt5Svg.so.5 => /snap/kdevelop/current/usr/bin/../lib/x86_64-linux-gnu/libQt5Svg.so.5 (0x00007f7fe071a000)
Created attachment 151375 [details] Log output with debug plugins QT_DEBUG_PLUGINS=1 /snap/bin/kdevelop 2>&1 |tee ~/kdevelop_log.txt added
Well, it's loading plugins/libs from the host, which is clearly not a good idea. The snap has a few issues, which should hopefully be solved in a few hours: https://invent.kde.org/packaging/snapcraft-kde-applications/-/merge_requests/18 You can then try it from the candidate channel and check whether your problems have disappeared.
Try kdevelop from the candidate channel: sudo snap install --classic --candidate kdevelop or sudo snap refresh --candidate kdevelop
(In reply to Maximilian Federle from comment #9) > Try kdevelop from the candidate channel: > > sudo snap install --classic --candidate kdevelop > > or > > sudo snap refresh --candidate kdevelop does the same thing after that. snap info kdevelop name: kdevelop summary: Featureful, plugin-extensible IDE for C/C++ and other programming languages publisher: KDE✓ store-url: https://snapcraft.io/kdevelop license: unset description: | KDevelop is a Free and Open Source integrated development environment (IDE). It provides editing, navigation and debugging features for several programming languages, as well as integration with multiple build systems and version-control systems, using a plugin-based architecture. KDevelop has parser backends for C, C++ and Javascript/QML, with further external plugins supporting e.g. PHP or Python. commands: - kdevelop snap-id: vF7qHQJ3SMpORQX952464X4FQhbnh6gu tracking: latest/candidate refresh-date: today at 11:50 CDT channels: latest/stable: 22.04.3 2022-08-16 (23) 423MB classic latest/candidate: 5.8.220403 2022-08-17 (25) 576MB classic latest/beta: ↑ latest/edge: master+c90e0f5 2018-01-05 (17) 26MB - installed: 5.8.220403 (25) 576MB classic
Created attachment 151379 [details] Log output with debug plugins on candidate
seems like it's still loading qt plugins from /usr/lib . i checked the /snap/kdevelop for libqquick and the file doesnt exist. loaded library "/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so" Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/tags.so, metadata= { "IID": "org.kde.kio.slave.tags",
Huh, do you have any env variables set that could cause Qt to search in paths other than those set in QT_PLUGIN_PATH?
or maybe some qt.conf shenanigans?
Created attachment 151383 [details] environment
(In reply to Maximilian Federle from comment #14) > or maybe some qt.conf shenanigans? not that i know of. where would that even be? it seemed like the snap isnt packaging the qml plugins, so even with the new search paths you added, it still cant find them.
Oh, sorry, I misread the manifest. There's actually a stage package missing. I'll push an update to candidate.
Try again from candidate: https://invent.kde.org/packaging/snapcraft-kde-applications/-/commit/e811d8668947b5a017fda13a085e0b55fe000b29
That one runs. i am getting a couple warnings though, and file parsing is not functioning. kdevplatform.util: Path::init: invalid/unsupported Path encountered: http://clang-tidy kdevplatform.shell: Could not load plugin "kdevclangsupport" , it reported the error: "The clang builtin include path \"/build/snapcraft-kdevelop-3684784838bcd2597d92380370009ca3/parts/kdevelop/install/usr/lib/llvm-11/lib/clang/11.0.0/include\" is invalid (missing cpuid.h header).\nTry setting the KDEV_CLANG_BUILTIN_DIR environment variable manually to fix this.\nSee also: https://bugs.kde.org/show_bug.cgi?id=393779" Disabling the plugin now. kdevplatform.shell: formatter plugin "kdevastyle" supports unknown mimetype entry "text/x-objc++src" kdevplatform.shell: formatter plugin "kdevastyle" supports unknown mimetype entry "text/x-objchdr" kdevplatform.shell: formatter plugin "kdevcustomscript" supports unknown mimetype entry "text/x-objc++src" kdevplatform.shell: formatter plugin "kdevcustomscript" supports unknown mimetype entry "text/x-objchdr"
(In reply to Ian H from comment #19) > kdevplatform.shell: Could not load plugin "kdevclangsupport" , it reported > the error: "The clang builtin include path > \"/build/snapcraft-kdevelop-3684784838bcd2597d92380370009ca3/parts/kdevelop/ > install/usr/lib/llvm-11/lib/clang/11.0.0/include\" is invalid (missing > cpuid.h header).\nTry setting the KDEV_CLANG_BUILTIN_DIR environment > variable manually to fix this.\nSee also: > https://bugs.kde.org/show_bug.cgi?id=393779" Disabling the plugin now. Can you try setting KDEV_CLANG_BUILTIN_DIR to something like KDEV_CLANG_BUILTIN_DIR=/snap/kdevelop/current/usr/lib/llvm-11/lib/clang/11.0.0/include ? Or what else does file parsing refer to? I'm not using kdevelop, so my insight is limited.
(In reply to Maximilian Federle from comment #20) > (In reply to Ian H from comment #19) > > kdevplatform.shell: Could not load plugin "kdevclangsupport" , it reported > > the error: "The clang builtin include path > > \"/build/snapcraft-kdevelop-3684784838bcd2597d92380370009ca3/parts/kdevelop/ > > install/usr/lib/llvm-11/lib/clang/11.0.0/include\" is invalid (missing > > cpuid.h header).\nTry setting the KDEV_CLANG_BUILTIN_DIR environment > > variable manually to fix this.\nSee also: > > https://bugs.kde.org/show_bug.cgi?id=393779" Disabling the plugin now. > > Can you try setting KDEV_CLANG_BUILTIN_DIR to something like > KDEV_CLANG_BUILTIN_DIR=/snap/kdevelop/current/usr/lib/llvm-11/lib/clang/11.0. > 0/include ? > > Or what else does file parsing refer to? I'm not using kdevelop, so my > insight is limited. that looks good. parsing is working now
A possibly relevant merge request was started @ https://invent.kde.org/packaging/snapcraft-kde-applications/-/merge_requests/22
Git commit 678db4c68ce8d50f48695dd9778e5413dfadb61e by Maximilian Federle. Committed on 18/08/2022 at 13:51. Pushed by jriddell into branch 'Neon/release'. kdevelop: set KDEV_CLANG_BUILTIN_DIR M +1 -0 kdevelop/snapcraft.yaml https://invent.kde.org/packaging/snapcraft-kde-applications/commit/678db4c68ce8d50f48695dd9778e5413dfadb61e
hmm. getting these errors at runtime. (of my program) libGL error: MESA-LOADER: failed to open nouveau: libLLVM-12.so.1: cannot open shared object file: No such file or directory (search paths /snap/kdevelop/29/usr/lib/x86_64-linux-gnu/dri, suffix _dri) libGL error: failed to load driver: nouveau libGL error: MESA-LOADER: failed to open swrast: libLLVM-12.so.1: cannot open shared object file: No such file or directory (search paths /snap/kdevelop/29/usr/lib/x86_64-linux-gnu/dri, suffix _dri) libGL error: failed to load driver: swrast QGLXContext: Failed to create dummy context failed to acquire GL context to resolve capabilities, using defaults.. Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Maybe try adding the dri directory to LD_LIBRARY_PATH like so: LD_LIBRARY_PATH=/snap/kdevelop/current/usr/lib/x86_64-linux-gnu/dri kdevelop
(In reply to Maximilian Federle from comment #25) > Maybe try adding the dri directory to LD_LIBRARY_PATH like so: > > LD_LIBRARY_PATH=/snap/kdevelop/current/usr/lib/x86_64-linux-gnu/dri kdevelop nope. also the file it's complaining about is at /snap/kdevelop/current/usr/lib/x86_64-linux-gnu/libLLVM-12.so.1 using LD_LIBRARY_PATH= /snap/kdevelop/current/usr/lib/x86_64-linux-gnu/ gets past that error, but instead gives this one: /lib/x86_64-linux-gnu/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /snap/core20/current/lib/x86_64-linux-gnu/librt.so.1) using LD_LIBRARY_PATH="/snap/kdevelop/current/usr/lib/x86_64-linux-gnu/:/snap/kdevelop/current/usr/lib/x86_64-linux-gnu/dri" has the same error as above
Can you unset LIBGL_DRIVERS_PATH for your program's execution environment?
no change(In reply to Maximilian Federle from comment #27) > Can you unset LIBGL_DRIVERS_PATH for your program's execution environment? setting in the launch environment didnt do anything (still had the same path), but changing the env inside my code (before it's being used) yields this: libGL error: MESA-LOADER: failed to open nouveau: (null) (search paths , suffix _dri) libGL error: failed to load driver: nouveau libGL error: MESA-LOADER: failed to open swrast: (null) (search paths , suffix _dri) libGL error: failed to load driver: swrast QGLXContext: Failed to create dummy context failed to acquire GL context to resolve capabilities, using defaults.. Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) interestingly, doing the above code change also makes the old version do the same thing even though the LIBGL_DRIVERS_PATH was already empty LIBGL_DRIVERS_PATH Before put: "" LIBGL_DRIVERS_PATH after put: "" libGL error: MESA-LOADER: failed to open nouveau: (null) (search paths , suffix _dri) libGL error: failed to load driver: nouveau libGL error: MESA-LOADER: failed to open swrast: (null) (search paths , suffix _dri) libGL error: failed to load driver: swrast QGLXContext: Failed to create dummy context failed to acquire GL context to resolve capabilities, using defaults.. Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Which libGL is your executable linked against? ldd <your-app> | grep libGL
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fc50a579000) libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fc509d48000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fc50a4f1000)
would it be easier to set up a call of some kind? i have discord, skype,zoom
doesnt seem to be anything related to the build. running it through terminal (outside kdevelop) runs fine. it's only if i run through kdevelop that it gives me these errors.
You can join us/me on #kde-neon on IRC/Matrix. Your error has something to do with the snap environment, so much is clear. I'd have tried setting LIBGL_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri as my next idea.
(In reply to Ian H from comment #28) > libGL error: MESA-LOADER: failed to open nouveau: (null) (search paths , > suffix _dri) And I also suspect you didn't fully unset LIBGL_DRIVERS_PATH because there is still a space after search paths. If LIBGL_DRIVERS_PATH is truly unset, it should fall back to its install prefix + path.
no idea how to go to that irc. if you have the ability to build/run qt programs, i could also just give you a zipped qt program that you can work from. i think i tried at some point using a space instead of empty, but the result was functionally the same.
Yeah, why not. If you have something simple that works without a lot of setup.
Created attachment 151412 [details] Basic qt qml program This one doesnt give the same exact errors as we've been dealing with, but it also does not run on the snap ide.
Created attachment 151413 [details] Test project runs from kdevelop with these env variables overwritten So, as suspected, the env variables must be unset completely or overwritten with the correct ones. I couldn't quickly figure out how to do the former, but the latter (see screenshot) makes it launch. The question is now how to unset those two variables in kdevelop by default. Maybe a developer has an idea how to do this elegantly.
yea, i have absolutely no idea how to unset it through kdevelop. in the environment, setting the value to a blank just gets ignored (seem to have to explicitly unset the env) secondly, when you were running that little app i made, did you run into a Qt lib incompatibility? that one was giving me : Cannot mix incompatible Qt library (5.15.5) with this library (5.15.3) lastly, is it not possible for the snap to run exactly the same as it does normally? is there something weird going on in the snap or is kdevelop code itself somehow hard coding something? Normally i'd expect the snap to function identically to the original or the appimages. (i wish there were just more recent appimages made, would have saved me a bunch of time)
(1) I found an "okay" way: 1. In launch configuration: Check 'Use external terminal' 2. Input command: bash -c 'unset LIBGL_DRIVERS_PATH && unset QML2_IMPORT_PATH && %exe' (2) No such issues. You can debug this issue in the same way as we debugged kdeveloped: set QT_DEBUG_PLUGINS=1 (3) Well, the QML2_IMPORT_PATH and LIBGL_DRIVERS_PATH vars are necessary because the snap has its files separate from the host's files. This is necessary so that it doesn't crash because it's trying to mix libraries, as you could see when you first reported this bug. The problem is, your little demo app has been compiled on the host, with the hosts libraries. Therefore, those two variables confuse this app, and it tries to load incompatible mesa drivers or the QML components. To prevent that, we must unset them before continuing. I researched a way to get rid of QML2_IMPORT_PATH, but I've only found the aforementioned workaround for LIBGL_DRIVERS_PATH so far. The snap itself is still missing the qtquick2 controls package and some icon theme. As for the snap vs AppImage: The snap packaging is not developed by the upstream kdevelop project, but by a separate effort in the KDE Neon project: https://invent.kde.org/packaging/snapcraft-kde-applications/-/tree/Neon/release/kdevelop. I suspect it has seen little to no use in the past.
yep, found it by checking env differences. i have to unset QML2_IMPORT_PATH and LIBGL_DRIVERS_PATH in order to make all my programs run. Thanks for the help.
Git commit f32a8f04f1c172e93f9b2636516a075a65af9393 by Maximilian Federle. Committed on 19/08/2022 at 09:50. Pushed by jriddell into branch 'Neon/release'. kdevelop: patch OutputExecuteJob & KDevKonsoleView to support unsetting env variables https://invent.kde.org/packaging/snapcraft-kde-applications/-/issues/2 A +39 -0 kdevelop/patches/kdevelop_unset_env.patch M +11 -0 kdevelop/snapcraft.yaml https://invent.kde.org/packaging/snapcraft-kde-applications/commit/f32a8f04f1c172e93f9b2636516a075a65af9393
Git commit 353a94da6c0f6a74d8f690e79f53bc893596ec2a by Maximilian Federle. Committed on 19/08/2022 at 09:34. Pushed by jriddell into branch 'Neon/release'. kdevelop: Add missing deps, small fixes, add icons & qtwayland - add missing qml-module-qtquick-controls2 - replace QML2_IMPORT_PATH with qt.conf entry - add breeze theme - add qtwayland5 - fix icon M +8 -1 kdevelop/snapcraft.yaml https://invent.kde.org/packaging/snapcraft-kde-applications/commit/353a94da6c0f6a74d8f690e79f53bc893596ec2a
The snap now patches the console view & the executor class for the launch jobs to drop LIBGL_DRIVERS_PATH, and QML2_IMPORT_PATH has been removed from the environment altogether. Try the candidate snap when this job has finished: https://invent.kde.org/packaging/snapcraft-kde-applications/-/jobs/439467
looks good. ui icons are now working right. the dialog popups look like normal i can run the snap without adding any environment variables, and i can run my programs without unsetting any variables. Thank you!
lol, so apparently we still have an issue when using the debugger. (it seems to be still passing in the libgl drivers/qml path
if you can find where the GDB environment is constructed (probably somewhere in https://github.com/KDE/kdevelop/tree/master/plugins/gdb), we can also patch it out.
(In reply to Maximilian Federle from comment #47) > if you can find where the GDB environment is constructed (probably somewhere > in https://github.com/KDE/kdevelop/tree/master/plugins/gdb), we can also > patch it out. looks like it's in https://github.com/KDE/kdevelop/blob/master/plugins/gdb/debugsession.cpp line 167
Git commit 6ecc72a65610d23476a2b905476d929ed75dcb0a by Maximilian Federle. Committed on 19/08/2022 at 18:29. Pushed by mfederle into branch 'Neon/release'. kdevelop: Unset env variables in MIDebugger M +22 -2 kdevelop/patches/kdevelop_unset_env.patch https://invent.kde.org/packaging/snapcraft-kde-applications/commit/6ecc72a65610d23476a2b905476d929ed75dcb0a
you know the drill: https://invent.kde.org/packaging/snapcraft-kde-applications/-/jobs/440089
debugging now working.