Closed Bug 1661536 Opened 4 years ago Closed 4 years ago

Bootstrap on Windows fails with ModuleNotFoundError: No module named 'zstandard'

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

Unspecified
Windows
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1660559

People

(Reporter: bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

 0:20.52 Using artifact from local cache: c:\Users\dblohm7\.mozbuild\toolchains\4c7752c668925931-clang.tar.zst
Requirement already satisfied: zstandard<=0.13.0,>=0.9.0 in c:\users\dblohm7\.mozbuild\_virtualenvs\mach\lib\site-packages (0.13.0)
Requirement already satisfied: cffi>=1.11 in c:\users\dblohm7\.mozbuild\_virtualenvs\mach\lib\site-packages (from zstandard<=0.13.0,>=0.9.0) (1.14.2)
Requirement already satisfied: pycparser in c:\users\dblohm7\.mozbuild\_virtualenvs\mach\lib\site-packages (from cffi>=1.11->zstandard<=0.13.0,>=0.9.0) (2.20)
WARNING: You are using pip version 19.3.1; however, version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Error running mach:

    ['artifact', 'toolchain', '--bootstrap', '--from-build', 'win64-clang-cl']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file artifact| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

ModuleNotFoundError: No module named 'zstandard'

  File "c:\Users\dblohm7\src\mc2\python/mozbuild/mozbuild/artifact_commands.py", line 472, in artifact_toolchain
    unpack_file(local)
  File "c:\Users\dblohm7\src\mc2\python/mozbuild\mozbuild\action\tooltool.py", line 918, in unpack_file
    import zstandard
  File "c:\Users\dblohm7\src\mc2\build/mach_bootstrap.py", line 474, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit
Error running mach:

    ['bootstrap']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file bootstrap| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['c:\\Users\\dblohm7\\mozilla-build\\python3\\python3.exe', 'c:\\Users\\dblohm7\\src\\mc2\\mach', 'artifact', 'toolchain', '--bootstrap', '--from-build', 'win64-clang-cl']' returned non-zero exit status 1.

  File "c:\Users\dblohm7\src\mc2\python/mozboot/mozboot/mach_commands.py", line 45, in bootstrap
    bootstrapper.bootstrap()
  File "c:\Users\dblohm7\src\mc2\python/mozboot\mozboot\bootstrap.py", line 578, in bootstrap
    checkout_root)
  File "c:\Users\dblohm7\src\mc2\python/mozboot\mozboot\bootstrap.py", line 425, in maybe_install_private_packages_or_exit
    self.instance.ensure_stylo_packages(state_dir, checkout_root)
  File "c:\Users\dblohm7\src\mc2\python/mozboot\mozboot\mozillabuild.py", line 234, in ensure_stylo_packages
    self.install_toolchain_artifact(state_dir, checkout_root, stylo.WINDOWS_CLANG)
  File "c:\Users\dblohm7\src\mc2\python/mozboot\mozboot\base.py", line 356, in install_toolchain_artifact
    subprocess.check_call(cmd, cwd=state_dir)
  File "c:\Users\dblohm7\mozilla-build\python3\lib\subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit

The only way I've been able to fix this is to do a clobber followed by a ./mach create-mach-enviornment, but recently I've had to do this every single time I bootstrap after updating my tree.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.