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

Bazel tools pkg_tar fails on Fedora 39 #20211

Closed
neckbosov opened this issue Nov 15, 2023 · 5 comments
Closed

Bazel tools pkg_tar fails on Fedora 39 #20211

neckbosov opened this issue Nov 15, 2023 · 5 comments

Comments

@neckbosov
Copy link

Description of the bug:

After updating my host system to fedora 39 I notices failure of pkg_tar targets (from @bazel_tools) in my project with the following traceback:

Traceback (most recent call last):
  File "/home/nikitabosov/.cache/bazel/_bazel_nikitabosov/d68312c3b2467869e50e3f7db2c64b88/sandbox/linux-sandbox/240/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/build_tar.py", line 21, in <module>
    from absl import app
  File "/home/nikitabosov/.cache/bazel/_bazel_nikitabosov/d68312c3b2467869e50e3f7db2c64b88/sandbox/linux-sandbox/240/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/app.py", line 38, in <module>
    from absl import flags
  File "/home/nikitabosov/.cache/bazel/_bazel_nikitabosov/d68312c3b2467869e50e3f7db2c64b88/sandbox/linux-sandbox/240/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/__init__.py", line 40, in <module>
    from absl.flags import _argument_parser
  File "/home/nikitabosov/.cache/bazel/_bazel_nikitabosov/d68312c3b2467869e50e3f7db2c64b88/sandbox/linux-sandbox/240/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/_argument_parser.py", line 29, in <module>
    from absl.flags import _helpers
  File "/home/nikitabosov/.cache/bazel/_bazel_nikitabosov/d68312c3b2467869e50e3f7db2c64b88/sandbox/linux-sandbox/240/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/_helpers.py", line 38, in <module>
    from six.moves import range  # pylint: disable=redefined-builtin
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'six.moves'

I tried to fix it by installing absl to system (python3.six was already installed) but it didn't help. The only workaround I found is to use pkg_tar rule from @rules_pkg. On Fedora 38 both ways worked well.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

Fedora 39

What is the output of bazel info release?

release 5.4.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

Found similar issue #11663 but it's already closed.

Any other information, logs, or outputs that you want to share?

No response

@sgowroji
Copy link
Member

Hi @neckbosov, Could you please provide complete steps to reproduce this issue?

@neckbosov
Copy link
Author

Hi @sgowroji, just set up some project which uses pkg_tar rules, when try to build it on Fedora 39. I cannot share exact code because it's proprientary.

BTW found discussion on Google groups, so I'm not sure it's Bazel problem, but you definetely have more ways to investigate.

@iancha1992 iancha1992 added team-Local-Exec Issues and PRs for the Execution (Local) team and removed more data needed labels Nov 17, 2023
@joeleba joeleba removed the team-Local-Exec Issues and PRs for the Execution (Local) team label Nov 21, 2023
@joeleba joeleba assigned joeleba and aiuto and unassigned joeleba Nov 21, 2023
@joeleba
Copy link
Member

joeleba commented Nov 21, 2023

@aiuto maybe you have some context on this.

@aiuto
Copy link
Contributor

aiuto commented Nov 21, 2023

This is not for rules_pkg

external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/build_tar.py", line 21,

That is the ancient (unsupported) pkg_tar from within Bazel itself. The current rules_pkg release should work with bazel 5.x, so just convert to that.

@jtillwickEA
Copy link

jtillwickEA commented Dec 20, 2024

This is not for rules_pkg

external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/build_tar.py", line 21,

That is the ancient (unsupported) pkg_tar from within Bazel itself. The current rules_pkg release should work with bazel 5.x, so just convert to that.

"just" lol. Like it is that easy.

I have the exact same issue and for reasons I cannot use the version of rules_pkg that has pkg_tar. How do I fix the original error with the built in version?

When I try I get this error:

Label '@rules_pkg//pkg:tar.bzl' is invalid because 'pkg' is not a package; perhaps you meant to put the colon here: '@rules_pkg//:pkg/tar.bzl'?

I love bazel so much.

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

No branches or pull requests

7 participants