Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

permission denied errors when running tests #776

Open
6 of 7 tasks
dominicbarnes opened this issue May 10, 2018 · 3 comments
Open
6 of 7 tasks

permission denied errors when running tests #776

dominicbarnes opened this issue May 10, 2018 · 3 comments

Comments

@dominicbarnes
Copy link

Prerequisites

  • Have you tried launching atom . from the terminal in your project's directory?
  • Have you verified the output from go env is correct? If it is, please include the output in this issue.
  • Have you updated Atom to the latest version?
  • Have you tried using Atom Beta, which can be run side-by-side with Atom Stable? Is the behavior the same, or different?
  • Have you updated your Atom packages to the latest versions?
  • Have you read the FAQ?
  • Have you searched the issues to see if others are experiencing the same issue?

Description

When saving files, go-plus is running tests in the background. After upgrading to 1.10, I started getting this error:

go test runtime/cgo: open /usr/lib/go-1.10/pkg/linux_amd64/runtime/cgo.a: permission denied

I'm installing golang following instructions in the wiki.

I found someone else with the same error message (see golang/go#24674) and they determined it was caused by the -i flag used for go build|test.

It looks like go-plus runs the following command:

go test -c -i -o /dev/null .

From the other issue I linked, it sounds like -i is unnecessary. When running this command in the terminal, I can reproduce the error message by adding/removing -i.

Is it possible to configure this command? If not, can the ability to configure this be added?

Output from atom -v && apm -v

$ atom -v
atom -v
Atom    : 1.26.1
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0

$ apm -v
apm  1.19.0
npm  3.10.10
node 6.9.5 x64
atom 1.26.1
python 2.7.15rc1
git 2.17.0

Output From go env

$ go env
go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dominic/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dominic/dev"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-I/home/dominic/src/db2/clidriver/include"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-L/home/dominic/src/db2/clidriver/lib"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build343043220=/tmp/go-build -gno-record-gcc-switches"
@zmb3
Copy link
Collaborator

zmb3 commented May 10, 2018

We should remove the -i flag for Go 1.10+.

I am curious though - do you see the same error if you install the official Go distribution from golang.org instead of the one provided by your OS package manager?

@sjauld
Copy link

sjauld commented Oct 30, 2018

I'm also seeing this error using the official Go distribution.

go version go1.11.1 linux/amd64

@dominicbarnes
Copy link
Author

I'm still seeing this error, I was using go 1.10 and even tried upgrading to 1.11.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants