Skip to content

error: command 'gcc' failed: No such file or directory #2406

@matthieumarrast

Description

@matthieumarrast

Our continuous integration pipeline suddenly failed with error (pacakge "psycopg-c" source code compilation), after switching to the new docker image.

Previous image used: metwork/mfdataplugins-centos8-buildimage:release_2.2
New image used: metwork/mfdata-rocky8:2.2.4

It seems gcc is not present anymore in the new image.

Building wheels for collected packages: psycopg-c
  Building wheel for psycopg-c (pyproject.toml): started
  Building wheel for psycopg-c (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for psycopg-c (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      /builds/aeroweb/data/mfdata_aeroweb_image_importer/python3_virtualenv_sources/tempolayer1159/tmp/pip-build-env-omdzco0z/overlay/lib/python3.11/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/__init__.py -> build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/_uuid.py -> build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/version.py -> build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/_psycopg.pyi -> build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/py.typed -> build/lib.linux-x86_64-cpython-311/psycopg_c
      copying psycopg_c/pq.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c
      creating build/lib.linux-x86_64-cpython-311/psycopg_c/_psycopg
      copying psycopg_c/_psycopg/__init__.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c/_psycopg
      copying psycopg_c/_psycopg/endian.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c/_psycopg
      copying psycopg_c/_psycopg/oids.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c/_psycopg
      creating build/lib.linux-x86_64-cpython-311/psycopg_c/pq
      copying psycopg_c/pq/__init__.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c/pq
      copying psycopg_c/pq/libpq.pxd -> build/lib.linux-x86_64-cpython-311/psycopg_c/pq
      running build_ext
      building 'psycopg_c._psycopg' extension
      creating build/temp.linux-x86_64-cpython-311/psycopg_c
      creating build/temp.linux-x86_64-cpython-311/psycopg_c/types
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/metwork-mfext-2.2/opt/python3_core/../core/include -fPIC -I/opt/metwork-mfext-2.2/opt/scientific_core/include -I/opt/metwork-mfext-2.2/opt/python3_core/include/python3.11 -c psycopg_c/_psycopg.c -o build/temp.linux-x86_64-cpython-311/psycopg_c/_psycopg.o
      error: command 'gcc' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psycopg-c
Failed to build psycopg-c
ERROR: Could not build wheels for psycopg-c, which is required to install pyproject.toml-based projects
ERROR with freeze_requirements
make: *** [/opt/metwork-mfext-2.2/share/plugin.mk:60: python3_virtualenv_sources/requirements3.txt] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions