FS#56229 - [go] package missing race libs

Attached to Project: Arch Linux
Opened by Patrick Hemmer (phemmer) - Saturday, 04 November 2017, 03:58 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 10 December 2017, 14:41 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Attempting to build GO packages using `go build --race` results in permission errors as go attempts to build and install missing race libs in stdlib.

# go build mypkg
go install container/heap: open /usr/lib/go/pkg/linux_amd64_race/container/heap.a: permission denied
go install encoding/csv: open /usr/lib/go/pkg/linux_amd64_race/encoding/csv.a: permission denied
go install html: open /usr/lib/go/pkg/linux_amd64_race/html.a: permission denied
go install database/sql/driver: mkdir /usr/lib/go/pkg/linux_amd64_race/database: permission denied
go install expvar: open /usr/lib/go/pkg/linux_amd64_race/expvar.a: permission denied
go install archive/tar: mkdir /usr/lib/go/pkg/linux_amd64_race/archive/: permission denied
go install text/template/parse: mkdir /usr/lib/go/pkg/linux_amd64_race/text/template/: permission denied

The binary package downloadable from https://golang.org/dl/ does not have this issue.
I reported the issue upstream (https://github.com/golang/go/issues/22372) since it looks like the GO package in Arch is built following the official GO build doc, and the response was that the build procedure needs to be updated to include:

go install -race -a std

The response on the upstream issue also indicates other steps need to be taken to get something equivalent to the official binary release, but it was not stated what those steps are.

Additional info:
* package version(s)
1.9.2-2

* config and/or log files etc.


Steps to reproduce:

Try to build the following code with `go build -race`:

package main
import "encoding/csv"
func main() {
csv.NewReader(nil)
}
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Sunday, 10 December 2017, 14:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  go 2:1.9.2-3
Comment by Patrick Hemmer (phemmer) - Saturday, 04 November 2017, 15:47 GMT
Pardon, but how is this considered a "feature request"? Core functionality of the application does not work because of the way the package is being built.
Comment by Doug Newgard (Scimmia) - Saturday, 04 November 2017, 15:51 GMT
It's worked fine for everyone up to now. You're trying to use an optional feature that you want enabled, that's kind of the definition of a Feature Request.
Comment by Patrick Hemmer (phemmer) - Saturday, 04 November 2017, 15:52 GMT
That is incorrect. It has not worked fine for anyone. Just because nobody has used the feature does not mean it's not broken.
Comment by Doug Newgard (Scimmia) - Saturday, 04 November 2017, 15:58 GMT
It's worked fine because the core functionality is there. Yes, the optional feature you want doesn't work, but again, that's the definition of a feature request.
Comment by Patrick Hemmer (phemmer) - Saturday, 04 November 2017, 16:01 GMT
Maybe there's a language barrier here, but
* "optional feature" means something that can be enabled/disabled. `go build -race` is built into go and can not be disabled.
* "doesn't work" means broken, which is a bug. Adding functionality which is not currently present is a feature request.
Comment by Doug Newgard (Scimmia) - Saturday, 04 November 2017, 16:03 GMT
"Adding functionality which is not currently present is a feature request."

And that's exactly what this is. An optional feature can, and often is, build time optional, not run time optional. That's what you've got here, an optional part of the go library isn't enabled and you want it to be.
Comment by Patrick Hemmer (phemmer) - Saturday, 04 November 2017, 16:12 GMT
I am no longer interested in having this feature added. Since it is working as it is supposed to you can close the task.
Comment by Bartłomiej Piotrowski (Barthalion) - Monday, 06 November 2017, 13:06 GMT
Thanks Patrick, I will look into it this week (and into making our package more "upstreamy" as well).

Loading...