Skip to content

gcc failed with exit code 1 during pip install #1

@MrClon

Description

@MrClon

Arch linux, python 3.12, gcc 14.1.1. When i trying to install screen by pip this error occurs

$ python -m venv ./delme
$ ./delme/bin/pip install screen
Collecting screen
  Using cached screen-1.0.1.tar.gz (8.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: screen
  Building wheel for screen (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for screen (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running bdist_wheel
      The [wheel] section is deprecated. Use [bdist_wheel] instead.
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-312
      creating build/lib.linux-x86_64-cpython-312/screen
      copying screen/__init__.py -> build/lib.linux-x86_64-cpython-312/screen
      copying screen/compat.py -> build/lib.linux-x86_64-cpython-312/screen
      copying screen/old_str_util.py -> build/lib.linux-x86_64-cpython-312/screen
      running build_ext
      building 'screen.str_util' extension
      creating build/temp.linux-x86_64-cpython-312
      creating build/temp.linux-x86_64-cpython-312/source
      gcc -fno-strict-overflow -DNDEBUG -g -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/mnt/ssd-trash/delme/include -I/usr/include/python3.12 -c source/str_util.c -o build/temp.linux-x86_64-cpython-312/source/str_util.o
      source/str_util.c: In function ‘Py_IsWideChar’:
      source/str_util.c:484:16: error: implicit declaration of function ‘PyUnicode_AS_UNICODE’; did you mean ‘PyUnicode_AsUCS4’? [-Wimplicit-function-declaration]
        484 |         ustr = PyUnicode_AS_UNICODE(text);
            |                ^~~~~~~~~~~~~~~~~~~~
            |                PyUnicode_AsUCS4
      source/str_util.c:484:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        484 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      source/str_util.c: In function ‘Py_CalcWidth’:
      source/str_util.c:663:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        663 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      source/str_util.c: In function ‘Py_CalcTextPos’:
      source/str_util.c:755:14: error: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        755 |         ustr = PyUnicode_AS_UNICODE(text);
            |              ^
      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 screen
Failed to build screen
ERROR: Could not build wheels for screen, which is required to install pyproject.toml-based projects
$ python -V
Python 3.12.3
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.1.1 20240507 (GCC) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions