Gtkmm4 installation on ubuntu 20.04

I’ve tried to use meson and ninja to install gtkmm4 on ubuntu 20.04, but I’m unable to install gtkmm4.

Firstly, I do not have “gobject-introspection” installed, and the command line shows the following info:
Dependency pangomm-2.48 found: YES 2.49.1 (overridden)
Dependency gdk-pixbuf-2.0 found: YES 2.40.0 (cached)
Dependency epoxy found: YES 1.5.4 (cached)
Dependency glibmm-2.68 found: YES 2.70.0 (overridden)
Dependency giomm-2.68 found: YES 2.70.0 (overridden)
Run-time dependency gtk4-unix-print found: NO (tried pkgconfig and cmake)
Program mm-common-get found: YES (/usr/bin/mm-common-get)
Program m4 found: YES (/usr/bin/m4)
Program perl found: YES (/usr/bin/perl)
Program doxygen found: YES (/usr/bin/doxygen)
Program dot found: YES (/usr/bin/dot)
Program xsltproc found: YES (/usr/bin/xsltproc)
Compiler for C++ supports arguments -Wall: YES (cached)
meson.build:253: WARNING: Consider using the built-in warning_level option instead of using “-Wall”.
Library glibmm_generate_extra_defs-2.68 found: NO
Dependency (anonymous) from subproject subprojects/glibmm found: YES 2.70.0
Configuring gdkmmconfig.h using configuration
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Configuring gtkmm-4.0.pc using configuration
Configuring gtkmm-4.0-uninstalled.pc using configuration
Configuring gtkmmconfig.h using configuration
Configuring gtkmm.rc using configuration
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Program glib-compile-resources found: YES (overridden)
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/mesonmain.py”, line 138, in run
return options.run_func(options)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/msetup.py”, line 294, in run
app.generate()
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/msetup.py”, line 185, in generate
self._generate(env)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/msetup.py”, line 229, in _generate
intr.run()
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreter/interpreter.py”, line 2484, in run
super().run()
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 150, in run
self.evaluate_codeblock(self.ast, start=1)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 175, in evaluate_codeblock
raise e
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 168, in evaluate_codeblock
self.evaluate_statement(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 181, in evaluate_statement
return self.function_call(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 456, in function_call
res = func(node, func_args, kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/decorators.py”, line 713, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/decorators.py”, line 115, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/decorators.py”, line 276, in wrapper
return f(*nargs, **wrapped_kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreter/interpreter.py”, line 1969, in func_subdir
self.evaluate_codeblock(codeblock)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 175, in evaluate_codeblock
raise e
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 168, in evaluate_codeblock
self.evaluate_statement(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 191, in evaluate_statement
return self.evaluate_if(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 274, in evaluate_if
self.evaluate_codeblock(i.block)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 175, in evaluate_codeblock
raise e
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 168, in evaluate_codeblock
self.evaluate_statement(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 183, in evaluate_statement
self.assignment(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 568, in assignment
value = self.evaluate_statement(node.value)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 185, in evaluate_statement
return self.method_call(cur)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/interpreterbase.py”, line 484, in method_call
res = obj.method_call(method_name, args, kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreter/interpreterobjects.py”, line 754, in method_call
ret = method(state, args, kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/decorators.py”, line 713, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/interpreterbase/decorators.py”, line 115, in wrapped
return f(*wrapped_args, **wrapped_kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/modules/gnome.py”, line 292, in compile_resources
target_c = GResourceTarget(name, state.subdir, state.subproject, kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/modules/init.py”, line 202, in init
super().init(name, subdir, subproject, kwargs)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/build.py”, line 2330, in init
self.process_kwargs(kwargs, backend)
File “/usr/local/lib/python3.8/dist-packages/mesonbuild/build.py”, line 2441, in process_kwargs
if isinstance(kwargs[‘install_dir’], list):
KeyError: ‘install_dir’

Then, I install “gobject-introspection”. This time, the command line shows the following:
gobject-introspection| Program g-ir-scanner found: YES (/home/user/Projects/source-code/gtkmm-4.4.0/builddir/subprojects/gobject-introspection/tools/g-ir-scanner)

subprojects/gobject-introspection/tools/meson.build:42:10: ERROR: Tried to override finding of executable “g-ir-scanner” which has already been found.

I wonder, how can I install gtkmm4 on the ubuntu 20.04.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.