[Bug 1913852] Re: zLib link failures on Xenial
This bug was fixed in the package golang-1.13 - 1.13.8-1ubuntu1~16.04.3 --- golang-1.13 (1.13.8-1ubuntu1~16.04.3) xenial; urgency=medium * Workaround a debhelper/binutils combo bug on Xenial where compress/zlib.a gets stripped, which mangles it. (LP: #1913852) -- Michael Hudson-Doyle Thu, 11 Feb 2021 14:39:49 +1300 ** Changed in: golang-1.13 (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
verified that 1.13.8-1ubuntu1~16.04.3 works ** Tags removed: verification-needed verification-needed-xenial ** Tags added: verification-done-xenial ** Tags added: verification-needed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
Hello rojer, or anyone else affected, Accepted golang-1.13 into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.13/1.13.8-1ubuntu1~16.04.3 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-xenial. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: golang-1.13 (Ubuntu Xenial) Status: New => Fix Committed ** Tags added: verification-needed verification-needed-xenial ** Changed in: golang-1.13 (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
yep, confirmed that 1.13.8-1ubuntu1~16.04.3~ppa1 fixes the issue -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
I've uploaded a fix to unapproved. You can also try the version from https://launchpad.net/~mwhudson/+archive/ubuntu/devirt/+packages to see if it helps. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
** Also affects: golang-1.13 (Ubuntu Xenial) Importance: Undecided Status: New ** Description changed: + [impact] + Applications that use the "compress/zlib" package fail to build. + + [test case] + $ cat > go.mod + module github.com/foo/baz + + go 1.13 + $ cat > main.go + package main + + import ( + "bytes" + "compress/zlib" + ) + + func main() { + var b bytes.Buffer + w := zlib.NewWriter() + w.Write([]byte("hello, world\n")) + w.Close() + } + $ go build -v + + The final command will fail before this is fixed and pass after. + + [regression potential] + The fix is just preventing debhelper from stripping the zlib.a file in golang-1.13-go. Rebuilding the go toolchain one more time should not introduce any changes (the go project is pretty good about bootstrap hygiene). + + [original description] Backported go-1.13 came with issues with zlib. In some projects i see link errors: golang.org/x/crypto/openpgp/packet.(*Compressed).parse: relocation target compress/zlib.NewReaderDict not defined github.com/go-git/go-git/v5/plumbing/format/packfile.NewEncoder: relocation target compress/zlib.NewWriterLevelDict not defined github.com/go-git/go-git/v5/plumbing/format/packfile.(*Encoder).entry: relocation target compress/zlib.(*Writer).Reset not defined github.com/go-git/go-git/v5/plumbing/format/packfile.(*Scanner).copyObject: relocation target type.compress/zlib.Resetter not defined ... + also reported in + https://github.com/GoogleCloudPlatform/osconfig/issues/279 - also reported in https://github.com/GoogleCloudPlatform/osconfig/issues/279 + and compiling a trivial program (example from compress/zlib reference) + causes crash during linking: - - and compiling a trivial program (example from compress/zlib reference) causes crash during linking: - - - root@a6a24cdee4e3:/src/qqq# cat go.mod + root@a6a24cdee4e3:/src/qqq# cat go.mod module github.com/foo/baz go 1.13 - root@a6a24cdee4e3:/src/qqq# cat main.go + root@a6a24cdee4e3:/src/qqq# cat main.go package main import ( - "bytes" - "compress/zlib" + "bytes" + "compress/zlib" ) func main() { - var b bytes.Buffer - w := zlib.NewWriter() - w.Write([]byte("hello, world\n")) - w.Close() + var b bytes.Buffer + w := zlib.NewWriter() + w.Write([]byte("hello, world\n")) + w.Close() } root@a6a24cdee4e3:/src/qqq# go version go version go1.13.8 linux/amd64 - root@a6a24cdee4e3:/src/qqq# cat /etc/lsb-release + root@a6a24cdee4e3:/src/qqq# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS" root@a6a24cdee4e3:/src/qqq# go build -v # github.com/foo/baz panic: runtime error: index out of range [23] with length 0 goroutine 1 [running]: cmd/link/internal/ld.decodetypeKind(...) - /usr/lib/go-1.13/src/cmd/link/internal/ld/decodesym.go:69 + /usr/lib/go-1.13/src/cmd/link/internal/ld/decodesym.go:69 cmd/link/internal/ld.newtype(0xc0006f4000, 0xc0007146e0, 0xc000618e68) - /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:424 +0x29e1 + /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:424 +0x29e1 cmd/link/internal/ld.defgotype(0xc0006f4000, 0xc0007146e0, 0x1a) - /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:419 +0x1c8 + /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:419 +0x1c8 cmd/link/internal/ld.dwarfGenerateDebugInfo(0xc0006f4000) - /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:1900 +0x91c + /usr/lib/go-1.13/src/cmd/link/internal/ld/dwarf.go:1900 +0x91c cmd/link/internal/ld.Main(0x84cdc0, 0x10, 0x20, 0x1, 0x7, 0x10, 0x69ac6f, 0x1b, 0x697756, 0x14, ...) - /usr/lib/go-1.13/src/cmd/link/internal/ld/main.go:212 +0xb92 + /usr/lib/go-1.13/src/cmd/link/internal/ld/main.go:212 +0xb92 main.main() - /usr/lib/go-1.13/src/cmd/link/main.go:65 +0x1d6 + /usr/lib/go-1.13/src/cmd/link/main.go:65 +0x1d6 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
Oh I have dealt with this before: the problem is that debhelper (in xenial) thinks that "zlib.a" is a static library (it's trying to find files with names of the form "libXXX.a" but uses a bad regex) and feeds it to strip as part of the package build, which mangles the file. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
Well here's a funny thing: root@xenial:~/# go tool pack tv /usr/lib/go-1.13/pkg/linux_amd64/compress/zlib.a -rw-r--r-- 0/0 5145 Jan 1 00:00 1970 __.PKGDEF/ -rw-r--r-- 0/0 46655 Jan 1 00:00 1970 _go_.o/ why are there / on the end of the archive names? No idea, but it's probably why nothing is happy. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
yes, zlib.a is bad: root@26d441ac192e:/usr/lib/go-1.13/src/cmd/link# go tool nm /usr/lib/go-1.13/pkg/linux_amd64/compress/zlib.a | head open /usr/lib/go-1.13/pkg/linux_amd64/compress/zlib.a: unrecognized object file on the surface it does look like go archive but obviously something is not quite right. gzip.a in the same directory is fine: root@26d441ac192e:/usr/lib/go-1.13/src/cmd/link# go tool nm /usr/lib/go-1.13/pkg/linux_amd64/compress/gzip.a | head U U bufio.(*Reader).Read U bufio.(*Reader).ReadByte U bufio..inittask U compress/flate.(*Writer).Reset U compress/flate.(*compressor).close U compress/flate.(*compressor).syncFlush U compress/flate.(*compressor).write U compress/flate..inittask U compress/flate.NewReader -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1913852] Re: zLib link failures on Xenial
Huh this is very strange. I notice that go build -a succeeds so I wonder if one of the .a files that's part of golang-1.13-go is broken somehow? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1913852 Title: zLib link failures on Xenial To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang-1.13/+bug/1913852/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs