TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Perfectly Reproducible, Verified Go Toolchains

139 pointsby spaceyover 1 year ago

4 comments

gizzlonover 1 year ago
They use a Mac to compare the Ubuntu Go package to a self-compliled go from source:<p><i>&quot;Now we can diff the Go toolchain we’ve created on our Mac with the Go toolchain that Ubuntu ships:&quot;</i> [..]<p>&quot;<i>We’ve successfully reproduced the Ubuntu package’s executables&quot;</i> [..]<p><i>&quot;Note in particular that we’ve reconstructed the toolchain binaries bit-for-bit: they do not show up in the diff at all. That is, we proved that the Ubuntu Go binaries correspond exactly to the upstream Go sources.&quot;</i><p>Also, for your own programs:<p><i>&quot;For Go programs that don’t need cgo, a reproducible build is as simple as compiling with CGO_ENABLED=0 go build -trimpath. Disabling cgo removes the host C toolchain as a relevant input, and -trimpath removes the current directory&quot;</i>
mjl-over 1 year ago
It&#x27;s so great that you automatically get trivially reproducible builds with Go, even when cross-compiling. At least when not using cgo, which is why I avoid cgo.<p>Features like this take a lot of effort and aren&#x27;t very visible, but are very much appreciated. Thanks to everyone who worked on this!
Zababaover 1 year ago
That&#x27;s great news! Having recently started a job using Go, I like how the language is slowly but surely improving. It feels like it&#x27;s possible for me to catch up with what has already been done and the evolutions.
kunleyover 1 year ago
Great for CI maybe... not so much on the traveller&#x27;s dev laptop where you want to be quick and often operate on a broken internet link.<p>So, as much as I appreciate what Russ Cox is doing in general, how to just switch it off?
评论 #37312998 未加载