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/link: ppc64 broken #31565

Closed
bradfitz opened this issue Apr 19, 2019 · 4 comments

Comments

Projects
None yet
4 participants

@bradfitz bradfitz added the NeedsFix label Apr 19, 2019

@bradfitz bradfitz added this to the Go1.12.5 milestone Apr 19, 2019

@laboger

This comment has been minimized.

Copy link
Contributor

commented Apr 19, 2019

I looked at this briefly on one of our ppc64 machines with master. From the error message, it sounds like x.o is created in a way that loadelf.go doesn't like. I was not able to reproduce the same error message that happens in the log.

If I try to run all the tests in cmd/link, I get an error on the statement that does go env CC, however if I just run the single test for TestSectionsWithSameName then it passes. In the output when running them all, it runs some tests, then I see PAUSE, then CONT, and almost as if the environments are getting mixed up between tests.

 go test -test.run=TestSectionsWithSameName -test.v
=== RUN   TestSectionsWithSameName
=== PAUSE TestSectionsWithSameName
=== CONT  TestSectionsWithSameName
--- PASS: TestSectionsWithSameName (0.35s)
    elf_test.go:80: gcc [-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build142403988=/tmp/go-build -gno-record-gcc-switches] -o /tmp/go-link-TestSectionsWithSameName039763643/x.o /tmp/go-link-TestSectionsWithSameName039763643/x.s
    elf_test.go:87: /usr/bin/objcopy --rename-section .text2=.text1 /tmp/go-link-TestSectionsWithSameName039763643/x.o /tmp/go-link-TestSectionsWithSameName039763643/x2.syso
    elf_test.go:107: /home/boger/golang/go/bin/go build
PASS
ok  	cmd/link	0.357s

 go test -test.v
=== RUN   TestDWARF
--- SKIP: TestDWARF (0.00s)
    testenv.go:177: skipping test: no cgo
=== RUN   TestDWARFiOS
--- SKIP: TestDWARFiOS (0.00s)
    dwarf_test.go:181: skipping on non-darwin/amd64 platform
=== RUN   TestSectionsWithSameName
=== PAUSE TestSectionsWithSameName
=== RUN   TestLargeSymName
--- PASS: TestLargeSymName (0.00s)
=== RUN   TestIssue21703
=== PAUSE TestIssue21703
=== RUN   TestIssue28429
=== PAUSE TestIssue28429
=== RUN   TestUnresolved
--- PASS: TestUnresolved (0.29s)
=== RUN   TestBuildFortvOS
--- SKIP: TestBuildFortvOS (0.00s)
    testenv.go:177: skipping test: no cgo
=== RUN   TestLargeText
--- FAIL: TestLargeText (1.59s)
    linkbig_test.go:92: Build failed for big text program with internal linking: exit status 1, output: go: cannot find main module; see 'go help modules'
=== CONT  TestSectionsWithSameName
=== CONT  TestIssue28429
=== CONT  TestIssue21703
--- FAIL: TestSectionsWithSameName (0.01s)
    elf_test.go:67: exit status 1
--- PASS: TestIssue28429 (0.25s)
--- PASS: TestIssue21703 (0.25s)
FAIL
exit status 1
FAIL	cmd/link	2.145s

I must not be running it exactly the same way as the builder does, or the system is different. I was testing on a power8 rh7.6 with gcc 4.8.5 and binutils 2.27. Also some newer gcc versions didn't fail either.

@gopherbot

This comment has been minimized.

Copy link

commented Apr 19, 2019

Change https://golang.org/cl/172981 mentions this issue: cmd/link: require cgo support for TestSectionsWithSameName

@gopherbot gopherbot closed this in 4c236b9 Apr 19, 2019

@gopherbot

This comment has been minimized.

Copy link

commented Apr 20, 2019

Change https://golang.org/cl/173117 mentions this issue: [release-branch.go1.12] cmd/link: require cgo support for TestSectionsWithSameName

@gopherbot

This comment has been minimized.

Copy link

commented Apr 20, 2019

Change https://golang.org/cl/173118 mentions this issue: [release-branch.go1.11] cmd/link: require cgo support for TestSectionsWithSameName

gopherbot pushed a commit that referenced this issue Apr 22, 2019

[release-branch.go1.12] cmd/link: require cgo support for TestSection…
…sWithSameName

The test doesn't really require cgo, but it does require that we know
the right flags to use to run the C compiler, and that is not
necessarily correct if we don't support cgo.

Fixes #31565

Change-Id: I04dc8db26697caa470e91ad712376aa621cf765d
Reviewed-on: https://go-review.googlesource.com/c/go/+/172981
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 4c236b9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173117

gopherbot pushed a commit that referenced this issue Apr 22, 2019

[release-branch.go1.11] cmd/link: require cgo support for TestSection…
…sWithSameName

The test doesn't really require cgo, but it does require that we know
the right flags to use to run the C compiler, and that is not
necessarily correct if we don't support cgo.

Fixes #31565

Change-Id: I04dc8db26697caa470e91ad712376aa621cf765d
Reviewed-on: https://go-review.googlesource.com/c/go/+/172981
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 4c236b9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173118
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.