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
linkstamp not working under windows #6997
Comments
Thanks, I could repro this on Windows 10 x64 as well, and also with older Bazel versions (I tried 0.20.0, 0.19.0, 0.18.0). |
AFAICT this is a bug in the C++ rules. /cc @hlopko @scentini @oquenchil |
It is indeed! I don't like crashes. |
@hlopko has this issue been fixed in P1 release? If not, any hope it gets attention any time soon? |
We have to address this in the very near-term for the envoyproxy. Note that the solution isn't apparent to us yet; there is no option to link.exe to embed an arbitrary binary blob. |
Given the age I reverted the priority to 'untriaged' to signal a request for a more current prioritization. |
It turned out that the linkstamp problem wasn't unique to Windows... Building a library for iOS already had a workaround. This is what we ended up using for Windows in envoyproxy. It would still be nice to have a more generalized solution. Perhaps using the resource compiler and manifest for dll or exe binaries? |
This issue still occurs in bazel 4.2.1. Any update on when it will be fixed? @wrowe May I ask what your workaround was? |
Sorry, I don't have any update on this. |
We have code common to the library implementation (for iOS) shared with the windows .exe target which ignores the gcc version text section altogether, and uses a typical global static const to return the version, instead. |
You can observe our manual_linkstamp logic here https://github.com/envoyproxy/envoy/tree/main/source/common/version Particularly the BUILD logic. Our top level project .bazelrc toggles manual_stamp for windows targets. |
This issue was a blocker for us as well. I ended up making this small header codegen to get us past it. https://github.com/zaucy/rules_cc_stamp |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
Description of the problem / feature request:
linkstamp not working under windows.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
BUILD
Create
WORKSPACE
andstamp.cc
as empty file.Run
bazel build :main
What operating system are you running Bazel on?
windows 7 x64
What's the output of
bazel info release
?What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: