Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#29820 - [go] Tools report that system packages are out of date
Attached to Project:
Community Packages
Opened by Alex Ogier (ogier) - Wednesday, 09 May 2012, 20:49 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Friday, 11 May 2012, 22:57 GMT
Opened by Alex Ogier (ogier) - Wednesday, 09 May 2012, 20:49 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Friday, 11 May 2012, 22:57 GMT
|
DetailsDescription: Running go commands rebuilds all system packages because they are marked as out of date.
For example, $ go get github.com/ogier/pflag go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied $ go install github.com/ogier/pflag go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied $ go build -v github.com/ogier/pflag runtime errors sync/atomic sync io math syscall time os unicode/utf8 strconv reflect fmt sort github.com/ogier/pflag $ go test github.com/ogier/pflag warning: building out-of-date packages: runtime errors sync/atomic sync io math syscall time os unicode/utf8 strconv reflect fmt sort unicode bytes strings flag bufio text/tabwriter runtime/pprof testing regexp/syntax regexp installing these packages with 'go test -i github.com/ogier/pflag' will speed future tests. ok github.com/ogier/pflag 0.014s Additional info: * go-2:1.0.1-1 Steps to reproduce: go get github.com/ogier/pflag go test github.com/ogier/pflag [watch as all packages are rebuilt] |
This task depends upon
Closed by Rémy Oudompheng (remyoudompheng)
Friday, 11 May 2012, 22:57 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2:1.0.1-3
Friday, 11 May 2012, 22:57 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2:1.0.1-3
The output from "go test" is just a warning.
If you run "go test -i github.com/ogier/pflag" and then "go test github.com/ogier/pflag", the warning disappears.
The version of Go that is used is the latest release, version 1.0.1.
If this is still an issue for you, please report it upstream at:
http://code.google.com/p/go/issues/list
You should also be able to avoid the warning if you package pflag by using the Go Package Guidelines, if that's an alternative for you:
https://wiki.archlinux.org/index.php/Go_Package_Guidelines
Best regards,
Alexander Rødseth
The "go test -i" invocation is a shortcut for running "go install" on all out-of-date dependencies, which in my case is much of the standard library. This fails, as with all other commands to build/install custom packages, because I don't have permissions to write to system libraries.
$ go test -i github.com/ogier/pflag
go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied
If you want to replicate this, install Arch's Go package to a system location, run 'export GOPATH=~/go' or similar, and run the series of commands as an unprivileged user. I probably should have mentioned this in the original report, I apologize.
~% mkdir go
~% export GOPATH=~/go
~% go get github.com/ogier/pflag
I get:
go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied
If I run:
~% go test github.com/ogier/pflag
I get:
warning: building out-of-date packages:
runtime
errors
sync/atomic
sync
io
math
syscall
time
os
unicode/utf8
strconv
reflect
fmt
sort
unicode
strings
bytes
flag
bufio
text/tabwriter
runtime/pprof
testing
regexp/syntax
regexp
installing these packages with 'go test -i github.com/ogier/pflag' will speed future tests.
ok github.com/ogier/pflag 0.006s
The test itself seems to run fine (although ~/go is completely empty, are there other commands needed to reproduce?)
What is the expected behavior?
Anyone knows is there are additional steps that needs to be taken when installing Go to make sure the installed packages looks up to date from the viewpoint of "go test"?
Since the files that comes with the "go" package is the files from the latest release version of go (1.0.1), I would assume that the warning message is inaccurate?
All of the following should be run as a normal user with no permissions for /usr/lib/go/pkg
$ mkdir ~/go
$ export GOROOT=~/go
$ go get code.google.com/p/go.crypto/bcrypt
go install runtime: open /usr/lib/go/pkg/linux_amd64/runtime.a: permission denied
$ go test code.google.com/p/go.crypto/bcrypt
warning: building out-of-date packages:
runtime
errors
math
unicode/utf8
strconv
code.google.com/p/go.crypto/blowfish
sync/atomic
sync
io
unicode
bytes
bufio
crypto/cipher
crypto/aes
reflect
encoding/binary
syscall
time
os
fmt
math/rand
strings
math/big
crypto/rand
crypto/subtle
encoding/base64
sort
flag
text/tabwriter
runtime/pprof
testing
regexp/syntax
regexp
installing these packages with 'go test -i code.google.com/p/go.crypto/bcrypt' will speed future tests.
ok code.google.com/p/go.crypto/bcrypt 4.082s
Updating the go package to use all.bash.
As for the whole packaging issue, it is definitely still possible to build a package, I have no doubt about that. The issue is that the most recent release, go-2:1.0.1-1, breaks the Go compiler such that it cannot be used in the standard way, with GOPATH set as an unpriveleged user. For example, the intro material at http://golang.org/doc/code.html fails.
When it comes to the claim that the go package breaks the Go compiler, may you please clarify/specify what it breaks? Is there an environment variable that should not have been set or are any files placed in sub-optimal locations on the system?
IMO, it's the "go" tool itself that makes it problematic to build code as a regular user when using a system wide install of Go. No other compiler on Arch Linux have any problems similar to this (that I know of).
In any case, I'm open for suggestions and ready to make changes that may improve the situation.
Does the latest update of the "go" package fix this bug?
I really think this is just an error in packaging: the standard library wasn't recompiled for 1.0.1, and doing so will fix this bug.
I still get the same errors in go-2:1.0.1-2.
I'll try adding a recompilation of the system libraries as the final part of the installation process, to see if it helps.