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

thrift bazel modules conflicts on macos m1 #78

Open
tongke6 opened this issue Dec 18, 2024 · 1 comment
Open

thrift bazel modules conflicts on macos m1 #78

tongke6 opened this issue Dec 18, 2024 · 1 comment

Comments

@tongke6
Copy link

tongke6 commented Dec 18, 2024

Hello Babylon maintainers, our project uses BRPC and we encountered the following issue when compiling on the macOS M1 platform.

ERROR: /private/var/tmp/_bazel_distiller/bedaa68a8664d1b29e96b826d058247f/external/bazel_tools/tools/build_defs/repo/utils.bzl:120:15: An error occurred during the fetch of repository 'thrift~':
   Traceback (most recent call last):
        File "/private/var/tmp/_bazel_distiller/bedaa68a8664d1b29e96b826d058247f/external/bazel_tools/tools/build_defs/repo/http.bzl", line 148, column 26, in _http_archive_impl
                download_remote_files(ctx)
        File "/private/var/tmp/_bazel_distiller/bedaa68a8664d1b29e96b826d058247f/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 120, column 15, in download_remote_files
                p.wait()
Error in wait: java.io.IOException: Error downloading [https://baidu.github.io/babylon/registry/modules/thrift/0.21.0/overlay/BUILD] to /private/var/tmp/_bazel_distiller/bedaa68a8664d1b29e96b826d058247f/external/thrift~/BUILD: /private/var/tmp/_bazel_distiller/bedaa68a8664d1b29e96b826d058247f/external/thrift~/BUILD (Is a directory)

The reason might be that the macOS file system is case-insensitive, and thrift has a 'build' directory that conflicts with the Bazel 'BUILD' file.

@tongke6
Copy link
Author

tongke6 commented Dec 18, 2024

The solution is simple: rename the 'BUILD' file to 'BUILD.bazel' to avoid the conflict.
I have already submitted this change to secretflow/bazel-registry: https://github.com/secretflow/bazel-registry/blob/fb47e8fc01eca238f2d3ed15b3d066450d91ec2f/modules/thrift/0.21.0/source.json#L10

If you agree, I would be happy to make the modification in Babylon's modules as well.

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

No branches or pull requests

1 participant