https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98170
Bug ID: 98170 Summary: Cannot build libgo on AIX: *.gox does not contain any Go export data Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: ro at gcc dot gnu.org CC: clement.chigot at atos dot net, cmang at google dot com Target Milestone: --- Host: powerpc-ibm-aix7.2.4.0 Target: powerpc-ibm-aix7.2.4.0 Build: powerpc-ibm-aix7.2.4.0 I've recently tried to build master on AIX 7.2 with --enable-languages=all. Among others, this failed building libgo, all following the same pattern: /home/ro/gcc/src/gcc-master/libgo/go/runtime/internal/math/math.go:7:28: error: ./runtime/internal/sys.gox exists but does not contain any Go export data 7 | import "runtime/internal/sys" | ^ All those *.gox files were just 48 bytes long, even with binutils 2.35.1 objcopy. It turns out this is a known issue, explained in https://www.gitmemory.com/issue/golang/go/38043/603687042. There are several issues here: * The version of copycsect referenced there (based on binutils 2.25.1) doesn't compile with current binutils 2.35.1 any longer (bfd_get_section_size has lost its bfd * arg since). * Once this is fixed, the build mostly works (with the exception of the recently reported stab issue https://gcc.gnu.org/pipermail/gcc-patches/2020-December/560857.html) * Unless this functionality can be integrated into binutils, requiring a full binutils just for this seems pretty heavy-handed. I suspect that can way easier be done using libiberty's simple-object interfaces. * Whatever the case, until libgo builds out of the box on AIX, the issue should at the very least be documented (install.texi?) and/or the libgo build disabled so others don't waste time investigating known issues.