Почему я получаю только ошибку "#error" может быть включен напрямую. "во время работы make для pygobject-2.15.2? - PullRequest
0 голосов
/ 03 марта 2020

Я пытаюсь установить pygoobject-2.15.2, чтобы сделать pan go, pangocairo работает в python3, но я получаю сообщение об ошибке при создании pygobject. Кроме того, есть ли другой способ установить pan go, pangocairo и cairo в python?

(base) agam98@nearest-neighbor:~/Downloads/pygobject-2.15.2$ make
make  all-recursive
make[1]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2'
Making all in docs
make[2]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make  all-am
make[3]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make[2]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
Making all in codegen
make[2]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/codegen'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/codegen'
Making all in glib
make[2]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/glib'
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT libpyglib_2_0_la-pyglib.lo -MD -MP -MF .deps/libpyglib_2_0_la-pyglib.Tpo -c -o libpyglib_2_0_la-pyglib.lo `test -f 'pyglib.c' || echo './'`pyglib.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT libpyglib_2_0_la-pyglib.lo -MD -MP -MF .deps/libpyglib_2_0_la-pyglib.Tpo -c pyglib.c  -fPIC -DPIC -o .libs/libpyglib_2_0_la-pyglib.o
pyglib.c: In function 'pyglib_enable_threads':
pyglib.c:143:2: warning: 'g_thread_init' is deprecated [-Wdeprecated-declarations]
  g_thread_init(NULL);
  ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:108:0,
                 from pyglib.h:27,
                 from pyglib.c:28:
/usr/include/glib-2.0/glib/deprecated/gthread.h:265:10: note: declared here
 void     g_thread_init                   (gpointer vtable);
          ^~~~~~~~~~~~~
pyglib.c: In function 'pyglib_gerror_exception_check':
pyglib.c:325:17: warning: format not a string literal and no format arguments [-Wformat-security]
                 PyInt_AsLong(py_code), PyString_AsString(py_message));
                 ^~~~~~~~~~~~
pyglib.c:334:5: warning: format not a string literal and no format arguments [-Wformat-security]
     g_set_error(error, g_quark_from_static_string("pygobject"), 0, bad_gerror_message);
     ^~~~~~~~~~~
mv -f .deps/libpyglib_2_0_la-pyglib.Tpo .deps/libpyglib_2_0_la-pyglib.Plo
/bin/bash ../libtool --tag=CC   --mode=link gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x   -o libpyglib-2.0.la -rpath /usr/local/lib libpyglib_2_0_la-pyglib.lo -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0  
gcc -shared  .libs/libpyglib_2_0_la-pyglib.o  -lgobject-2.0 -lgthread-2.0 -lglib-2.0  -pthread -pthread -Wl,-soname -Wl,libpyglib-2.0.so.0 -o .libs/libpyglib-2.0.so.0.0.0
(cd .libs && rm -f libpyglib-2.0.so.0 && ln -s libpyglib-2.0.so.0.0.0 libpyglib-2.0.so.0)
(cd .libs && rm -f libpyglib-2.0.so && ln -s libpyglib-2.0.so.0.0.0 libpyglib-2.0.so)
creating libpyglib-2.0.la
(cd .libs && rm -f libpyglib-2.0.la && ln -s ../libpyglib-2.0.la libpyglib-2.0.la)
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-glibmodule.lo -MD -MP -MF .deps/_glib_la-glibmodule.Tpo -c -o _glib_la-glibmodule.lo `test -f 'glibmodule.c' || echo './'`glibmodule.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-glibmodule.lo -MD -MP -MF .deps/_glib_la-glibmodule.Tpo -c glibmodule.c  -fPIC -DPIC -o .libs/_glib_la-glibmodule.o
glibmodule.c: In function 'pyglib_get_prgname':
glibmodule.c:502:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     name = g_get_prgname();
          ^
mv -f .deps/_glib_la-glibmodule.Tpo .deps/_glib_la-glibmodule.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygiochannel.lo -MD -MP -MF .deps/_glib_la-pygiochannel.Tpo -c -o _glib_la-pygiochannel.lo `test -f 'pygiochannel.c' || echo './'`pygiochannel.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygiochannel.lo -MD -MP -MF .deps/_glib_la-pygiochannel.Tpo -c pygiochannel.c  -fPIC -DPIC -o .libs/_glib_la-pygiochannel.o
pygiochannel.c: In function 'py_io_channel_write_chars':
pygiochannel.c:263:15: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     GIOStatus status;
               ^~~~~~
pygiochannel.c: In function 'py_io_channel_write_lines':
pygiochannel.c:286:15: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     GIOStatus status;
               ^~~~~~
pygiochannel.c: In function 'py_io_channel_add_watch':
pygiochannel.c:475:17: warning: variable 'iochannel' set but not used [-Wunused-but-set-variable]
     GIOChannel *iochannel = NULL;
                 ^~~~~~~~~
pygiochannel.c: In function 'py_io_channel_read_line':
pygiochannel.c:572:15: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     GIOStatus status;
               ^~~~~~
mv -f .deps/_glib_la-pygiochannel.Tpo .deps/_glib_la-pygiochannel.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygoptioncontext.lo -MD -MP -MF .deps/_glib_la-pygoptioncontext.Tpo -c -o _glib_la-pygoptioncontext.lo `test -f 'pygoptioncontext.c' || echo './'`pygoptioncontext.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygoptioncontext.lo -MD -MP -MF .deps/_glib_la-pygoptioncontext.Tpo -c pygoptioncontext.c  -fPIC -DPIC -o .libs/_glib_la-pygoptioncontext.o
mv -f .deps/_glib_la-pygoptioncontext.Tpo .deps/_glib_la-pygoptioncontext.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygoptiongroup.lo -MD -MP -MF .deps/_glib_la-pygoptiongroup.Tpo -c -o _glib_la-pygoptiongroup.lo `test -f 'pygoptiongroup.c' || echo './'`pygoptiongroup.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygoptiongroup.lo -MD -MP -MF .deps/_glib_la-pygoptiongroup.Tpo -c pygoptiongroup.c  -fPIC -DPIC -o .libs/_glib_la-pygoptiongroup.o
pygoptiongroup.c: In function 'pyg_option_group_dealloc':
pygoptiongroup.c:95:6: warning: 'g_option_group_free' is deprecated [-Wdeprecated-declarations]
      g_option_group_free(tmp);
      ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:64:0,
                 from ./pyglib.h:27,
                 from pygoptiongroup.c:27:
/usr/include/glib-2.0/glib/goption.h:368:15: note: declared here
 void          g_option_group_free                   (GOptionGroup       *group);
               ^~~~~~~~~~~~~~~~~~~
mv -f .deps/_glib_la-pygoptiongroup.Tpo .deps/_glib_la-pygoptiongroup.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygmaincontext.lo -MD -MP -MF .deps/_glib_la-pygmaincontext.Tpo -c -o _glib_la-pygmaincontext.lo `test -f 'pygmaincontext.c' || echo './'`pygmaincontext.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygmaincontext.lo -MD -MP -MF .deps/_glib_la-pygmaincontext.Tpo -c pygmaincontext.c  -fPIC -DPIC -o .libs/_glib_la-pygmaincontext.o
mv -f .deps/_glib_la-pygmaincontext.Tpo .deps/_glib_la-pygmaincontext.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygmainloop.lo -MD -MP -MF .deps/_glib_la-pygmainloop.Tpo -c -o _glib_la-pygmainloop.lo `test -f 'pygmainloop.c' || echo './'`pygmainloop.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygmainloop.lo -MD -MP -MF .deps/_glib_la-pygmainloop.Tpo -c pygmainloop.c  -fPIC -DPIC -o .libs/_glib_la-pygmainloop.o
mv -f .deps/_glib_la-pygmainloop.Tpo .deps/_glib_la-pygmainloop.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygsource.lo -MD -MP -MF .deps/_glib_la-pygsource.Tpo -c -o _glib_la-pygsource.lo `test -f 'pygsource.c' || echo './'`pygsource.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygsource.lo -MD -MP -MF .deps/_glib_la-pygsource.Tpo -c pygsource.c  -fPIC -DPIC -o .libs/_glib_la-pygsource.o
pygsource.c: In function 'pyg_source_get_current_time':
pygsource.c:248:5: warning: 'g_source_get_current_time' is deprecated: Use 'g_source_get_time' instead [-Wdeprecated-declarations]
     g_source_get_current_time(self->source, &timeval);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib/giochannel.h:33:0,
                 from /usr/include/glib-2.0/glib.h:54,
                 from pyglib.h:27,
                 from pygsource.c:33:
/usr/include/glib-2.0/glib/gmain.h:526:10: note: declared here
 void     g_source_get_current_time (GSource        *source,
          ^~~~~~~~~~~~~~~~~~~~~~~~~
mv -f .deps/_glib_la-pygsource.Tpo .deps/_glib_la-pygsource.Plo
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygspawn.lo -MD -MP -MF .deps/_glib_la-pygspawn.Tpo -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo './'`pygspawn.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygspawn.lo -MD -MP -MF .deps/_glib_la-pygspawn.Tpo -c pygspawn.c  -fPIC -DPIC -o .libs/_glib_la-pygspawn.o
In file included from pygspawn.c:25:0:
/usr/include/glib-2.0/glib/gspawn.h:23:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gspawn.h:26:0,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gerror.h:23:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gerror.h:28:0,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gquark.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gquark.h:32:0,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gtypes.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gmacros.h:33:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gtypes.h:34:0,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gversionmacros.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
Makefile:446: recipe for target '_glib_la-pygspawn.lo' failed
make[2]: *** [_glib_la-pygspawn.lo] Error 1
make[2]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/glib'
Makefile:476: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2'
Makefile:269: recipe for target 'all' failed
make: *** [all] Error 2
(base) agam98@nearest-neighbor:~/Downloads/pygobject-2.15.2$ make check
Making check in docs
make[1]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make  check-am
make[2]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make[2]: Nothing to be done for 'check-am'.
make[2]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
make[1]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/docs'
Making check in codegen
make[1]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/codegen'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/codegen'
Making check in glib
make[1]: Entering directory '/home/agam98/Downloads/pygobject-2.15.2/glib'
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN   -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygspawn.lo -MD -MP -MF .deps/_glib_la-pygspawn.Tpo -c -o _glib_la-pygspawn.lo `test -f 'pygspawn.c' || echo './'`pygspawn.c
 gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DPY_SSIZE_T_CLEAN -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -Wall -fno-strict-aliasing -std=c9x -MT _glib_la-pygspawn.lo -MD -MP -MF .deps/_glib_la-pygspawn.Tpo -c pygspawn.c  -fPIC -DPIC -o .libs/_glib_la-pygspawn.o
In file included from pygspawn.c:25:0:
/usr/include/glib-2.0/glib/gspawn.h:23:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gspawn.h:26:0,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gerror.h:23:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gerror.h:28:0,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gquark.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gquark.h:32:0,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gtypes.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gmacros.h:33:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
In file included from /usr/include/glib-2.0/glib/gtypes.h:34:0,
                 from /usr/include/glib-2.0/glib/gquark.h:32,
                 from /usr/include/glib-2.0/glib/gerror.h:28,
                 from /usr/include/glib-2.0/glib/gspawn.h:26,
                 from pygspawn.c:25:
/usr/include/glib-2.0/glib/gversionmacros.h:29:2: error: #error "Only <glib.h> can be included directly."
 #error "Only <glib.h> can be included directly."
  ^~~~~
Makefile:446: recipe for target '_glib_la-pygspawn.lo' failed
make[1]: *** [_glib_la-pygspawn.lo] Error 1
make[1]: Leaving directory '/home/agam98/Downloads/pygobject-2.15.2/glib'
Makefile:476: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

Я не уверен, почему я получаю эту ошибку, но я думаю, что это связано с моей Ubuntu версия. В настоящее время у меня установлена ​​Ubuntu-18.04.3.

...