On Wed, 23 Jul 2025 at 04:50, Andrea Pappacoda <[email protected]> wrote:
> Hi! > > First message here on the list :) > > Yesterday I came across go's -buildmode=shared and -linkshared options. > As far as I know, there hasn't been any discussion about them here. > > In case you don't know what they do (just like myself a few days ago), > they can be used to achieve dynamic linking in Go programs. Unlike other > languages like C, though, binary compatibility is not guaranteed across > compiler releases. -buildmode=shared can be used while building to > generate a shared object, while -linkshared tells the toolchain to use > such shared objects for linking. More information can be found running > `go help buildmode` and at <https://go.dev/s/execmodes>. > > Why aren't we using them in Debian? Did we already have this discussion, > and I have simply missed it? > > Curious to know! Bye :) > For a while, Ubuntu was carrying a patch to dh-golang that allowed shared linking: https://launchpadlibrarian.net/268096734/dh-golang_1.17ubuntu1_1.18ubuntu1.diff.gz My understanding is that they stopped doing so because it's generally got all the downsides of what we do now, but *also* introduces several more, like hassles during package upgrades (where the dependencies on rebuilds have to be *just *so or else nothing works properly), but I don't know if there was ever an official (public?) writeup about Ubuntu stopping doing that (I've added mwhudson on CC in the hopes he might know more / have a good href). ♥, - Tianon 4096R / B42F 6819 007F 00F8 8E36 4FD4 036A 9C25 BF35 7DD4
