Skip to content

Fails to run again the Go source: "package using cgo has Go assembly file asm_amd64.s" #431

Closed
@leonklingele

Description

@leonklingele

Configuration

$ golangci-lint --version
golangci-lint has version 1.15.0 built from 901cf25 on 2019-02-18T08:22:26Z
$ go version
go version go1.12 darwin/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/USER/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/USER/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/jv/n5rf3drx1td1ljkt6xk2_60w0000gn/T/go-build096456041=/tmp/go-build -gno-record-gcc-switches -fno-common"
$ cat ~/.golangci.yml
linters:
  enable-all: true
  disable:
    - lll

Steps to reproduce

$ cd $(mktemp -d)
$ git clone https://github.com/golang/go
$ cd go/src
$ golangci-lint run -v
INFO [config_reader] Config search paths: [./, ../]
INFO [config_reader] Used config file ../.golangci.yml
INFO [lintersdb] Active 30 linters: [deadcode depguard dupl errcheck gochecknoglobals gochecknoinits goconst gocritic gocyclo gofmt goimports golint gosec gosimple govet ineffassign interfacer maligned misspell nakedret prealloc scopelint staticcheck structcheck stylecheck typecheck unconvert unparam unused varcheck]
INFO [lintersdb] Optimized sublinters [staticcheck gosimple unused stylecheck] into metalinter megacheck
INFO [loader] Go packages loading at mode load deps types and syntax took 877.162776ms
ERRO Running error: context loading failed: failed to load program with go/packages: go [list -e -json -compiled -test=true -export=false -deps=true -find=false -- ./...]: exit status 1: go build std/runtime/cgo: package using cgo has Go assembly file asm_amd64.s

INFO Memory: 10 samples, avg is 69.4MB, max is 69.4MB
INFO Execution took 957.01968ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cgoRelated to CGO or line directivesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions