Re: Opinions on the "statically-linked-binary" Lintian check
On Sat, Sep 13, 2025 at 4:41 PM Nilesh Patra <nilesh@debian.org> wrote:
>
> On 13/09/25 11:54 am, Shengjing Zhu wrote:
> > On Sat, Sep 13, 2025 at 2:44 AM Emanuele Rocca <ema@debian.org> wrote:
> >> By default, executables produced by the golang
> >> compiler have both, and thus are not considered to be statically linked.
> >
> > This doesn't apply to packages that don't use any cgo. For example,
> > efm-langserver[1] doesn't link libc and it uses default build options.
> > [1] https://tracker.debian.org/pkg/efm-langserver
> >
> > You can find other examples by searching packages that don't depend on
> > libc and have golang in built-using field.
>
> There's "hey" package https://tracker.debian.org/pkg/hey which reports the
> binary to be dynamically linked due to depending on libc6.
>
> But on a quick look, I do not see any CGO stuff there. Do you happen to know
> why this ends up depending on libc (and inturn ends up with dynamic link)?
It uses "net" from std library, which uses cgo.
https://sources.debian.org/src/hey/0.1.4%2Bds-1/hey.go#L23
--
Shengjing Zhu
Reply to: