Hello,
I managed to figure out why we get this error on openSUSE (and SLE):
% go vet github.com/cyphar/umoci/image/cas
vet: import failed: reading export data:
/usr/lib64/go/pkg/linux_amd64/fmt.a: go archive is missing __.PKGDEF
vet: import failed: reading export data:
/usr/lib64/go/pkg/linux_amd64/fmt.a: go archive is missing __.PKGDEF
exit status 1
It looks like OBS does some sort of "sanitisation" of paths inside .a
archives. This results in the entry for __.PKGDEF to have a '/' appended
to it in our packages (to indicate that it's a directory I guess). This
then causes an error to occur because the importer code for Go does a
string comparison to "__.PKGDEF"[1].
I've opened an issue against Go[2], as well as posted a patch (which is
attached to this mail). We should probably carry this patch (I don't
think SUSE's signed the Google CLA so that might take a while).
[1]: https://golang.org/src/go/internal/gcimporter/exportdata.go#L60
[2]: https://github.com/golang/go/issues/17890
--
Aleksa Sarai
Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/