trigg / Discover

Yet another discord overlay for linux
GNU General Public License v3.0
651 stars 28 forks source link

Pipx Install On Fedora 39 Fails #314

Closed cprin21 closed 1 year ago

cprin21 commented 1 year ago

Steps to Reproduce Steps to reproduce the behavior:

  1. Install Dependencies Listed for Fedora
  2. Install either the Stable or Testing Branch through given steps.
  3. Recieve the following error:
    
    Fatal error from pip prevented installation. Full pip output in file:
    /home/$USER/.local/pipx/logs/cmd_2023-10-05_15.06.10_pip_errors.log

pip seemed to fail to build package: pycairo

Some possibly relevant errors from pip install: error: subprocess-exited-with-error cairo/bufferproxy.c:32:10: fatal error: Python.h: No such file or directory error: command '/usr/bin/gcc' failed with exit code 1

**Desktop (please complete the following information):**
Fedora 39

**Additional context**
The output from 
/home/$USER/.local/pipx/logs/cmd_2023-10-05_15.06.10_pip_errors.log shows the following:

PIP STDOUT

Processing /home/$USER/Downloads/Discover Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting PyGObject>=3.22 (from discover-overlay==0.6.9) Using cached PyGObject-3.46.0.tar.gz (723 kB) Installing build dependencies: started Installing build dependencies: finished with status 'error'

PIP STDERR

error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [51 lines of output] Collecting setuptools Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB) Collecting wheel Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB) Collecting pycairo Using cached pycairo-1.25.0.tar.gz (347 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Installing backend dependencies: started Installing backend dependencies: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Using cached setuptools-68.2.2-py3-none-any.whl (807 kB) Using cached wheel-0.41.2-py3-none-any.whl (64 kB) Building wheels for collected packages: pycairo Building wheel for pycairo (pyproject.toml): started Building wheel for pycairo (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for pycairo (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [19 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-cpython-312
        creating build/lib.linux-x86_64-cpython-312/cairo
        copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-312/cairo
        copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-312/cairo
        copying cairo/py.typed -> build/lib.linux-x86_64-cpython-312/cairo
        running build_ext
        building 'cairo._cairo' extension
        creating build/temp.linux-x86_64-cpython-312
        creating build/temp.linux-x86_64-cpython-312/cairo
        gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=25 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/sysprof-6 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/harfbuzz -I/usr/include/libpng16 -I/home/lain/.local/pipx/venvs/discover-overlay/include -I/usr/include/python3.12 -c cairo/bufferproxy.c -o build/temp.linux-x86_64-cpython-312/cairo/bufferproxy.o -Wall -Warray-bounds -Wcast-align -Wconversion -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 -std=c99
        cairo/bufferproxy.c:32:10: fatal error: Python.h: No such file or directory
           32 | #include <Python.h>
              |          ^~~~~~~~~~
        compilation terminated.
        error: command '/usr/bin/gcc' failed with exit code 1
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for pycairo
  Failed to build pycairo
  ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

trigg commented 1 year ago

Looking at the log, you appear to be missing the development headers for python.

this link shows how to get those.

I'll keep this open as you'll likely need to install *-devel packages for other requirements, and I'm not familiar enough with Fedora to hazard a guess as to which.

cprin21 commented 1 year ago

Installing the following packages on Fedora 39 Beta allowed pipx to install discover overlay python-devel python-gobject python-gobject-devel

trigg commented 1 year ago

Thank you for the follow up. I've put that in documentation.