Skip to content

Another bazel build failure on a fresh checkout #20

Closed

Description

@jasnell

Fresh checkout of the repo...

jasnell@Cloudflare:~/projects/workerd$ bazel build //src/workerd/server:workerd
INFO: Repository v8_python_deps instantiated at:
  /home/jasnell/projects/workerd/WORKSPACE:200:12: in <toplevel>
  /home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip.bzl:53:19: in pip_install
Repository rule pip_repository defined at:
  /home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/pip_repository.bzl:67:33: in <toplevel>
ERROR: An error occurred during the fetch of repository 'v8_python_deps':
   Traceback (most recent call last):
        File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/pip_repository.bzl", line 63, column 13, in _pip_repository_impl
                fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: rules_python_external failed:  (Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/__main__.py", line 16, in <module>
    from pip._internal.main import main as _main  # isort:skip # noqa
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/main.py", line 13, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/autocompletion.py", line 11, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__main__.py", line 5, in <module>
    main()
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__init__.py", line 87, in main
    subprocess.run(pip_args, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'wheel', '-r', '/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/v8/bazel/requirements.txt', '--require-hashes']' returned non-zero exit status 1.
)
ERROR: /home/jasnell/projects/workerd/WORKSPACE:200:12: fetching pip_repository rule //external:v8_python_deps: Traceback (most recent call last):
        File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/pip_repository.bzl", line 63, column 13, in _pip_repository_impl
                fail("rules_python_external failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: rules_python_external failed:  (Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/__main__.py", line 16, in <module>
    from pip._internal.main import main as _main  # isort:skip # noqa
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/main.py", line 13, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/autocompletion.py", line 11, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__main__.py", line 5, in <module>
    main()
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__init__.py", line 87, in main
    subprocess.run(pip_args, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'wheel', '-r', '/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/v8/bazel/requirements.txt', '--require-hashes']' returned non-zero exit status 1.
)
INFO: Repository ssl instantiated at:
  /home/jasnell/projects/workerd/WORKSPACE:44:13: in <toplevel>
Repository rule http_archive defined at:
  /home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
ERROR: /home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/workerd-v8/BUILD.bazel:1:11: @workerd-v8//:v8 depends on @v8//:v8_icu in repository @v8 which failed to fetch. no such package '@v8_python_deps//': rules_python_external failed:  (Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/__main__.py", line 16, in <module>
    from pip._internal.main import main as _main  # isort:skip # noqa
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/main.py", line 13, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/autocompletion.py", line 11, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/pypi__pip/pip/_internal/cli/cmdoptions.py", line 19, in <module>
    from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils.util'
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__main__.py", line 5, in <module>
    main()
  File "/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/rules_python/python/pip_install/extract_wheels/__init__.py", line 87, in main
    subprocess.run(pip_args, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', 'wheel', '-r', '/home/jasnell/.cache/bazel/_bazel_jasnell/d8d6f6915f66665582ff8c3cdeaeb6c6/external/v8/bazel/requirements.txt', '--require-hashes']' returned non-zero exit status 1.
)
ERROR: Analysis of target '//src/workerd/server:workerd' failed; build aborted: 
INFO: Elapsed time: 2.363s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 16 targets configured)
    currently loading: @v8//
jasnell@Cloudflare:~/projects/workerd$ ^C
jasnell@Cloudflare:~/projects/workerd$ 

Activity

  1. jasnell commented on Sep 25, 2022

    @jasnell
    CollaboratorAuthor

    Installing python3-pip seems to fix it. Might need to call it out as a dependency for building

  2. kentonv commented on Sep 25, 2022

    @kentonv
    Member

    Hmm, this dependency is not new, though. Why did it work for you before?

  3. jasnell commented on Sep 27, 2022

    @jasnell
    CollaboratorAuthor

    I was on a fresh Ubuntu image going through the initial set up on a fresh system to see what issues I ran into. I'm assuming the other systems had python3-pip already installed

  4. penalosa commented on Sep 27, 2022

    @penalosa
    Contributor

    I ran into this on a fresh ubuntu docker image as well—installing python3-distutils seemed to fix it

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions