Bug 973842
Summary: | golang package is unusable | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Paul P Komkoff Jr <i> |
Component: | golang | Assignee: | Adam Goode <adam> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | adam, aka.spin, i, jvillalo, lemenkov, renich, rjones, serge.de.souza |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | golang-1.1.1-5.fc18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-24 03:25:50 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Paul P Komkoff Jr
2013-06-12 22:51:46 UTC
Oops. What a mess. Part of this is https://code.google.com/p/go/issues/detail?id=3506 Mostly figured it out, should have something ready tomorrow. golang-1.1.1-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.1.1-1.fc19 golang-1.1.1-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/golang-1.1.1-1.fc18 golang-1.1.1-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/golang-1.1.1-1.fc17 Please try out the package (via updates-testing) and vote up if successful: https://admin.fedoraproject.org/updates/golang-1.1.1-1.fc18 Package golang-1.1.1-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing golang-1.1.1-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-10845/golang-1.1.1-1.fc19 then log in and leave karma (feedback). [stingray@arcane go2]$ go install bla/bla go install crypto: open /usr/lib64/golang/pkg/linux_amd64/crypto.a: permission denied :( I don't think the update is pushed out to all mirrors yet. You should wait another day or two. Can you check the version with rpm -q golang ? Name : golang Version : 1.1.1 Release : 1.fc18 Architecture: x86_64 I installed it directly from koji. Ok, I can reproduce this, so I am looking into it again. golang-1.1.1-2.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/golang-1.1.1-2.fc17 golang-1.1.1-2.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/golang-1.1.1-2.fc18 golang-1.1.1-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.1.1-2.fc19 Package golang-1.1.1-2.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing golang-1.1.1-2.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-11056/golang-1.1.1-2.fc19 then log in and leave karma (feedback). golang-1.1.1-3.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.1.1-3.fc19 golang-1.1.1-3.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/golang-1.1.1-3.fc18 golang-1.1.1-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/golang-1.1.1-3.fc17 Name : golang Arch : x86_64 Version : 1.1.1 Release : 2.fc18 Size : 64 M Repo : installed From repo : updates-testing Summary : The Go Programming Language URL : http://golang.org/ License : BSD Description : The Go Programming Language. Still no luck. go get -u github.com/nsf/gocode go install sync: open /usr/lib64/golang/pkg/linux_amd64/sync.a: permission denied go install sort: open /usr/lib64/golang/pkg/linux_amd64/sort.a: permission denied go install crypto/subtle: open /usr/lib64/golang/pkg/linux_amd64/crypto/subtle.a: permission denied go install strconv: open /usr/lib64/golang/pkg/linux_amd64/strconv.a: permission denied go install unicode: open /usr/lib64/golang/pkg/linux_amd64/unicode.a: permission denied Alexander, you're using the previos package (-2) but I'm using the correct one and it still doesn't work. I tried it, again needs permission to overwrite some libraries. Nevermind. Build from source. (In reply to Paul P Komkoff Jr from comment #21) > Alexander, you're using the previos package (-2) > but I'm using the correct one and it still doesn't work. I tried it, again > needs permission to overwrite some libraries. I'm also getting the same problem: $ export GOPATH=~/go $ go install libguestfs.org/guestfs go install errors: open /usr/lib64/golang/pkg/linux_amd64/errors.a: permission denied go install sync/atomic: open /usr/lib64/golang/pkg/linux_amd64/sync/atomic.a: permission denied go install math: open /usr/lib64/golang/pkg/linux_amd64/math.a: permission denied rjones@choo:~/d/libguestfs/golang$ ../run strace -o /tmp/1 go install libguestfs.org/guestfs go install errors: open /usr/lib64/golang/pkg/linux_amd64/errors.a: permission denied go install sync/atomic: open /usr/lib64/golang/pkg/linux_amd64/sync/atomic.a: permission denied go install math: open /usr/lib64/golang/pkg/linux_amd64/math.a: permission denied golang-1.1.1-3.fc18.x86_64 So there's definitely still a bug in the -3 package. Weirdly though I've been running exactly the same command most of the morning and it's only just started to fail. So this is strange: $ ls -l /usr/lib64/golang/pkg/linux_amd64/errors.a -rw-r--r--. 1 root root 6940 Jun 19 16:18 /usr/lib64/golang/pkg/linux_amd64/errors.a $ ls -l /usr/lib64/golang/src/pkg/errors/* lrwxrwxrwx. 1 root root 52 Jul 1 12:04 /usr/lib64/golang/src/pkg/errors/errors.go -> ../../../../../share/golang/src/pkg/errors/errors.go lrwxrwxrwx. 1 root root 57 Jul 1 12:04 /usr/lib64/golang/src/pkg/errors/errors_test.go -> ../../../../../share/golang/src/pkg/errors/errors_test.go lrwxrwxrwx. 1 root root 58 Jul 1 12:04 /usr/lib64/golang/src/pkg/errors/example_test.go -> ../../../../../share/golang/src/pkg/errors/example_test.go Jul 1 12:04 is approximately the time that I installed the package. I notice from reading around that if the source is newer, golang will try to recompile it. I wonder if we should be using 'cp -a' to preserve timestamps, or even just forcibly setting timestamps to ensure the source is always older than the binaries in the RPM? Sorry, previous comment doesn't make much sense without my other observation: go uses lstat instead of stat when examining the timestamp of files. That's probably a bug in go, but anyway, it means that the timestamp of the symbolic links is used, not the timestamp of the target files (which is correct). Well installing golang-1.1.1-3.fc18.x86_64 made it at least compile my hello world program. Before that it failed completely. As a note, when I enabled the updates-testing repo and did an update on golang, it failed to update with errors like: file /usr/share/golang/src/pkg/unsafe/unsafe.go conflicts between attempted installs of golang-data-1.1.1-3.fc18.noarch and golang-1.1.1-3.fc18.x86_64 But doing a remove of golang first and then doing an install for the testing-updates repo worked. (In reply to Richard W.M. Jones from comment #25) > Sorry, previous comment doesn't make much sense without my > other observation: > > go uses lstat instead of stat when examining the timestamp of files. > Can you please file a bug at https://code.google.com/p/go/issues/entry ? I suspected this before but convinced myself I was wrong. :) If this is really the case, I am happy to patch up golang in Fedora once a bug is filed. The workaround for now is not to bother with %{_datadir} which I'm afraid is anyway pretty busted due to bug 975909. (In reply to John Villalovos from comment #26) > Well installing golang-1.1.1-3.fc18.x86_64 made it at least compile my hello > world program. I should note that after installing the -3 package, it worked fine for "a while" (a few hours) and then suddenly stopped working. During this time I didn't run any yum or sudo commands at all (I checked). But I was developing a cgo library and constantly running go commands as *non* root. Why this should be, I have reallly no idea, golang-1.1.1-4.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/golang-1.1.1-4.fc18 golang-1.1.1-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/golang-1.1.1-4.fc17 golang-1.1.1-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.1.1-4.fc19 Package golang-1.1.1-4.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing golang-1.1.1-4.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12392/golang-1.1.1-4.fc17 then log in and leave karma (feedback). I'm still seeing this bug, even with the -4 package in Rawhide. Take a look at: http://kojipkgs.fedoraproject.org//work/tasks/7712/5587712/root.log http://kojipkgs.fedoraproject.org//work/tasks/7712/5587712/build.log make[2]: Entering directory `/builddir/build/BUILD/libguestfs-1.23.8/golang' ../run go install libguestfs.org/guestfs go install sync: open /usr/lib/golang/pkg/linux_386/sync.a: permission denied make[2]: Leaving directory `/builddir/build/BUILD/libguestfs-1.23.8/golang' make[2]: *** [pkg/linux_386/libguestfs.org/guestfs.a] Error 1 make[1]: Leaving directory `/builddir/build/BUILD/libguestfs-1.23.8' make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 At this point, I am suspecting prelink or anything else that might be changing the times on files. If the compiler binary becomes newer than the .a files, it triggers a rebuild. https://code.google.com/p/go/issues/detail?id=3506 Aha, something is wrong with how golang-1.1.1-4.fc20.i686 was built. I can reproduce with that RPM. Investigating this. golang-1.1.1-4.fc20.x86_64 works: /usr/lib64/golang/pkg/linux_amd64 $ ls -l --full-time sync.a sync/atomic.a -rw-r--r--. 1 root root 55766 2013-07-05 00:07:34.000000000 -0400 sync.a -rw-r--r--. 1 root root 8364 2013-07-05 00:07:33.000000000 -0400 sync/atomic.a golang-1.1.1-4.fc20.i686 fails: /usr/lib/golang/pkg/linux_386 $ ls -l --full-time sync.a sync/atomic.a -rw-r--r--. 1 root root 55694 2013-07-05 00:07:38.000000000 -0400 sync.a -rw-r--r--. 1 root root 8970 2013-07-05 00:07:39.000000000 -0400 sync/atomic.a sync relies on sync/atomic. If sync/atomic.a is newer than sync.a, then failure. I don't know why these files differ in time, probably there is something that uses sync/atomic and rebuilds it after sync is already built (parallel builds that run in different orders? or perhaps directory ordering?) I guess I will try to file a golang bug. RPM strip was messing up the timestamps. golang-1.1.1-5.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/golang-1.1.1-5.fc18 golang-1.1.1-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/golang-1.1.1-5.fc17 golang-1.1.1-5.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.1.1-5.fc19 I wonder if we should either: (a) Leave the setting of timestamps to a %post-install script, or: (b) At least check that the timestamps are reasonable in a %post- install script. Of course this would require that golang has a command to display the topological order of build dependencies for installed packages. (No idea if it does or not, I didn't check) The timestamps from go were correct, it was RPM's use of strip that was non-deterministically rewriting timestamps. The solution is either %global __strip "strip -p" or just disable strip all together, which I did under advice in the golang bug to "never strip go binaries or archives". The -5 package is working well for libguestfs (in Rawhide). Package golang-1.1.1-5.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing golang-1.1.1-5.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12720/golang-1.1.1-5.fc18 then log in and leave karma (feedback). golang-1.1.1-5.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. golang-1.1.1-5.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. golang-1.1.1-5.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |