void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.59k stars 2.15k forks source link

Uranium (and therefore cura) is broken with Python 3.12 #46808

Open oldlaptop opened 1 year ago

oldlaptop commented 1 year ago

Is this a new report?

Yes

System Info

Void 6.5.7_1 x86_64-musl AuthenticAMD notuptodate rrFFFFFF

Package(s) Affected

Uranium-4.13.1_3 cura-4.13.1_3

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

cura should (presumably) launch.

Actual behaviour

cura fails to launch with the following traceback:

$ cura
Traceback (most recent call last):
  File "/usr/bin/cura", line 27, in <module>
    from cura.CrashHandler import CrashHandler
  File "/usr/lib/python3.12/site-packages/cura/CrashHandler.py", line 29, in <module>
    from UM.Application import Application
  File "/usr/lib/python3.12/site-packages/UM/Application.py", line 9, in <module>
    from UM.Controller import Controller
  File "/usr/lib/python3.12/site-packages/UM/Controller.py", line 4, in <module>https://github.com/Ultimaker/Uranium/issues/765
    from UM.Scene.Scene import Scene
  File "/usr/lib/python3.12/site-packages/UM/Scene/Scene.py", line 13, in <module>
    from UM.Mesh.ReadMeshJob import ReadMeshJob  # To reload a mesh when its file was changed.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/UM/Mesh/ReadMeshJob.py", line 8, in <module>
    from UM.FileHandler.ReadFileJob import ReadFileJob
  File "/usr/lib/python3.12/site-packages/UM/FileHandler/ReadFileJob.py", line 5, in <module>
    from UM.FileHandler.FileHandler import FileHandler
  File "/usr/lib/python3.12/site-packages/UM/FileHandler/FileHandler.py", line 12, in <module>
    from UM.PluginRegistry import PluginRegistry
  File "/usr/lib/python3.12/site-packages/UM/PluginRegistry.py", line 4, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

The imp module was removed in Python 3.12. It doesn't appear upstream has fixed this yet.

Steps to reproduce

Install cura and attempt to launch it.

destructatron commented 1 year ago

Adding to the list of broken packages here, the Orca screen reader is also affected by this.

oldlaptop commented 1 year ago

See also PR 915 upstream.

Vinfall commented 1 year ago

I attempted to update Uranium to 5.5.0 ,added PR patch and removed the old patch (due to build error), but it failed to build somehow:

./xbps-src pkg Uranium
=> xbps-src: updating repositories for host (x86_64-musl)...
[*] Updating repository `https://repo-default.voidlinux.org/current/musl/bootstrap/x86_64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/musl/x86_64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/musl/nonfree/x86_64-musl-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/musl/debug/x86_64-musl-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> Uranium-5.5.0_1: removing autodeps, please wait...
=> Uranium-5.5.0_1: building with [cmake] for x86_64-musl...
   [host] python3-3.12.0_1: found (https://repo-default.voidlinux.org/current/musl)
   [host] gettext-0.21_4: found (https://repo-default.voidlinux.org/current/musl)
   [host] cmake-bootstrap-3.27.6_1: found (https://repo-default.voidlinux.org/current/musl/bootstrap)
   [host] ninja-1.11.1_4: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] libArcus-python3-4.13.1_7: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-PyQt5-opengl-5.15.9_2: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-PyQt5-quick-5.15.9_2: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-PyQt5-svg-5.15.9_2: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-numpy-stl-2.17.1_3: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-scipy-1.11.3_1: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] qt5-quickcontrols-5.15.7+20221119_7: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] qt5-quickcontrols2-5.15.7+20221119_7: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-shapely-2.0.1_2: found (https://repo-default.voidlinux.org/current/musl)
   [runtime] python3-cryptography-41.0.5_1: found (https://repo-default.voidlinux.org/current/musl)
=> Uranium-5.5.0_1: installing host dependencies: python3-3.12.0_1 gettext-0.21_4 cmake-bootstrap-3.27.6_1 ninja-1.11.1_4 ...
=> Uranium-5.5.0_1: running do-patch hook: 00-patches ...
=> Uranium-5.5.0_1: patching: deprecated-imp-module.patch.
=> Uranium-5.5.0_1: running pre-configure hook: 00-gnu-configure-asneeded ...
=> Uranium-5.5.0_1: running pre-configure hook: 01-override-config ...
=> Uranium-5.5.0_1: running pre-configure hook: 02-script-wrapper ...
=> Uranium-5.5.0_1: running do_configure ...
CMake Warning (dev) at CMakeLists.txt:6 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:14 (include):
  include could not find requested file:

    UraniumTranslationTools

CMake Error at CMakeLists.txt:20 (CREATE_TRANSLATION_TARGETS):
  Unknown CMake command "CREATE_TRANSLATION_TARGETS".

-- Configuring incomplete, errors occurred!
=> ERROR: Uranium-5.5.0_1: do_configure: 'CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" cmake ${cmake_args} ${configure_args} ${LIBS:+-DCMAKE_C_STANDARD_LIBRARIES="$LIBS"} ${LIBS:+-DCMAKE_CXX_STANDARD_LIBRARIES="$LIBS"} ${wrksrc}/${build_wrksrc}' exited with 1
=> ERROR:   in do_configure() at common/build-style/cmake.sh:76
zlice commented 1 year ago

I attempted to update Uranium to 5.5.0

https://github.com/Ultimaker/Uranium/issues/880

https://github.com/Ultimaker/conan-ultimaker-index/blob/main/recipes/translationextractor/conanfile.py

Looks like 5.0+ ditched cmake but kept cmake files?

zlice commented 1 year ago

started stealing from alpine's 5.2.2 build (which is cmake btw), but protobuf needs bumped to 25 and it touches a couple dozen packages...

ya not protobuf, just a bunch of mixed version and packages that need to build together

haunma commented 5 months ago

Just a note that this problem is still present for me with the latest cura in the repos (still at 4.13, a lot older than the latest 5.7). I am having to use the AppImage instead, unfortunately. Is the packaged version of cura abandoned?

zlice commented 5 months ago

Since 5.0 they started using conan, which is a python type environment https://github.com/Ultimaker/Cura/wiki/Running-Cura-from-Source#system-requirements

@karl-nilsson are you still maintaining this or using void?

karl-nilsson commented 5 months ago

@zlice awhile back, I attempted to update the cura package to accommodate their new build flow. I haven't had the time or motivation since then, so I'm happy to hand of maintainership if someone else is interested.

classabbyamp commented 2 months ago

doesn't seem too bad? https://git.alpinelinux.org/aports/tree/testing/cura/APKBUILD + 4 patches