https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95389

            Bug ID: 95389
           Summary: Kubernetes build fails because of mangled PkgPath
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: ulrich.teichert at gmx dot de
                CC: cmang at google dot com
  Target Milestone: ---

Hi,

while trying to build Kubernetes on sparc64 (yes, this is a currently
unsupported platform as far as Kubernetes is concerned), I stumbled over a
PkgPath issue. Kubernetes uses (among a multitude of others) a packages path
as:

vendor/k8s.io/code-generator/pkg/util

>From the path specifications of golang, I think that k8s.io is a legal package
part, as long as the dot is not used as first character in a path component.

gccgo is turning this into the PgkPath:

vendor/k8s.x2eio/code-generator/pkg/util

Which seems to be a result of a path mangling by the go frontend method
go_mangle_pkgpath in gcc/go/gofrontend/go-encode-id.cc, which encodes the dot
to the string ".x2e". This would be perfectly OK, if the PkgPath in golang
would be used unmangled, but the dot encoding slips through.

I admit that I didn't find the point where the dot unmangling should be
inserted, sorry.

Reply via email to