SeaDve / Mousai

Identify songs in seconds
GNU General Public License v3.0
975 stars 36 forks source link

Mousai not work with meson build #22

Closed carlosgonz0 closed 2 years ago

carlosgonz0 commented 3 years ago

I have already installed manually libadwaita 1.0.0alpha2 what happening here?

purism@carlosgonz:~/Documents/Mousai-0.4.4/build$ mousai Traceback (most recent call last):

File "/usr/local/bin/mousai", line 30, in

from mousai import main

File "/usr/local/share/mousai/mousai/main.py", line 9, in

gi.require_version('Adw', '1')

File "/usr/lib/python3/dist-packages/gi/init.py", line 126, in require_version

raise ValueError('Namespace %s not available' % namespace)

ValueError: Namespace Adw not available

SeaDve commented 3 years ago

hmm, is libadwaita installed with introspection enabled?

carlosgonz0 commented 3 years ago

Well I have installed "gtk4" plus "introspection" as a dependency. But i am not sure if i need enable something.?

SeaDve commented 3 years ago

where did you install libadwaita from? The introspection thingy should be enabled on when libadwaita is built. -Dinstrospection as a flag i think

carlosgonz0 commented 3 years ago

I download from: git clone https://gitlab.gnome.org/GNOME/libadwaita.git

SeaDve commented 3 years ago

I have no idea why, have you rebooted after installing libadw?

carlosgonz0 commented 3 years ago

I checked meson config it showing that "introspection" is on "auto" so i going to rebuild with "introspection" true flag. may be it fixed.

SeaDve commented 3 years ago

okay, thanks

carlosgonz0 commented 3 years ago

I rebuilded libadwaita with -Dinstrospection=enabled but same is not work : ( I rebooted too.

purism@carlosgonz:~$ mousai

Traceback (most recent call last):

File "/usr/local/bin/mousai", line 30, in

from mousai import main

File "/usr/local/share/mousai/mousai/main.py", line 9, in

gi.require_version('Adw', '1')

File "/usr/lib/python3/dist-packages/gi/init.py", line 126, in require_version

raise ValueError('Namespace %s not available' % namespace)

ValueError: Namespace Adw not available

SeaDve commented 3 years ago

:( Do you mind using flatpak-builder? It should be able to handle very dependencies without all these problems

carlosgonz0 commented 3 years ago

Flatpak does work, but i wanted to install it by using meson, because with meson build the apps boot faster, Flatpaked is slow boot here. : (

carlosgonz0 commented 3 years ago

May be you need to add libadwaita to required dependecies.?

SeaDve commented 3 years ago

ill add it

SeaDve commented 3 years ago

added it in latest commit

carlosgonz0 commented 3 years ago

Thank you, i will check if work this time.

carlosgonz0 commented 3 years ago

purism@carlosgonz:~/Documents/Mousai$ meson build The Meson build system Version: 0.56.2 Source dir: /home/purism/Documents/Mousai Build dir: /home/purism/Documents/Mousai/build Build type: native build Project name: mousai Project version: 0.5.0 Host machine cpu family: aarch64 Host machine cpu: aarch64 Found pkg-config: /usr/bin/pkg-config (0.29.2) Run-time dependency glib-2.0 found: YES 2.66.8 Run-time dependency gio-2.0 found: YES 2.66.8 Run-time dependency gtk4 found: YES 4.3.1 Run-time dependency libadwaita-1 found: YES 1.0.0-alpha.2 Found pkg-config: /usr/bin/pkg-config (0.29.2) Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources) Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate) Program appstream-util found: YES (/usr/bin/appstream-util) Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas) Program python3 found: YES (/usr/bin/python3) Configuring mousai using configuration Program build-aux/meson/postinstall.py found: YES (/home/purism/Documents/Mousai/build-aux/meson/postinstall.py) Build targets in project: 6

Found ninja-1.10.1 at /usr/bin/ninja

purism@carlosgonz:~/Documents/Mousai/build$ mousai Traceback (most recent call last): File "/usr/local/bin/mousai", line 30, in from mousai import main File "/usr/local/share/mousai/mousai/main.py", line 9, in gi.require_version('Adw', '1') File "/usr/lib/python3/dist-packages/gi/init.py", line 126, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Adw not available

SeaDve commented 3 years ago

now, that's weirder. It definitely detected libadwaita, but idk why python doesn't

ill try to build it tomorrow with meson, and troubleshoot

carlosgonz0 commented 3 years ago

This error happens with ALL Python apps like too https://github.com/ExposedCat/Meowgram. But apps with NOT python code everything is good like https://github.com/bleakgrey/tootle

SeaDve commented 3 years ago

try https://gitlab.gnome.org/World/PasswordSafe/-/tree/master

it is also in python, but it may be build differently

SeaDve commented 3 years ago

tootle is written in vala so it uses vapi, which writes C code directly without having to go through instrospection like python/pygobject

carlosgonz0 commented 3 years ago

Let me check something first on Libwaita, i see a error on python related, i am going recompiling adw again.

carlosgonz0 commented 3 years ago

I still troubleshooting

purism@carlosgonz:~/Documents/libadwaita/build$ ninja [1/135] Generating adw-resources_h with a custom command

xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH

[2/135] Generating adw-resources_c with a custom command xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH

[5/135] Generating adwaita-demo-resources_h with a custom command xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH

[9/135] Generating adwaita-demo-resources_c with a custom command

xml-stripblanks preprocessing requested, but XMLLINT is not set, and xmllint is not in PATH

[126/135] Generating libadwaita-doc with a custom command FAILED: doc/libadwaita-1 /usr/local/bin/gi-docgen generate --quiet --add-include-path=/home/purism/Documents/libadwaita/build/doc/../../src

--config=doc/libadwaita.toml --output-dir=doc/libadwaita-1 --no-namespace-dir --content-dir=/home/purism/Documents

/libadwaita/doc src/Adw-1.gir

Traceback (most recent call last):

File "/usr/local/bin/gi-docgen", line 14, in

from gidocgen import gidocmain

ModuleNotFoundError: No module named 'gidocgen'

[131/135] Compiling C object tests/test-tab-view.p/test-tab-view.c.o

ninja: build stopped: subcommand failed.

purism@carlosgonz:~/Documents/libadwaita/build$

carlosgonz0 commented 3 years ago

OK if i use: pip install gi-docgen this ninja error is not happening but meson does not detecting gi-docgen as a primary, so i installed gi-docgen manually, then ninja error. Let see what going on...

SeaDve commented 3 years ago

I checked on aur, and it seems to work there normally. Check the pkgbuild file of libadwaita, if it may help. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=libadwaita-git

ItzSwirlz commented 3 years ago

I didn't fully read this but a) install via your proper package manager, not manually (pacman if your on Arch), b) install python packages too for those libraries

carlosgonz0 commented 3 years ago

I didn't fully read this but a) install via your proper package manager, not manually (pacman if your on Arch), b) install python packages too for those libraries

Pure OS still not ship Libadwaita, that is why i am doing adw manually.

SeaDve commented 2 years ago

Hi, there has been changes with the build system. This probably has been fixed. But feel free to open if it still exist, thanks!