Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[bazel-discuss] How can I introduce the dependency of another external library in the build file of an external library?

16 views
Skip to first unread message

shuman zhuang

unread,
Feb 7, 2025, 10:20:09 AMFeb 7
to bazel-discuss
Description: When using Bazel to build the Velox project, I encountered a compilation issue related to the Folly dependency. I've set up Folly using a path override locally and can compile it successfully by itself, but I am unable to compile within the Velox root directory using Bazel.

Steps to Reproduce:
1.Use local path override for Folly:
local_path_override(
    module_name = "folly_module",
    path = "/path/to/local/folly",
)
2.Run Bazel build in the Velox root directory:
bazel build //velox/common/encode:velox_encode
Error messages:

1.Dependencies defined in WORKSPACE are not visible.
粘贴的图形-1.png
In Velox dir:
粘贴的图形-3.png

2.Dependencies defined in MODULE.bzl are visible.
粘贴的图形-4.png
All module could load successfully


3.Bazel compiles successfully when run directly in the Folly directory with same MODULE.bazel and WORKSPACE files list above
粘贴的图形-5.png



Environment:

Operating System: CentOS 7
GCC Version: 12
Bazel Version: 7.4.1
Expected Behavior: I expect to successfully build targets within the Velox project that include my locally modified version of Folly, using the path override method.

Actual Behavior: Errors were reported indicating that dependencies are not visible, although compiling directly within the Folly directory succeeds.

Suggestions or Clues: I am looking for guidance on how to improve dependency visibility in this setup.
Reply all
Reply to author
Forward
0 new messages