advancetoolchain/advance-toolchain

Go tests TestGoPathShlibGccgo and TestTwoGopathShlibsGccgo fail with AT 15.0-3, 15.0-2

pmur opened this issue · 7 comments

pmur commented

This is an oddball test included with the official go runtime. This uses the copy of gccgo from PATH to run several tests.

In short gccgo is used to build a shared library, build a binary using the shared library, and run it using the go driver built from the official go repo.

The shared library built by gccgo is missing the ".go_export" section which causes the failure. The static library built does include ".go_export". This seems to work ok using the fedora 36 (gcc 12) provided toolchain.

(Showing my ignorance) Do we understand why section is missing, or how to fix it?

And did it really just start failing with 15.0-2?
And why did we not find this in FVT?

pmur commented

It's a test in the golang compiler repo, likely not included with gcc.

It is a more recent (golang f71f3d1b861de2fcc907221931cf13679c0092dd from July 2022) change in Golang which caused this test to start running. Previously, it was skipped.

I am not sure how to fix it. It seems related to a linker script or object tool neglecting to keep this section. For whatever reason, it does work on the Fedora 36 toolchain.

Can I conclude that this is likely a bug in upstream GCC/gccgo? Should it be reported there instead? AT 15 uses GCC 11... maybe this is fixed in upstream GCC 12? Does it work with AT 16?

pmur commented

I tried testing against AT 16 (alpha3) and AT 14.0-4, both fail similarly. Also, these tests succeed with the RHEL9 host toolchain, which seems to be gcc 11 based.

pmur commented

It turns out this is a gccgo bug. I have fixed it upstream. See golang/go#60798 for details.

pmur commented

I am also disabling these tests on Go/PPC64 until the next major gcc release.