go: runtime: several tests are failing on windows-arm64-aws builder due to redeclaration warnings (upgraded to errors in testing)
--- FAIL: TestCgoDLLImports (19.82s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
[...]
FAIL
FAIL runtime 66.604s
More Failing Tests in runtime
Here are the other failing test in runtime
, all with the same problem:
--- FAIL: TestCgoPanicDeadlock (17.25s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoTracebackContext (17.25s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoCCodeSIGPROF (17.24s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoCheckBytes (0.00s)
crash_cgo_test.go:188: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestBigStackCallbackCgo (0.00s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoExternalThreadPanic (0.00s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoTraceback (0.00s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
--- FAIL: TestCgoCrashHandler (0.00s)
crash_test.go:54: building testprogcgo []: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
Source: https://storage.googleapis.com/go-build-log/986587f4/windows-arm64-aws_fcda3dac.log from CL 323990.
There’s also a test in cmd/link
that builds testprogcgo with the same problem:
--- FAIL: TestDWARF (0.00s)
--- FAIL: TestDWARF/testprogcgo (33.77s)
dwarf_test.go:94: go build -o C:\Users\gopher\AppData\Local\Temp\TestDWARF_testprogcgo649726619\001\testprogcgo.exe ../../runtime/testdata/testprogcgo: exit status 1
# runtime/testdata/testprogcgo
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: warning: redeclaration of 'GoNop' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
aprof.go:13:14: note: previous declaration is here
cgo-gcc-export-header-prolog:44:35: warning: redeclaration of 'goBigStack1' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
bigstack_windows.go:9:13: note: previous declaration is here
go build runtime/testdata/testprogcgo: C compiler warning promoted to error on Go builders
FAIL
FAIL cmd/link 35.289s
Source: https://storage.googleapis.com/go-build-log/0f330f99/windows-arm64-aws_80fa3b05.log from CL 323993.
This is possibly connected to the builder using a newer version of the C toolchain, as discussed in #46406.
Note these are warnings if run locally, but the build system upgrade warnings during test execution into to failures.
CC @rsc, @golang/release, @zx2c4.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (10 by maintainers)
Commits related to this issue
- misc/cgo: generate Windows import libraries for clang LLD won't import a .dll directly and instead requires an import library. So generate these using -out-implib, the same way as was done in CL 3120... — committed to golang/go by zx2c4 3 years ago
- cmd/internal/sys: mark windows/arm64 as c-shared-capable The platform supports c-shared now, so flip this on. I've given this a small smoke test using [1], and it was able to pass packets and general... — committed to golang/go by zx2c4 3 years ago
- dashboard,cmd/release: replace windows-arm64-aws with windows-arm64-10 This change removes the windows-arm64-aws buildlet and replaces all usages with the windows-arm64-10 buildlet. - Remove the kno... — committed to golang/build by toothrot 3 years ago
- cmd/release: start running release tests for windows-arm64 By now, all outstanding issues preventing release tests for windows-arm64 from being turned on by default are resolved: - Issues golang/go#... — committed to golang/build by dmitshur 3 years ago
Maybe only Windows/ARM64 uses clang-based C toolchain which warns that, whereas previously Windows/AMD64 and 386 use GCC which doesn’t warn that?
I’ve got a fix for that in https://go-review.googlesource.com/c/go/+/326310/
But I’m now battling the next clang-related issue, where apparently it wants a microsoft-style import library, rather than a straight up .dll pretending to be a .a like gcc takes.