Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vgo: build fails under normal conditions with bad asm argument #23986

Closed
RobbieMcKinstry opened this issue Feb 21, 2018 · 3 comments
Closed
Milestone

Comments

@RobbieMcKinstry
Copy link

RobbieMcKinstry commented Feb 21, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

Yes, I'm using fresh vgo and fresh Go 1.10.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hashi/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hashi/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/4w/lggn8bld65n65jvyw1trh5mc0000gn/T/go-build410075004=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I downloaded a simple Go tool and tried to compile it with vgo. It failed with an error that does not appear to have arisen from misconfiguration.

git clone git@github.com:RobbieMcKinstry/parsertongue.git
cd parsertongue
echo > go.mod
vgo build

What did you expect to see?

Successful compilation:

vgo: resolving import "golang.org/x/exp/ebnf"
vgo: finding golang.org/x/exp (latest)
vgo: adding golang.org/x/exp v0.0.0-20180214205018-83bc9a11ae1a
vgo: resolving import "github.com/urfave/cli"
vgo: finding github.com/urfave/cli (latest)
vgo: adding github.com/urfave/cli v1.20.0

$ ls main
main

What did you see instead?

vgo: resolving import "golang.org/x/exp/ebnf"
vgo: finding golang.org/x/exp (latest)
vgo: adding golang.org/x/exp v0.0.0-20180214205018-83bc9a11ae1a
vgo: resolving import "github.com/urfave/cli"
vgo: finding github.com/urfave/cli (latest)
vgo: adding github.com/urfave/cli v1.20.0
go tool asm: exit status 2
flag provided but not defined: -V
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -shared
        generate code that can be linked into a shared library
  -trimpath string
        remove prefix from recorded source file paths
# unicode/utf8
compile: -importcfg: open $WORK/b020/importcfg: no such file or directory
go tool asm: exit status 2
flag provided but not defined: -V
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -shared
        generate code that can be linked into a shared library
  -trimpath string
        remove prefix from recorded source file paths

Other Notes

I tried to run vgo build . and vgo build main.go, both of which fail similarly.

@gopherbot gopherbot added this to the vgo milestone Feb 21, 2018
@rsc
Copy link
Contributor

rsc commented Apr 2, 2018

Sorry. You're using Go 1.9; we've added better diagnostics here to indicate that Go 1.10 or later is required.

@rsc rsc closed this as completed Apr 2, 2018
@RobbieMcKinstry
Copy link
Author

I am?? My go version command spits out 1.10.
Thanks for taking a look at this Russ. I will nuke my system and start again ^.^

@rsc
Copy link
Contributor

rsc commented Apr 6, 2018

@RobbieMcKinstry The Go 1.10 asm understands -V=full (go tool asm -V=full). The one in your transcript does not.

@golang golang locked and limited conversation to collaborators Apr 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants