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

[Bug]: ruff failing on Mac x86 #46

Closed
nlou9 opened this issue Nov 7, 2023 · 1 comment
Closed

[Bug]: ruff failing on Mac x86 #46

nlou9 opened this issue Nov 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@nlou9
Copy link
Contributor

nlou9 commented Nov 7, 2023

What happened?

try to load ruff binary, it failed with the following error

% bazel run //:ruff    
bazel::login succeed
Starting local Bazel server and connecting to it...
INFO: Invocation ID: a203b7e2-c67c-459c-a6f0-a6ea586fcba8
INFO: Analyzed target //:ruff (6 packages loaded, 15 targets configured).
INFO: Found 1 target...
Target @ruff_x86_64-apple-darwin//:ruff up-to-date (nothing to build)
INFO: Elapsed time: 11.382s, Critical Path: 0.05s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: /private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 1: 3: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 2: 0: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 3: 4096: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 4: 16384: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 5: 14503936: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 6: 14532608: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 7: 83144: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 8: ????X: command not found
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 9: syntax error near unexpected token `)'
/private/var/tmp/_bazel_nlou/b43af9baf9d056244183c6c3d6dd8487/external/ruff_x86_64-apple-darwin/ruff: line 9: `???H__PAGEZERO?__TEXT???__text__TEXT?F?*??F?__stubs__TEXT?q?q?__stub_helper__TEXT?u???u??__const__TEXT?|??%?|?__gcc_except_tab__TEXTX??}X??__cstring__TEXTp??)(p??__unwind_info__TEXT?%?\??%?__eh_frame__TEXT??????__DATA???(??
                                                                                                                                                         __program_vars__DATA??(??__nl_symbol_ptr__DATA(?(???__got__DATA0??`0???__la_symbol_ptr__DATA???`????__mod_init_func__DATA?????	__const__DATA??????__thread_vars__DATA?w???w?__data__DATA {? {?__thread_data__DATA ??@ ??__thread_bss__DATA`??h__common__DATA??(? __bss__DATA0.??H__LINKEDIT@?????D"?0??x(x???@H???8???'0????>
                                                                                                                  P???p??e 
                                                                                                                           /usr/lib/dyld??k&?<?̓"WD1g$'
Error: bazel exited with exit code: 2

Version

Development (host) and target OS/architectures: macOS x86

Output of bazel --version: Build label: 6.4.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

http_archive(
    name = "aspect_rules_lint",
    sha256 = "ddc21b1399c03708f82e5a46d6c747bf23d55484bad1efdaa92a22d5fee20ea1",
    strip_prefix = "rules_lint-0.5.0",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.5.0/rules_lint-v0.5.0.tar.gz",
)
load("@aspect_rules_lint//lint:ruff.bzl", "fetch_ruff")
fetch_ruff()

Language(s) and/or frameworks involved:
python

How to reproduce

Configure the WORKSPACE file as above. 

In BUILD.bazel: 
alias(
    name = "ruff",
    actual = select({
        "@bazel_tools//src/conditions:linux_x86_64": "@ruff_x86_64-unknown-linux-gnu//:ruff",
        "@bazel_tools//src/conditions:linux_aarch64": "@ruff_aarch64-unknown-linux-gnu//:ruff",
        "@bazel_tools//src/conditions:darwin_arm64": "@ruff_aarch64-apple-darwin//:ruff",
        "@bazel_tools//src/conditions:darwin_x86_64": "@ruff_x86_64-apple-darwin//:ruff",
    }),
)

bazel run //:ruff

Any other information?

No response

@nlou9 nlou9 added the bug Something isn't working label Nov 7, 2023
@nlou9 nlou9 changed the title [Bug]: ruff failing on MAC x86 [Bug]: ruff failing on Mac x86 Nov 7, 2023
@alexeagle
Copy link
Member

Dupe of #42

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

2 participants