I faced the same problem lately. Have open an issue https://github.com/golang/go/issues/37158
On Thursday, February 6, 2020 at 8:53:03 AM UTC+1, Jérôme LAFORGE wrote: > > > I haven't verified this, so this is just a guess, but perhaps without >> -trimpath the go tool is using the prebuilt runtime/cgo.a, which was >> built on a system with a C compiler. When you add -trimpath, the >> runtime/cgo package needs to be rebuilt in order to trim the paths. >> Unfortunately, that rebuild fails, as the system you are building on >> does not have a C compiler. >> > > It would be great to prebuilt runtime/cgo.a also with `-trimpath` option > in order to avoid unobvious dependency with gcc when you have just added > `-trimpath` option or at least mention it in `go help build` doc. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/386bcc5e-2977-4e8a-9ee5-738b348fa00d%40googlegroups.com.