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

cmd/go: test failure during build on 64-bit Fedora 28 after commit faafcc606e #28511

Closed
siebenmann opened this issue Oct 31, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@siebenmann
Copy link

commented Oct 31, 2018

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

go version devel +faafcc606e Wed Oct 31 00:17:00 2018 +0000 linux/amd64

This happens with this commit and later, and doesn't happen with 0ad332d and earlier.

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

GOARCH="amd64"
GOOS="linux"

What did you do?

Running ./all.bash in a current git tip from faafcc6 onwards results in a test failure during build:

ok      cmd/fix 7.893s
go test proxy starting
go test proxy running at GOPROXY=http://127.0.0.1:34383/mod
go proxy: no archive rsc.io v1.5.0
go proxy: no archive example.com/split/subpkg v1.0.0
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/foo 14c0d48
go proxy: no archive golang.org/x 14c0d48
go proxy: no archive golang.org 14c0d48
--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/vendor_complex (0.56s)
        script_test.go:170: 
            # smoke test for complex build configuration (0.547s)
            > go build -o complex.exe complex
            > [exec:gccgo] go build -compiler=gccgo -o complex.exe complex
            [stderr]
            # complex/nest/vendor/v1
            ar: no operation specified
            # complex/nest/vendor/v3
            ar: no operation specified
            # complex/vendor/v
            ar: no operation specified
            # complex/nest/sub/vendor/v2
            ar: no operation specified
            # complex/w
            ar: no operation specified
            [exit status 2]
            FAIL: testdata/script/vendor_complex.txt:3: unexpected command failure
            
FAIL
FAIL    cmd/go  36.895s

Fedora 28 has ar version 2.29.1-23.fc28.

Looking at the code change in that commit, I suspect that what is going wrong here is that Builder.run is being called with a null string as one of the command line arguments, and this is being passed on to ar, and it objects to being invoked as, effectively, ar "" rc .... I can reproduce a similar failure with ar by hand, for example:

$ ar "" t ./test/issue18902b.o
ar: no operation specified
$ ar t ./test/issue18902b.o
__.PKGDEF
_go_.o
$
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Oct 31, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Oct 31, 2018

Change https://golang.org/cl/146277 mentions this issue: cmd/go: don't pass empty string to ar when using -compiler=gccgo

@katiehockman katiehockman added this to the Go1.12 milestone Oct 31, 2018

@gopherbot gopherbot closed this in d086c5c Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.