-
Notifications
You must be signed in to change notification settings - Fork 381
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
Missing input error with CGO dependency #1871
Comments
The file is a symlink in the repo. How is it represented in the repo directory? If it is missing, then we may be doing something wrong during the download. |
It's missing. If I look in my bazel cache where those files are downloaded, I only see a build file and a source file. The build file still references It seems plausible that the symlink isn't be resolved when its downloaded. Would that make this a potential cd /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~~go_deps~com_github_envoyproxy_envoy/contrib/golang/common/go/api_impl/
tree
.
├── BUILD
└── capi_impl.go |
Probably a Gazelle bug. This is how we fetch Go modules: https://github.com/bazelbuild/bazel-gazelle/blob/master/cmd/fetch_repo/module.go This does check the dirhash of the resulting directory, so I am surprised that this verification passes with the file missing. |
@fmeum I gave that a try. Gazelle fails to build when I set a local path. mkdir /tmp/gaz
cd !$
git clone https://github.com/bazelbuild/bazel-gazelle.git .
git checkout tags/v0.38.0 Then I pointed my project at my local copy of gazelle. local_path_override(
module_name = "gazelle",
path = "/tmp/gaz"
) It fails to build gazelle before I put debug prints in. ERROR: /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/external/gazelle~/flag/BUILD.bazel:3:11: GoCompilePkg external/gazelle~/flag/flag.a failed: (Exit 1): builder failed: error executing GoCompilePkg command (from target @@gazelle~//flag:flag) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_go~~go_sdk~collective__download_0/builder_reset/builder compilepkg -sdk external/rules_go~~go_sdk~collective__download_0 -goroot ... (remaining 25 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
compilepkg: open /home/user/.cache/bazel/_bazel_user/34c6fa7f467484e23b6742c76862b361/sandbox/linux-sandbox/251/execroot/_main/external/gazelle~/flag/flag.go: no such file or directory
Target //:gazelle failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.904s, Critical Path: 0.10s
INFO: 19 processes: 19 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target I tried sanity checking if gazelle even builds on my system. Running all tests
Am I missing something to get these playing nice together? |
These errors are extremely weird. What is Could you also try to run the Gazelle tests with |
This is the version of bazel that gets resolved from bazelisk. Bazelisk says its version is
Running with a
|
What version of gazelle are you using?
0.38.0
What version of rules_go are you using?
0.49.0
What version of Bazel are you using?
7.3.0rc2
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Fedora linux x86_64
What did you do?
This is my code. The envoy modules all have CGO dependencies, and depend on a c++ header.
When I run gazelle, the buildfiles get generated, and seem to be correct. Inspecting the build file in the bazel cache, it is identical to the build file in the repository. But the header file doesn't get included.
This is the module it isn't resolving. The
api.h
is not in bazels cache.https://github.com/envoyproxy/envoy/tree/978d911fa4b47d96b95f6c8d1ae9cd11b319caa8/contrib/golang/common/go/api_impl
What did you expect to see?
What did you see instead?
This is the module it isn't resolving. The
api.h
is not in bazels cache.https://github.com/envoyproxy/envoy/tree/978d911fa4b47d96b95f6c8d1ae9cd11b319caa8/contrib/golang/common/go/api_impl
The text was updated successfully, but these errors were encountered: