Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Missing crc32c/crc32c.h: #85

Closed
Closed

Description

@TristanB1994

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.

If the support paths suggested above still do not result in a resolution, please provide the following details.

Environment details

  • Programming language:
  • OS:
  • Language runtime version:
  • Package version:

Steps to reproduce

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/root/.pyenv/versions/3.7.1/include/python3.7m -c src/google_crc32c/_crc32c.c -o build/temp.linux-x86_64-3.7/src/google_crc32c/_crc32c.o

src/google_crc32c/_crc32c.c:3:10: fatal error: crc32c/crc32c.h: No such file or directory

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Activity

  1. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Sep 1, 2021
  2. tseaver commented on Sep 2, 2021

    @tseaver
    Contributor

    @TristanB1994 Can you check whether installing 1.1.4 works for you?

  3. guilhermearaujo commented on Sep 6, 2021

    @guilhermearaujo

    @tseaver I'm having the same issue, and 1.1.4 did not seem to have fixed 😕

    ❯ pip install google-crc32c==1.1.4 -v
    Using pip 21.2.4 from /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/lib/python3.9/site-packages/pip (python 3.9)
    Using pip 21.2.4 from /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/lib/python3.9/site-packages/pip (python 3.9)
    Collecting google-crc32c==1.1.4
      Using cached google-crc32c-1.1.4.tar.gz (12 kB)
      Running command /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/bin/python /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-standalone-pip-ivl8f9uk/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-build-env-q5q9hw45/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel
      Collecting setuptools
        Using cached setuptools-58.0.0-py3-none-any.whl (816 kB)
      Collecting wheel
        Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
      Installing collected packages: wheel, setuptools
      Successfully installed setuptools-58.0.0 wheel-0.37.0
      Installing build dependencies ... done
      Running command /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/bin/python /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/tmp0xi4_yym
      running egg_info
      writing src/google_crc32c.egg-info/PKG-INFO
      writing dependency_links to src/google_crc32c.egg-info/dependency_links.txt
      writing requirements to src/google_crc32c.egg-info/requires.txt
      writing top-level names to src/google_crc32c.egg-info/top_level.txt
      reading manifest file 'src/google_crc32c.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'src/google_crc32c_build.py'
      adding license file 'LICENSE'
      writing manifest file 'src/google_crc32c.egg-info/SOURCES.txt'
      Getting requirements to build wheel ... done
        Running command /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/bin/python /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/tmpzzlwm6ku
        running dist_info
        creating /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info
        writing /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/PKG-INFO
        writing dependency_links to /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/dependency_links.txt
        writing requirements to /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/requires.txt
        writing top-level names to /private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/top_level.txt
        writing manifest file '/private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/SOURCES.txt'
        reading manifest file '/private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching 'src/google_crc32c_build.py'
        adding license file 'LICENSE'
        writing manifest file '/private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.egg-info/SOURCES.txt'
        creating '/private/var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/pip-modern-metadata-giy80kca/google_crc32c.dist-info'
        adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
        Preparing wheel metadata ... done
    Building wheels for collected packages: google-crc32c
      Running command /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/bin/python /Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/56/z3rmkprj3_l1_0pmyftc7f1h0000gn/T/tmp52w1e2vv
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.4-arm64-3.9
      creating build/lib.macosx-11.4-arm64-3.9/google_crc32c
      copying src/google_crc32c/_checksum.py -> build/lib.macosx-11.4-arm64-3.9/google_crc32c
      copying src/google_crc32c/cext.py -> build/lib.macosx-11.4-arm64-3.9/google_crc32c
      copying src/google_crc32c/__init__.py -> build/lib.macosx-11.4-arm64-3.9/google_crc32c
      copying src/google_crc32c/__config__.py -> build/lib.macosx-11.4-arm64-3.9/google_crc32c
      copying src/google_crc32c/python.py -> build/lib.macosx-11.4-arm64-3.9/google_crc32c
      running build_ext
      building 'google_crc32c._crc32c' extension
      creating build/temp.macosx-11.4-arm64-3.9
      creating build/temp.macosx-11.4-arm64-3.9/src
      creating build/temp.macosx-11.4-arm64-3.9/src/google_crc32c
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I /opt/homebrew/opt/openssl/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I /opt/homebrew/opt/openssl/include -I /opt/homebrew/opt/openssl/include -I/Users/guilhermearaujo/Library/Caches/pypoetry/virtualenvs/EZMjWspZ-py3.9/include -I/Users/guilhermearaujo/.pyenv/versions/3.9.5/include/python3.9 -c src/google_crc32c/_crc32c.c -o build/temp.macosx-11.4-arm64-3.9/src/google_crc32c/_crc32c.o
      src/google_crc32c/_crc32c.c:3:10: fatal error: 'crc32c/crc32c.h' file not found
      #include <crc32c/crc32c.h>
               ^~~~~~~~~~~~~~~~~
      1 error generated.
      ERROR:root:Compiling the C Extension for the crc32c library failed. To enable building / installing a pure-Python-only version, set 'CRC32C_PURE_PYTHON=1' in the environment.
      error: command '/usr/bin/clang' failed with exit code 1
      Building wheel for google-crc32c (PEP 517) ... error
      ERROR: Failed building wheel for google-crc32c
    Failed to build google-crc32c
    ERROR: Could not build wheels for google-crc32c which use PEP 517 and cannot be installed directly
    

    Using the env var CRC32C_PURE_PYTHON=1, as suggested, did allow me to install it (and v 1.1.3 too), but I'm yet not sure what consequences that may cause to my project

  4. tseaver commented on Sep 7, 2021

    @tseaver
    Contributor

    @guilhermearaujo What OS / platform are you usiing? From the traceback, it appears to be MacOS 11 (Big Sur) on M1 / ARM processor. We have work in progress to build native binary wheels for that platform, but no timeframe yet established.

    Using the env var CRC32C_PURE_PYTHON=1, as suggested, did allow me to install it (and v 1.1.3 too), but I'm yet not sure what consequences that may cause to my project.

    Depends on how you use it. The pure Python implementation of the library is much slower for large uploads / downloads than the C version.

  5. guilhermearaujo commented on Sep 7, 2021

    @guilhermearaujo

    Yes, macOS 11.5.2 on ARM M1. I have an Intel on the same macOS version that build it just fine with no extra configuration.

  6. tseaver commented on Sep 7, 2021

    @tseaver
    Contributor

    You might be able to build and install the google/crc32c library locally, before the Python wrapper. E.g.:

    $ git clone https://github.com/google/crc32c
    $ cd crc32c
    $ git submodule update --init --recursive
    $ python3 -m venv venv
    $ venv/bin/pip install cmake
    $ mkdir build
    $ cd build
    $ cmake DCMAKE_BUILD_TYPE=Release -DCRC32C_BUILD_TESTS=0 -DCRC32C_BUILD_BENCHMARKS=0 ..
    $ make all install # might need to run as root
  7. tseaver commented on Sep 17, 2021

    @tseaver
    Contributor

    @TristanB1994 Please feel free to follow up if you cannot install from the most recent release. If so, please include details on the version of linux you are using.

    @guilhermearaujo PR #106 switched our release machinery to use CIBuildWheel, which enabled building universal2 wheels. That PR should land in a release on Monday. In the meanwhile, if you'd like to try out the universal2 wheels, you can download the artifact tarball from the test of that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions