The go_library_builder.py currently skips gccgo compilers because modules don't work with our GCC installations.
Root Cause
The go tool bundled with gccgo has hardcoded build staging paths that don't exist in the deployed environment:
$ GOROOT=/opt/compiler-explorer/gcc-14.2.0 LD_LIBRARY_PATH=/opt/compiler-explorer/gcc-14.2.0/lib64 \
/opt/compiler-explorer/gcc-14.2.0/bin/go build .
cmd/go: gccgo: exec: "/opt/compiler-explorer/gcc-build/staging/bin/gccgo": stat /opt/compiler-explorer/gcc-build/staging/bin/gccgo: no such file or directory
The go binary works for basic operations but looks for gccgo at the original build path rather than the installation path.
Potential Solutions
- Rebuild GCC with correct installation paths (configure
--prefix to match deployment location)
- Build a wrapper script that sets up the environment correctly
- Patch the
go binary post-build to fix the hardcoded paths
References
The
go_library_builder.pycurrently skips gccgo compilers because modules don't work with our GCC installations.Root Cause
The
gotool bundled with gccgo has hardcoded build staging paths that don't exist in the deployed environment:The
gobinary works for basic operations but looks forgccgoat the original build path rather than the installation path.Potential Solutions
--prefixto match deployment location)gobinary post-build to fix the hardcoded pathsReferences
go_library_builder.py:SKIP_COMPILERS = ["gotip", "go-tip", "gccgo"]