Aylur / ags

A customizable and extensible shell
GNU General Public License v3.0
1.74k stars 95 forks source link

[Arch Linux] ModuleNotFoundError: No module named 'mesonbuild' #404

Closed notjl closed 2 months ago

notjl commented 2 months ago

As the title suggest, I'm having trouble installing ags on Arch Linux.

I have tried re-installing meson and meson-python but it still wouldn't install.

exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_pie=true -D python.bytecompile=1 build --libdir lib/ags -Dbuild_types=true
Traceback (most recent call last):
  File "/usr/bin/meson", line 5, in <module>
    from mesonbuild.mesonmain import main
ModuleNotFoundError: No module named 'mesonbuild'
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: aylurs-gtk-shell-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
aylurs-gtk-shell - exit status 4

As a last ditch effort I tried making a Python Virtual Environment where I installed meson through PIP. I got through the ModuleNotFoundError: No module named 'mesonbuild' error but it came with another error which is ModuleNotFoundError: No module named 'giscanner._giscanner'

[16/22] Generating subprojects/gutils/GUtils-1.0.gir with a custom command (wrapped by meson to set env)
FAILED: subprojects/gutils/GUtils-1.0.gir 
env PKG_CONFIG_PATH=/home/tako/.cache/yay/aylurs-gtk-shell/src/ags/build/meson-uninstalled PKG_CONFIG=/usr/bin/pkg-config CC=cc /usr/bin/g-ir-scanner --quiet --no-libtool --namespace=GUtils --nsversion=1.0 --warn-all --output subprojects/gutils/GUtils-1.0.gir -I/home/tako/.cache/yay/aylurs-gtk-shell/src/ags/subprojects/gutils -I/home/tako/.cache/yay/aylurs-gtk-shell/src/ags/build/subprojects/gutils --filelist=/home/tako/.cache/yay/aylurs-gtk-shell/src/ags/build/subprojects/gutils/libgutils.so.p/GUtils_1.0_gir_filelist --include=GObject-2.0 --include=Gio-2.0 --symbol-prefix=gutils --identifier-prefix=GUtils --cflags-begin -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/security -I/usr/include/gobject-introspection-1.0 --cflags-end --add-include-path=/usr/share/gir-1.0 -L/home/tako/.cache/yay/aylurs-gtk-shell/src/ags/build/subprojects/gutils --library gutils -lgobject-2.0 -lglib-2.0 -lgio-2.0 -lpam -lgirepository-1.0
Traceback (most recent call last):
  File "/usr/bin/g-ir-scanner", line 103, in <module>
    from giscanner.scannermain import scanner_main
  File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 35, in <module>
    from giscanner.ast import Include, Namespace
  File "/usr/lib/gobject-introspection/giscanner/ast.py", line 27, in <module>
    from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF
  File "/usr/lib/gobject-introspection/giscanner/sourcescanner.py", line 31, in <module>
    from giscanner._giscanner import SourceScanner as CSourceScanner
ModuleNotFoundError: No module named 'giscanner._giscanner'
[18/22] Generating src/typescript-compile with a custom command
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: aylurs-gtk-shell-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
aylurs-gtk-shell - exit status 4

I also tried building it myself but this too don't work

Cloning into 'ags'...
remote: Enumerating objects: 3721, done.
remote: Counting objects: 100% (2232/2232), done.
remote: Compressing objects: 100% (728/728), done.
remote: Total 3721 (delta 1799), reused 1695 (delta 1497), pack-reused 1489
Receiving objects: 100% (3721/3721), 902.97 KiB | 4.65 MiB/s, done.
Resolving deltas: 100% (2611/2611), done.
Submodule 'subprojects/gvc' (https://gitlab.gnome.org/GNOME/libgnome-volume-control) registered for path 'subprojects/gvc'
Cloning into '/home/tako/ags/subprojects/gvc'...
warning: redirecting to https://gitlab.gnome.org/GNOME/libgnome-volume-control.git/
remote: Enumerating objects: 388, done.        
remote: Counting objects: 100% (84/84), done.        
remote: Compressing objects: 100% (28/28), done.        
remote: Total 388 (delta 56), reused 84 (delta 56), pack-reused 304        
Receiving objects: 100% (388/388), 195.81 KiB | 11.00 KiB/s, done.
Resolving deltas: 100% (262/262), done.
Submodule path 'subprojects/gvc': checked out '8e7a5a4c3e51007ce6579292642517e3d3eb9c50'

added 166 packages, and audited 167 packages in 2s

33 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Traceback (most recent call last):
  File "/usr/bin/meson", line 5, in <module>
    from mesonbuild.mesonmain import main
ModuleNotFoundError: No module named 'mesonbuild'
Traceback (most recent call last):
  File "/usr/bin/meson", line 5, in <module>
    from mesonbuild.mesonmain import main
ModuleNotFoundError: No module named 'mesonbuild'
kotontrion commented 2 months ago

I suspect a version mismatch. Arch did update to python 3.12 recently, which requires a rebuild of all python packages. So first make a full system update.

If the issue still persists: what is the output of type -a python?

notjl commented 2 months ago

I did a full upgrade, no errors anymore!

Thank you so much!

EDIT: I'm closing this issue since it has been resolved