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

go_proto_library output is not reproducible on different host platforms #3982

Open
Illedran opened this issue Jul 5, 2024 · 0 comments
Open

Comments

@Illedran
Copy link

Illedran commented Jul 5, 2024

What version of rules_go are you using?

0.48.1

What version of gazelle are you using?

0.37.0

What version of Bazel are you using?

7.2.1

Does this issue reproduce with the latest releases of all the above?

Those are the latest releases as of time of writing.

What operating system and processor architecture are you using?

Tried on Darwin/Linux, resp:

$ uname -sm
Darwin arm64
$ uname -sm
Linux x86_64

Any other potentially useful information about your toolchain?

See reproducer: https://github.com/Illedran/go_cross_reproducible

What did you do?

In the reproducer: bazel build //:cross. Inspecting the output of go_proto_library, in the transition triggered by go_cross_binary:

# Darwin
$ md5 bazel-out/darwin_arm64-fastbuild-ST-2c62b798ec6c/bin/proto/proto.a
MD5 (bazel-out/darwin_arm64-fastbuild-ST-2c62b798ec6c/bin/proto/proto.a) = c12605aa69aea711f341eab796689bff

# Linux
$ md5sum bazel-out/k8-fastbuild-ST-2c62b798ec6c/bin/proto/proto.a 
d3fd7a4e36f011b221e743132ff41c03  bazel-out/k8-fastbuild-ST-2c62b798ec6c/bin/proto/proto.a

A diff of those archives using diffoscope can be seen at https://try.diffoscope.org/xhsafcfsqkpf.html - but it's actually easier to see the problem on the final resulting binaries https://try.diffoscope.org/tpbcfezvbhvh.html, where it appears that part of path that is dependant on the host platform "leaks" into the final binary.


Conversation in Bazel's Slack: https://bazelbuild.slack.com/archives/CDBP88Z0D/p1720078099231259

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