Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another bazel build failure on a fresh checkout #20

Closed
jasnell opened this issue Sep 25, 2022 · 4 comments
Closed

Another bazel build failure on a fresh checkout #20

jasnell opened this issue Sep 25, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@jasnell
Copy link
Member

jasnell commented Sep 25, 2022

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$ 
@jasnell
Copy link
Member Author

jasnell commented Sep 25, 2022

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

@kentonv
Copy link
Member

kentonv commented Sep 25, 2022

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

@Electroid Electroid added the bug Something isn't working label Sep 26, 2022
@jasnell
Copy link
Member Author

jasnell commented Sep 27, 2022

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

@penalosa
Copy link
Collaborator

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
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants