Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building GTK4 fails #1297

Closed
yashranjan1 opened this issue Mar 26, 2024 · 4 comments · Fixed by #1300
Closed

Building GTK4 fails #1297

yashranjan1 opened this issue Mar 26, 2024 · 4 comments · Fixed by #1300
Labels

Comments

@yashranjan1
Copy link

So i was following the instructions and I reached the part where i got to the following command:

gvsbuild build gtk4

Running this command gave me the following error:

(tar) Exporting glib
Building project glib (2.78.4)
[3/338] Generating gio/gdbus-daemon-generated with a custom command
FAILED: gio/gdbus-daemon-generated.h gio/gdbus-daemon-generated.c
"C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Scripts\python.exe" "gio/gdbus-2.0/codegen/gdbus-codegen" "--interface-prefix" "org." "--output-directory" "gio" "--generate-c-code" "gdbus-daemon-generated" "--c-namespace" "_G" "../gio/dbus-daemon.xml"
Traceback (most recent call last):
  File "C:\gtk-build\build\x64\release\glib\_gvsbuild-meson\gio\gdbus-2.0\codegen\gdbus-codegen", line 53, in <module>
    from codegen import codegen_main
  File "C:\gtk-build\build\x64\release\glib\_gvsbuild-meson\gio\gdbus-2.0\codegen\codegen_main.py", line 29, in <module>
    from . import dbustypes
  File "C:\gtk-build\build\x64\release\glib\_gvsbuild-meson\gio\gdbus-2.0\codegen\dbustypes.py", line 22, in <module>
    from . import utils
  File "C:\gtk-build\build\x64\release\glib\_gvsbuild-meson\gio\gdbus-2.0\codegen\utils.py", line 22, in <module>
    import distutils.version
ModuleNotFoundError: No module named 'distutils'
[4/338] Linking target gthread/gthread-2.0-0.dll
   Creating library gthread\gthread-2.0.lib and object gthread\gthread-2.0.exp
[6/338] Linking target gmodule/gmodule-2.0-0.dll
   Creating library gmodule\gmodule-2.0.lib and object gmodule\gmodule-2.0.exp
[7/338] Linking target gobject/gobject-2.0-0.dll
   Creating library gobject\gobject-2.0.lib and object gobject\gobject-2.0.exp
[36/338] Building translation po/fr/LC_MESSAGES/glib20-fr.mo
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 527, in build
    if self.__build_one(p):
       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 663, in __build_one
    skip_deps = proj.build()
                ^^^^^^^^^^^^
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\projects\glib.py", line 50, in build
    Meson.build(self)
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\base_builders.py", line 56, in build
    self.builder.exec_ninja(params="install", working_dir=ninja_build)
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 985, in exec_ninja
    self.__execute(
  File "C:\Users\yashr\AppData\Local\pipx\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 1041, in __execute
    subprocess.check_call(args, cwd=working_dir, env=env, shell=True)
  File "C:\Users\yashr\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'ninja install' returned non-zero exit status 1.
Error: glib build failed

I am currently running python 3.12.2. I did a little digging and I found that distutils has been deprecated in python 3.12 but im not sure what exactly the issue is.

@danyeaw
Copy link
Member

danyeaw commented Mar 26, 2024

Hi @yashranjan1, is this with Gvsbuild 2024.3.0?

@yashranjan1
Copy link
Author

Yes

 ⚡Yash ❯❯ gvsbuild --version
gvsbuild v2024.3.0

@Bjorn-Slettemark
Copy link

Bjorn-Slettemark commented Mar 26, 2024

I am experiencing the same issues.

@Bjorn-Slettemark
Copy link

@danyeaw Thank you for fixing this so quickly - you've unblocked me royally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants