Skip to content

pip fails to build wheels for cffi (gcc not found) in ubuntu.1804.armarch.open using image alpine-3.15-helix-arm32v7 #1423

Closed
dotnet/runtime
#95373
@carlossanlop

Description

@carlossanlop

Build

https://dev.azure.com/dnceng-public/public/_build/results?buildId=469944

Build leg reported

https://dev.azure.com/dnceng-public/public/_build/results?buildId=469944&view=logs&j=fd49b2ea-3ee3-5298-d793-bdb9fd631e7e&t=26d44400-a1b8-5ed1-d719-0cc35b38251b

Pull Request

dotnet/runtime#93906

Known issue core information

Fill out the known issue JSON section by following the step by step documentation on how to create a known issue

 {
    "ErrorMessage" : "Building wheel for cffi (pyproject.toml) did not run successfully.",
    "BuildRetry": false,
    "ErrorPattern": "",
    "ExcludeConsoleLog": false
 }

@dotnet/dnceng

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

Additional information about the issue reported

Happens in (ubuntu.1804.armarch.open) using docker image mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-arm32v7-20230807201723-7ea784e

The repo had some recent PRs modifying the alpine images:

My PR is not making any changes that could be causing this.

This error is only visible when there's an actual test error happening in these machines, otherwise, the CI leg passes.

Log file with the error: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-93906-merge-9e1b570d2b3441d698/System.IO.Compression.Brotli.Tests/1/console.b000a501.log?helixlogtype=result

Collecting cryptography>=39.0.1
  Downloading cryptography-41.0.5.tar.gz (630 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 630.5/630.5 kB 10.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [124 lines of output]
      Collecting setuptools>=61.0.0
        Downloading setuptools-68.2.2-py3-none-any.whl (807 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 807.9/807.9 kB 13.9 MB/s eta 0:00:00
      Collecting wheel
        Downloading wheel-0.41.3-py3-none-any.whl (65 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 3.7 MB/s eta 0:00:00
      Collecting cffi>=1.12
        Downloading cffi-1.16.0.tar.gz (512 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 512.9/512.9 kB 12.1 MB/s eta 0:00:00
        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'
      Collecting setuptools-rust>=0.11.4
        Downloading setuptools_rust-1.8.1-py3-none-any.whl (26 kB)
      Collecting pycparser
        Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
      Collecting tomli>=1.2.1
        Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
      Collecting semantic-version<3,>=2.8.2
        Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
      Building wheels for collected packages: cffi
        Building wheel for cffi (pyproject.toml): started
        Building wheel for cffi (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for cffi (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [82 lines of output]
            Package libffi was not found in the pkg-config search path.
            Perhaps you should add the directory containing `libffi.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'libffi', required by 'virtual:world', not found
            Package libffi was not found in the pkg-config search path.
            Perhaps you should add the directory containing `libffi.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'libffi', required by 'virtual:world', not found
            Package libffi was not found in the pkg-config search path.
            Perhaps you should add the directory containing `libffi.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'libffi', required by 'virtual:world', not found
            Package libffi was not found in the pkg-config search path.
            Perhaps you should add the directory containing `libffi.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'libffi', required by 'virtual:world', not found
            Package libffi was not found in the pkg-config search path.
            Perhaps you should add the directory containing `libffi.pc'
            to the PKG_CONFIG_PATH environment variable
            Package 'libffi', required by 'virtual:world', not found
      
                No working compiler found, or bogus compiler options passed to
                the compiler from Python's standard "distutils" module.  See
                the error messages above.  Likely, the problem is not related
                to CFFI but generic to the setup.py of any Python package that
                tries to compile C code.  (Hints: on OS/X 10.8, for errors about
                -mno-fused-madd see http://stackoverflow.com/questions/22313407/
                Otherwise, see https://wiki.python.org/moin/CompLangPython or
                the IRC channel #python on irc.libera.chat.)
      
                Trying to continue anyway.  If you are trying to install CFFI from
                a build done in a different context, you can ignore this warning.
      
            /tmp/pip-build-env-bcny16u4/overlay/lib/python3.9/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
            !!
      
                    ********************************************************************************
                    The license_file parameter is deprecated, use license_files instead.
      
                    This deprecation is overdue, please update your project and remove deprecated
                    calls to avoid build errors in the future.
      
                    See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
                    ********************************************************************************
      
            !!
              parsed = self.parsers.get(option_name, lambda x: x)(value)
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.linux-aarch64-cpython-39
            creating build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/ffiplatform.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/vengine_cpy.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/recompiler.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/__init__.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/commontypes.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/cparser.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/_shimmed_dist_utils.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/_imp_emulation.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/lock.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/api.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/backend_ctypes.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/error.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/model.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/pkgconfig.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/cffi_opcode.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/verifier.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/setuptools_ext.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/vengine_gen.py -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/_cffi_include.h -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/parse_c_type.h -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/_embedding.h -> build/lib.linux-aarch64-cpython-39/cffi
            copying src/cffi/_cffi_errors.h -> build/lib.linux-aarch64-cpython-39/cffi
            running build_ext
            building '_cffi_backend' extension
            creating build/temp.linux-aarch64-cpython-39
            creating build/temp.linux-aarch64-cpython-39/src
            creating build/temp.linux-aarch64-cpython-39/src/c
            gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.9 -c src/c/_cffi_backend.c -o build/temp.linux-aarch64-cpython-39/src/c/_cffi_backend.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 cffi
      Failed to build cffi
      ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects
      
      [notice] A new release of pip available: 22.2.2 -> 23.3.1
      [notice] To update, run: pip install --upgrade pip
      [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.

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=469944
Error message validated: Building wheel for cffi (pyproject.toml) did not run successfully.
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/15/2023 12:17:17 AM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Metadata

Metadata

Assignees

Labels

Known Build ErrorOps - Service MaintenanceUsed to track issues related to maintaining the services .NET Eng SupportsProposed-for-DncDevOpsIssues or epics which may represent operational tasks, for consideration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions