Closed Bug 1686651 Opened 3 years ago Closed 2 years ago

`./mach bootstrap` failed on pip-install zstandard

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: alwu, Assigned: sheehan)

References

Details

when running $mach bootstrap, I got this zstandard failure and I'm on Ubuntu 20.04,

Collecting zstandard==0.13.0
  Using cached zstandard-0.13.0.tar.gz (659 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/alwu/.mozbuild/_virtualenvs/mach/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jwj03b7k/zstandard_b47bd0d6ea124ebbb583fa4048450561/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jwj03b7k/zstandard_b47bd0d6ea124ebbb583fa4048450561/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-px2orf8z
         cwd: /tmp/pip-install-jwj03b7k/zstandard_b47bd0d6ea124ebbb583fa4048450561/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-jwj03b7k/zstandard_b47bd0d6ea124ebbb583fa4048450561/setup.py", line 74, in <module>
        import make_cffi
      File "/tmp/pip-install-jwj03b7k/zstandard_b47bd0d6ea124ebbb583fa4048450561/make_cffi.py", line 170, in <module>
        ffi = cffi.FFI()
      File "/home/alwu/.local/lib/python3.6/site-packages/cffi/api.py", line 54, in __init__
        raise Exception("Version mismatch: this is the 'cffi' package version %s, located in %r.  When we import the top-level '_cffi_backend' extension module, we get version %s, located in %r.  The two versions should be equal; check your installation." % (
    Exception: Version mismatch: this is the 'cffi' package version 1.14.3, located in '/home/alwu/.local/lib/python3.6/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.14.4, located in '/home/alwu/.mozbuild/_virtualenvs/mach/lib/python3.9/site-packages/_cffi_backend.cpython-39-x86_64-linux-gnu.so'.  The two versions should be equal; check your installation.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error running mach:

    ['create-mach-environment']

Thanks for reporting this!
Do you use pyenv? I'm surprised that you have Python 3.6 packages (/home/alwu/.local/lib/python3.6/site-packages) and python 3.9 packages (/home/alwu/.mozbuild/_virtualenvs/mach/lib/python3.9/site-packages).

I'm guessing that uninstalling cffi from your local site-packages should work around this issue.
Run python_3.6_however_you_run_it_on_your_machine -m pip uninstall -y cffi, then try bootstrapping again and see if zstandard compiles properly.

Flags: needinfo?(alwu)

uninstalling cffi did help! Thank you!

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(alwu)
Resolution: --- → WORKSFORME

Going to re-open this because having packages installed in local site-packages shouldn't cause breakage :)

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee: nobody → sheehan

I think this has been resolved through other changes.

Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.