You are not logged in.

#1 2019-02-20 16:35:43

edoelas
Member
Registered: 2018-04-27
Posts: 56

[SOLVED] Unable to install pycairo

I'm trying to install pycairo using pip with this order:

pip --no-cache-dir install pycairo

as it is recomended in its documentation but using --no-cache-dir in order to avoid problems with previous failed attempts (I'm not sure if this is doing something but I had to try) and I'm getting this output:

Collecting pycairo
  Downloading https://files.pythonhosted.org/packages/a6/54/23d6cf3e8d8f1eb30e0e58f171b6f62b2ea75c024935492373639a1a08e4/pycairo-1.18.0.tar.gz (202kB)
Installing collected packages: pycairo
  Running setup.py install for pycairo: started
    Running setup.py install for pycairo: finished with status 'error'
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ud4x1_c4/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4qupp7rx/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/cairo
    copying cairo/__init__.py -> build/lib.linux-x86_64-3.7/cairo
    copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.7/cairo
    copying cairo/py.typed -> build/lib.linux-x86_64-3.7/cairo
    running build_ext
    building 'cairo._cairo' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/cairo
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/device.c -o build/temp.linux-x86_64-3.7/cairo/device.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/bufferproxy.c -o build/temp.linux-x86_64-3.7/cairo/bufferproxy.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/error.c -o build/temp.linux-x86_64-3.7/cairo/error.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/cairomodule.c -o build/temp.linux-x86_64-3.7/cairo/cairomodule.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/context.c -o build/temp.linux-x86_64-3.7/cairo/context.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/font.c -o build/temp.linux-x86_64-3.7/cairo/font.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/matrix.c -o build/temp.linux-x86_64-3.7/cairo/matrix.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/path.c -o build/temp.linux-x86_64-3.7/cairo/path.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/pattern.c -o build/temp.linux-x86_64-3.7/cairo/pattern.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/region.c -o build/temp.linux-x86_64-3.7/cairo/region.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/surface.c -o build/temp.linux-x86_64-3.7/cairo/surface.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/enums.c -o build/temp.linux-x86_64-3.7/cairo/enums.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/misc.c -o build/temp.linux-x86_64-3.7/cairo/misc.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/glyph.c -o build/temp.linux-x86_64-3.7/cairo/glyph.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/rectangle.c -o build/temp.linux-x86_64-3.7/cairo/rectangle.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/textcluster.c -o build/temp.linux-x86_64-3.7/cairo/textcluster.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -B /usr/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/python3.7m -c cairo/textextents.c -o build/temp.linux-x86_64-3.7/cairo/textextents.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wdeclaration-after-statement -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden
    gcc -pthread -shared -B /usr/compiler_compat -L/usr/lib -Wl,-rpath=/usr/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/cairo/device.o build/temp.linux-x86_64-3.7/cairo/bufferproxy.o build/temp.linux-x86_64-3.7/cairo/error.o build/temp.linux-x86_64-3.7/cairo/cairomodule.o build/temp.linux-x86_64-3.7/cairo/context.o build/temp.linux-x86_64-3.7/cairo/font.o build/temp.linux-x86_64-3.7/cairo/matrix.o build/temp.linux-x86_64-3.7/cairo/path.o build/temp.linux-x86_64-3.7/cairo/pattern.o build/temp.linux-x86_64-3.7/cairo/region.o build/temp.linux-x86_64-3.7/cairo/surface.o build/temp.linux-x86_64-3.7/cairo/enums.o build/temp.linux-x86_64-3.7/cairo/misc.o build/temp.linux-x86_64-3.7/cairo/glyph.o build/temp.linux-x86_64-3.7/cairo/rectangle.o build/temp.linux-x86_64-3.7/cairo/textcluster.o build/temp.linux-x86_64-3.7/cairo/textextents.o -lcairo -o build/lib.linux-x86_64-3.7/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so
    /usr/compiler_compat/ld: build/temp.linux-x86_64-3.7/cairo/device.o: unable to initialize decompress status for section .debug_info
    /usr/compiler_compat/ld: build/temp.linux-x86_64-3.7/cairo/device.o: unable to initialize decompress status for section .debug_info
    /usr/compiler_compat/ld: build/temp.linux-x86_64-3.7/cairo/device.o: unable to initialize decompress status for section .debug_info
    /usr/compiler_compat/ld: build/temp.linux-x86_64-3.7/cairo/device.o: unable to initialize decompress status for section .debug_info
    build/temp.linux-x86_64-3.7/cairo/device.o: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ud4
f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-4qupp7rx
install-ud4x1_c4/pycairo/

I have read some posts that claim that is a problem with the binutils package or the elfutils one, but I'm not sure how to proced in order to be able to get installed pycairo.

The otput of pacman -Qi elfutils is:

Name            : elfutils
Version         : 0.175-1
Description     : Utilities to handle ELF object files and DWARF debugging information
Architecture    : x86_64
URL             : https://sourceware.org/elfutils/
Licenses        : LGPL3  GPL  GPL3
Groups          : None
Provides        : None
Depends On      : libelf=0.175-1
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 1691.00 KiB
Packager        : Anatol Pomozov <anatol.pomozov@gmail.com>
Build Date      : Mon 03 Dec 2018 22:48:04 CET
Install Date    : Wed 20 Feb 2019 17:18:34 CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

The output of pacman -Qi binutils is:

Name            : binutils-git
Version         : 2.32.r96684.c72e75a640-1
Description     : A set of programs to assemble and manipulate binary and object files
                  (git master developmental version)
Architecture    : x86_64
URL             : http://www.gnu.org/software/binutils/
Licenses        : GPL
Groups          : None
Provides        : binutils=2.32.r96684.c72e75a640
Depends On      : glibc  zlib
Optional Deps   : None
Required By     : gcc
Optional For    : None
Conflicts With  : binutils-multilib  binutils
Replaces        : None
Installed Size  : 30.88 MiB
Packager        : Unknown Packager
Build Date      : Tue 19 Feb 2019 12:21:56 CET
Install Date    : Tue 19 Feb 2019 12:36:03 CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

Thanks!

Last edited by edoelas (2019-02-20 20:42:11)

Offline

#2 2019-02-20 17:12:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,092

Re: [SOLVED] Unable to install pycairo

Why do you have a development version of binutils installed? Does the same happen with the normal repo binutils? In fact the error you are seeing is specifically one that should be fixed in the current repo package (though if you indeed did build binutils at that date, the relevant patch should already be included upstream) In general you should also not install pip packages system wide and use the --user option or virtualenvs instead. Using python-cairocffi aims to be a drop in replacement and might also be a useful workaround here.

Last edited by V1del (2019-02-20 17:16:04)

Offline

#3 2019-02-20 17:50:57

edoelas
Member
Registered: 2018-04-27
Posts: 56

Re: [SOLVED] Unable to install pycairo

I have a development version of binutils because the normal repo binutils did not work so I thought that maybe with the development version...  (I have already reinstalled the normal repo version).
Python-cairocffi does not seem to work because when I run pip install --user shaape I get:

Collecting shaape
  Downloading https://files.pythonhosted.org/packages/eb/c1/6f3ec749881f165746202b268826d4758d4cc196db8f10e1a0a40634e4b8/shaape-1.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Some dependencies could not be found. Make sure to install the Python bindings for Cairo(import cairo).

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-u9f2o7y3/shaape/

(At the end, what I want, is to be able to use shaape inside asciidoctor ).
I have tried to install shaape from the aur with the package python2-shaape-git but I get this output:

:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur: 1]  python2-shaape-git-1.1.1.r2.gc8c8dd7-1

  1 python2-shaape-git                       (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: PKGBUILD up to date, Skipping (1/1): python2-shaape-git
  1 python2-shaape-git                       (Build Files Exist)
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> Diffs to show?
==> n
:: Parsing SRCINFO (1/1): python2-shaape-git
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:12 CET)
==> Retrieving sources...
  -> Updating shaape git repo...
Fetching origin
==> Validating source files with md5sums...
    shaape ... Skipped
==> Cleaning up...
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:13 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating shaape git repo...
Fetching origin
==> Validating source files with md5sums...
    shaape ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of shaape git repo...
Cloning into 'shaape'...
done.
==> Starting pkgver()...
==> Sources are ready.
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:15 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    from setuptools import setup
ImportError: No module named setuptools
==> ERROR: A failure occurred in package().
    Aborting...
Error making: python2-shaape-git

Offline

#4 2019-02-20 19:05:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Unable to install pycairo

edoelas wrote:

I'm trying to install pycairo using pip with this order:

pip --no-cache-dir install pycairo

Your first problem is that you did not use pacman -S python2-cairo to install it. Why are you so desperately trying to use pip for everything? Especially if you have somehow installed a broken compiler toolchain?

edoelas wrote:

I have a development version of binutils because the normal repo binutils did not work so I thought that maybe with the development version...  (I have already reinstalled the normal repo version).

The repo binutils seems to work for everyone else, so why don't you provide details on what your problem is -- or stop using the development version of complex compiler tools such as binutils, if you're not prepared to become a binutils developer upon hitting bugs that don't exist in released versions.

edoelas wrote:

I have tried to install shaape from the aur with the package python2-shaape-git but I get this output:

:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur: 1]  python2-shaape-git-1.1.1.r2.gc8c8dd7-1

  1 python2-shaape-git                       (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> n
:: PKGBUILD up to date, Skipping (1/1): python2-shaape-git
  1 python2-shaape-git                       (Build Files Exist)
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> Diffs to show?
==> n
:: Parsing SRCINFO (1/1): python2-shaape-git
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:12 CET)
==> Retrieving sources...
  -> Updating shaape git repo...
Fetching origin
==> Validating source files with md5sums...
    shaape ... Skipped
==> Cleaning up...
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:13 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating shaape git repo...
Fetching origin
==> Validating source files with md5sums...
    shaape ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of shaape git repo...
Cloning into 'shaape'...
done.
==> Starting pkgver()...
==> Sources are ready.
==> Making package: python2-shaape-git 1.1.1.r2.gc8c8dd7-1 (Wed 20 Feb 2019 18:50:15 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Entering fakeroot environment...
==> Starting package()...
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    from setuptools import setup
ImportError: No module named setuptools
==> ERROR: A failure occurred in package().
    Aborting...
Error making: python2-shaape-git

The AUR package is a pile of junk and has been broken ever since its initial submission nearly three years ago -- it does not include the required makedepends on python2-setuptools.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2019-02-20 20:41:50

edoelas
Member
Registered: 2018-04-27
Posts: 56

Re: [SOLVED] Unable to install pycairo

I have been able to install pycairo so I will mark the problem as solved. At the end, after having too much trouble trying to install all the dependences and not being able to I have decided to use svgbob instead of shaape (and I have been able to install it too, I'm proud of myself... just kidding). Thanks, I think I have learned something important: try always to use the arch repos.

Offline

#6 2019-02-20 20:55:16

loqs
Member
Registered: 2014-03-06
Posts: 18,012

Re: [SOLVED] Unable to install pycairo

@edoelas eschwartz gave you a hint

makedepends=('git' 'python2-setuptools')

Edit:
@eschwartz totally off topic but any ideas on https://bbs.archlinux.org/viewtopic.php … 3#p1832593

Last edited by loqs (2019-02-20 21:04:18)

Offline

#7 2019-02-20 21:09:30

edoelas
Member
Registered: 2018-04-27
Posts: 56

Re: [SOLVED] Unable to install pycairo

I definitely have to start to be more interested in the operating system I use and learn how it works better. Now I've been able to install shaape but I try to render a diagram from asciidoctor I get this output:

asciidoctor-diagram: ERROR: Failed to generate image: shaape failed: Traceback (most recent call last):
  File "/usr/bin/shaape", line 6, in <module>
    shaape.run.run()
  File "/usr/lib/python2.7/site-packages/shaape/run.py", line 124, in run
    shaape.run()
  File "/usr/lib/python2.7/site-packages/shaape/run.py", line 78, in run
    parser.run(raw_data, objects)
  File "/usr/lib/python2.7/site-packages/shaape/overlayparser.py", line 137, in run
    minimum_cycles = planar_cycles(component)
  File "/usr/lib/python2.7/site-packages/shaape/graphalgorithms.py", line 117, in planar_cycles
    node = next_neighbor(path)
  File "/usr/lib/python2.7/site-packages/shaape/graphalgorithms.py", line 84, in next_neighbor
    return graph.edges()[0][0]
  File "/usr/lib/python2.7/site-packages/networkx/classes/reportviews.py", line 929, in __getitem__
    u, v = e
TypeError: 'int' object is not iterable

Edit:
Any suggestion for start learning how arch linux works better? (When I see the answers of those few that are always helping the noobs (me included) it looks like you know what does every line of code that is inside the arch repos. Thanks.)

Last edited by edoelas (2019-02-20 21:14:47)

Offline

#8 2019-02-20 21:28:03

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Unable to install pycairo

The shaape repository on Github shows the following issue: https://github.com/christiangoltz/shaape/issues/20

Which appears to be exactly your problem; I'm guessing that newer versions of networkx changed things up and shaape needs to adapt.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2019-02-20 21:41:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED] Unable to install pycairo

edoelas wrote:

Any suggestion for start learning how arch linux works better?

Mostly time and experience.  But there is a revision to "practice makes perfect" that prefers "practice makes permanent; perfect practice makes perfect", there is also a requirement for your time be spent and experience be gained doing things according to best practices.  Most best practices for arch systems are clearly laid out in the wiki.

Learn to use and use your package manager.  Avoid ever installing anything without using pacman.  Yes, there are good cases for using pip, or gem, or even occasionally manually installing, but a vast majority of time people use these tools, they shouldn't.  Unless you really know why you are circumventing pacman, don't.  As a default heuristic "just say no" to pip, and gem, and the like, will serve you well on arch.

When you can't install something with pacman from the repos, check the aur.  If you can't install it from the AUR, figure out why, and write your own PKGBUILD if needed.  If you can't write your own PKGBUILD, seek help here to do so.

Find answers mostly on these forums, our wiki, or potentially our IRC.  Take StackOverflow answers with a grain of salt.  Take AskUbuntu answers with a shot of penecillin.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2022-12-22 07:48:24

warlokk
Member
Registered: 2022-12-22
Posts: 1

Re: [SOLVED] Unable to install pycairo

if

sudo pacman -S python-cairo

is giving errors use

sudo pacman -S --overwrite \* python-cairo

Last edited by warlokk (2022-12-22 07:55:50)

Offline

#11 2022-12-22 08:51:45

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,150

Re: [SOLVED] Unable to install pycairo

warlokk wrote:

if

sudo pacman -S python-cairo

is giving errors use

sudo pacman -S --overwrite \* python-cairo

Did you even read the post before replying?

Offline

#12 2022-12-22 10:11:22

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Unable to install pycairo

@warlokk

Please pay attention to the date of threads before replying. This one was solved over 3 years ago and your supposed fix has absolutely nothing to do with the original issue.

Closing this old thread.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB