-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Binary that depends on cloudflare/circl
can't be built cross-platform
#4154
Comments
Please test whether 87e66bb fixes this for you. |
I've added the following to my MODULE.bazel
And unfortunately
Fails I also tried with
and received a failure |
This might be a significantly simpler repro.
|
|
What about if you try cquery? |
Heh interesting..
I disabled However, even after removing nogo:
Fails to build
And unfortunately I can't run:
To see why this is happening since it fails with that same error. |
So, I've added two patches onto circl to make this work:
How I consume this:
With these changes, I can build fine now. I think what's happening is that unfortunately Any help to figure out how to fix this would be appreciated. Maybe I can maintain my own patches, but that seems awfully expensive just for this. |
I tried a different strategy. In this strategy I do not use
This allows me to build the go_binary target below:
However. It does not allow me to build the api_lib target:
The reason for this is that I can't define gotags on the go_library. I do know I can use Why are the build_tags I've defined in the override not actually propagating? Is this because of bazel-contrib/bazel-gazelle#1262? |
Perhaps you could use with_cfg to transition your binary? That way you can set gotags on it from build.bazel instead of affecting everything from CLI? |
What version of rules_go are you using?
0.50.1
What version of gazelle are you using?
0.39.1
What version of Bazel are you using?
7.4.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Darwin ARM64
Any other potentially useful information about your toolchain?
This is related to the infamous
circl
dependency.What did you do?
I have a go_binary that through a long list of dependencies ends up depending on
circl
. I do get circl from the BCR:My binary rule is defined as such:
I try to build it like:
My error:
What did you expect to see?
I expected this build to not need the C++ toolchain.
What did you see instead?
An error for C++ toolchain.
The text was updated successfully, but these errors were encountered: