Summary: | Cura does not start, update to required USE flags needed (RDEPEND="dev-qt/qtquickcontrols[widgets]") | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Henrik Johansson <henjo456> |
Component: | Current packages | Assignee: | 3D Printing Team <3dprint> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexxy, proxy-maint, tolstiyman |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/21150 https://bugs.gentoo.org/show_bug.cgi?id=793803 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Henrik Johansson
2020-07-07 14:29:10 UTC
I hit the same issue while trying to get cura working after recent breakage. IIRC the fix for me was to use "eselect python set" to set the default Python interpreter to 3.7, rather than 3.6 That fixed the issue and cura then started... or at least did after my fixes from https://github.com/gentoo/gentoo/pull/17679 were applied as well. I did an emerge -C cura, followed by a emerge --depclean, I followed the steps on github and resinstalled cura. I also removed all configuration files I could find in my user profile (~/.local/share/cura, ~/.cache/cura and ~/.config/cura) before starting cura. First I got ModuleNotFoundErrors for zeroconf and trimesh (that I found in a portage overlay). I don't know if these errors were related to any of the other things but now I'm back to the result I had in my first post. I get the same error using the cura-4.7.0 ebuild found in GitHub: $ cura /usr/lib/python3.7/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp [MainThread] UM.Application.initialize [144]: Initializing Ultimaker Cura [MainThread] UM.Application.initialize [145]: App Version 4.7.0 [MainThread] UM.Application.initialize [146]: Api Version 7.3.0 [MainThread] UM.Application.initialize [147]: Build type None [MainThread] UM.Resources.__initializeStoragePaths [446]: Initializing storage paths [MainThread] UM.Resources.__initializeStoragePaths [456]: Config storage path is /home/hrnick/.config/cura/4.7 [MainThread] UM.Resources.__initializeStoragePaths [464]: Data storage path is /home/hrnick/.local/share/cura/4.7 [MainThread] UM.Resources.__initializeStoragePaths [476]: Cache storage path is /home/hrnick/.cache/cura/4.7 [MainThread] UM.Resources._copyLatestDirsIfPresent [496]: Found config: ['/home/hrnick/.config/cura'] and data: ['/home/hrnick/.local/share/cura'] [MainThread] UM.Resources._copyLatestDirsIfPresent [500]: Latest config path: None and latest data path: None [MainThread] UM.Qt.QtApplication.initialize [144]: Preferences file not found, ignore and use default language 'en_US' [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/uranium/resources/bundled_packages/uranium.json [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/cura/resources/bundled_packages/cura.json Attribute Qt::AA_UseDesktopOpenGL must be set before QCoreApplication is created. [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [118]: Trying OpenGL context 4.1... [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [128]: Yay, we got at least OpenGL 4.1 core: 4.1 Core profile [MainThread] UM.Qt.QtApplication.initialize [173]: Detected most suitable OpenGL context version: 4.1 Core profile [MainThread] UM.Qt.QtApplication.initialize [180]: Initializing job queue ... [MainThread] UM.Qt.QtApplication.initialize [184]: Initializing version upgrade manager ... [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/uranium/resources/bundled_packages/uranium.json [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/cura/resources/bundled_packages/cura.json [MainThread] UM.PackageManager._loadManagementData [188]: User package management file /home/hrnick/.local/share/cura/4.7/packages.json doesn't exist, do nothing [MainThread] UM.PackageManager._saveManagementData [256]: Package management file /home/hrnick/.local/share/cura/4.7/packages.json was saved Cyclic dependency detected between "file:///usr/share/cura/resources/qml/Actions.qml" and "file:///usr/share/cura/resources/qml/Actions.qml" QQmlApplicationEngine failed to load component This was fixed for 4.6.1 and 4.7.0 by referencing the matching PV dependencies. Actually it's not. I still have the same problem and I had so trying the patches that were available in github and now the packages available in portage. I think we have been discussing two different problems here and the one I originally posted about has still not been addressed or solved. I have the same issue with cura-4.7.0 @tolstiy: We've tried to do some troubleshooting in the forums but unfortunately not managed to get anywhere really. If you haven't seen it feel free to take a look and come up with any ideas of what to check next that you can think of. Thanks! https://forums.gentoo.org/viewtopic.php?p=8477762 So where are we with this bug report? Is there anything we can do to troubleshoot this? I would be more than happy to help but I don't know where to go next. I would have expected "QQmlApplicationEngine failed to load component" to output what component that couldn't be loaded. Could I be on to something here? Is there any way of debugging that? Same thing with 4.9.0 emerged using updated ebuilds in a local repository. $ cura /usr/lib/python3.7/site-packages/UM/PluginRegistry.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp [MainThread] UM.Application.initialize [160]: Initializing Ultimaker Cura [MainThread] UM.Application.initialize [161]: App Version 4.9.0 [MainThread] UM.Application.initialize [162]: Api Version 7.5.0 [MainThread] UM.Application.initialize [163]: Build type ebuild [MainThread] UM.Resources.__initializeStoragePaths [446]: Initializing storage paths [MainThread] UM.Resources.__initializeStoragePaths [456]: Config storage path is /home/hrnick/.config/cura/4.9 [MainThread] UM.Resources.__initializeStoragePaths [464]: Data storage path is /home/hrnick/.local/share/cura/4.9 [MainThread] UM.Resources.__initializeStoragePaths [476]: Cache storage path is /home/hrnick/.cache/cura/4.9 [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/cura/resources/bundled_packages/cura.json [MainThread] UM.PackageManager.__init__ [54]: Found bundled packages JSON file: /usr/share/uranium/resources/bundled_packages/uranium.json Attribute Qt::AA_UseDesktopOpenGL must be set before QCoreApplication is created. [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [118]: Trying OpenGL context 4.1... [MainThread] UM.View.GL.OpenGLContext.detectBestOpenGLVersion [128]: Yay, we got at least OpenGL 4.1 core: 4.1 Core profile [MainThread] UM.Qt.QtApplication.initialize [175]: Detected most suitable OpenGL context version: 4.1 Core profile [MainThread] UM.Qt.QtApplication.initialize [182]: Initializing job queue ... [MainThread] UM.Qt.QtApplication.initialize [186]: Initializing version upgrade manager ... [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/cura/resources/bundled_packages/cura.json [MainThread] UM.PackageManager._loadManagementData [165]: Loaded bundled packages data from /usr/share/uranium/resources/bundled_packages/uranium.json [MainThread] UM.PackageManager._loadManagementData [192]: Loaded user packages management file from /home/hrnick/.local/share/cura/4.9/packages.json [MainThread] UM.PackageManager._saveManagementData [265]: Package management file /home/hrnick/.local/share/cura/4.9/packages.json was saved [MainThread] UM.PluginRegistry.initializeBeforePluginsAreLoaded [117]: Loading plugin configuration file '/home/hrnick/.config/cura/4.9/plugins.json' Cyclic dependency detected between "file:///usr/share/cura/resources/qml/Actions.qml" and "file:///usr/share/cura/resources/qml/Actions.qml" QQmlApplicationEngine failed to load component WARNING: Cannot find style "default" - fallback: "/usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop" Looks like its something between Python and Qt and/or PyQt itself. Maybe worth asking Qt project for tips, if you haven't already? (In reply to Michael 'veremitz' Everitt from comment #10) > Looks like its something between Python and Qt and/or PyQt itself. Maybe > worth asking Qt project for tips, if you haven't already? No I haven't. Thank you for pointing me in some direction, I've been lost quite a while with this one now. I tried upstream with the cura guys but they only support the cura AppImage. Thanks! Finally some progress, I've enabled the debug flag for a number of packages and then tried adding use flags to dependencies from the output. $ cat /etc/portage/package.use/cura # Debug dev-qt/qtcore debug dev-qt/qtxml debug dev-qt/qtnetwork debug dev-qt/qttest debug dev-qt/qtgui debug dev-qt/qtwidgets debug dev-qt/qtdeclarative debug dev-qt/qtsvg debug dev-qt/qtopengl debug dev-qt/qtquickcontrols debug dev-qt/qtgraphicaleffects debug dev-qt/qtquickcontrols2 debug dev-python/uranium debug dev-python/PyQt5 debug media-gfx/cura debug # Removes some error messages media-gfx/cura usb zeroconf # Try to find missing use flags #1, does not seem to help dev-qt/qtgui dbus dev-qt/qtwidgets gtk # Try to find missing use flags #2, "Fatal Python error: Aborted" when starting cura dev-qt/qtquickcontrols widgets dev-qt/qtquickcontrols2 widgets Now I get a clear error message, "Fatal Python error: Aborted" at least. https://pastebin.com/wyFAxjHN Solved! What is needed is the widgets USE flag to be enabled for dev-qt/qtquickcontrols. Also, I ran into the following problem so USE="debug" should not be set for PyQt5. https://github.com/Ultimaker/Cura/issues/8875 So what is needed is the following added to RDEPEND in the cura ebuild: dev-qt/qtquickcontrols[widgets] Also, something like the following (I'm not sure about the exact syntax here to block PyQt5 built with USE="debug"): !dev-python/PyQt5[debug] I suggest creating a cura-4.8.0-r1 ebuild with the changes above. It should probably be RDEPEND="dev-python/PyQt5[-debug]". :) $ diff -Naur cura-4.8.0.ebuild cura-4.8.0-r1.ebuild --- cura-4.8.0.ebuild 2021-05-23 19:09:28.555232520 +0200 +++ cura-4.8.0-r1.ebuild 2021-05-23 19:10:11.528566632 +0200 @@ -27,6 +27,9 @@ ~dev-python/uranium-${PV}[${PYTHON_SINGLE_USEDEP}] ~media-gfx/curaengine-${PV} ~media-gfx/fdm-materials-${PV} + dev-qt/qtquickcontrols[widgets] + dev-python/PyQt5[-debug] + $(python_gen_cond_dep ' dev-python/mypy[${PYTHON_MULTI_USEDEP}] dev-python/numpy[${PYTHON_MULTI_USEDEP}] That should do the trick! Is there any other way I could help to get this improvement into portage? I will include it in the PR I'm creating for 4.9.1 That's great news! I've kept track of the Fedora packages for the ebuilds I have created for a portage overlay. It seems as if some changes for python-3.9 have already gone into the cura source code (9105.patch) but that there are other fixes that could be useful like cura-9702.patch. https://src.fedoraproject.org/rpms/cura/c/2cdec4003addb81fca79344e592cc0b3c5c07f34?branch=rawhide (In reply to Henrik Johansson from comment #15) > $ diff -Naur cura-4.8.0.ebuild cura-4.8.0-r1.ebuild > --- cura-4.8.0.ebuild 2021-05-23 19:09:28.555232520 +0200 > +++ cura-4.8.0-r1.ebuild 2021-05-23 19:10:11.528566632 +0200 > @@ -27,6 +27,9 @@ > ~dev-python/uranium-${PV}[${PYTHON_SINGLE_USEDEP}] > ~media-gfx/curaengine-${PV} > ~media-gfx/fdm-materials-${PV} > + dev-qt/qtquickcontrols[widgets] > + dev-python/PyQt5[-debug] > + > $(python_gen_cond_dep ' > dev-python/mypy[${PYTHON_MULTI_USEDEP}] > dev-python/numpy[${PYTHON_MULTI_USEDEP}] > > That should do the trick! @Henrik, would you mind commenting in the PR on this patch? https://github.com/gentoo/gentoo/pull/21150#discussion_r646868714 Sorry for adding PyQt5 twice in the ebuild, I missed that in my local repository. But I have commented at GitHub now and hopefully that will make things clearer. Thanks for your work on this, I'm happy to see my year long struggle to get cura running finally finding it's way into portage together with a version bump. :) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a32c3cd7e73ebc0f1febc56abdf40944cc9ef506 commit a32c3cd7e73ebc0f1febc56abdf40944cc9ef506 Author: Mathy Vanvoorden <mathy@vanvoorden.be> AuthorDate: 2021-06-07 16:02:52 +0000 Commit: Dennis Lamm <expeditioneer@gentoo.org> CommitDate: 2021-06-10 17:40:52 +0000 media-gfx/cura: Version bump to 4.9.1 Closes: https://bugs.gentoo.org/793803 Closes: https://bugs.gentoo.org/731274 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Mathy Vanvoorden <mathy@vanvoorden.be> Closes: https://github.com/gentoo/gentoo/pull/21150 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org> media-gfx/cura/Manifest | 1 + media-gfx/cura/cura-4.9.1.ebuild | 71 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) |