Package: golang-1.17-go
Version: 1.17-2
Severity: important

It seems like the binary packages for 1.17-2 were somehow built wrong. Some
build-time generated code that would have defined defaultGOARCH and other
constants doesn't seem to have been generated & built, resulting in some
built-in packages being un-compilable.

This manifested for me with some build tooling, but I've narrowed it down to
this minimal reproducer:

package main
import _ "golang.org/x/tools/imports"
func main() {}

Trying to compile this results in errors:

# internal/buildcfg
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:25:29: undefined: defaultGOARCH
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:26:27: undefined: defaultGOOS
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:27:28: undefined: defaultGO386
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:33:13: undefined: defaultGO_LDSO
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:34:13: undefined: version
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:56:9: undefined: defaultGOARM
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:74:30: undefined: defaultGOMIPS
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:79:9: undefined: defaultGOMIPS
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:83:32: undefined: defaultGOMIPS64
/usr/lib/go-1.17/src/internal/buildcfg/exp.go:32:29: undefined: 
defaultGOEXPERIMENT
/usr/lib/go-1.17/src/internal/buildcfg/cfg.go:83:32: too many errors

Pulling 1.17-1 from snapshot.debian.org, it does not reproduce this. There's
only one meaningful commit on salsa between the two, though it's not clear
to me how it would produce this issue.

I tried building 1.17-2 locally from salsa commit 9a929cf2, and my locally
built packages also do not reproduce this issue, so it seems that there was
somehow simply an error in the build process for the official packages.

-- System Information:
Debian Release: 11.0
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-security'), (500, 
'oldstable-updates'), (500, 'testing'), (500, 'oldstable'), (490, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages golang-1.17-go depends on:
ii  golang-1.17-src  1.17-2
ii  libc6            2.31-13

Versions of packages golang-1.17-go recommends:
ii  g++         4:10.2.1-1
ii  gcc         4:10.2.1-1
ii  libc6-dev   2.31-13
ii  pkg-config  0.29.2-1

Versions of packages golang-1.17-go suggests:
pn  bzr | brz        <none>
ii  ca-certificates  20210119
ii  git              1:2.33.0-1
pn  mercurial        <none>
pn  subversion       <none>

-- no debconf information

Reply via email to