public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/102469] New: gccgo:  error: ‘copy’ defined as both imported name and global name, while golang does not produce this error
@ 2021-09-23 11:44 dilyan.palauzov at aegee dot org
  0 siblings, 0 replies; only message in thread
From: dilyan.palauzov at aegee dot org @ 2021-09-23 11:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102469
           Summary: gccgo:  error: ‘copy’ defined as both imported name
                    and global name, while golang does not produce this
                    error
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: dilyan.palauzov at aegee dot org
                CC: cmang at google dot com
  Target Milestone: ---

I download the tip of https://github.com/containers/podman/ , commit
b0d1c0fe22da27c88a0e5d .  With `go version go1.16.5 gccgo (GCC) 11.2.1 20210728
(Red Hat 11.2.1-1) linux/amd64` calling `make` the error is:

```
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
        -mod=vendor  \
        -ldflags '-X
github.com/containers/podman/v3/libpod/define.gitCommit=b0d1c0fe22da27c88a0e5de11de08d63ef861347
-X github.com/containers/podman/v3/libpod/define.buildInfo=1632396554 -X
github.com/containers/podman/v3/libpod/config._installPrefix=/usr/local -X
github.com/containers/podman/v3/libpod/config._etcDir=/usr/local/etc ' \
        -tags " exclude_graphdriver_btrfs btrfs_noversion selinux systemd 
exclude_graphdriver_devicemapper seccomp" \
        -o bin/podman ./cmd/podman
go build: when using gccgo toolchain, please pass linker flags using
-gccgoflags, not -ldflags
# github.com/containers/storage/pkg/unshare
unshare.c: In function ‘parse_proc_stringlist’:
unshare.c:137:23: warning: comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  137 |         for (n = 0; n < used; n++) {
      |                       ^
unshare.c:148:23: warning: comparison of integer expressions of different
signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
  148 |         for (n = 0; n < used; n++) {
      |                       ^
# github.com/containers/podman/v3/libpod
libpod/options.go:81:33: error: ‘copy’ defined as both imported name and global
name
   81 |                                
copy(rt.storageConfig.GraphDriverOptions, config.GraphDriverOptions)
      |                                 ^
libpod/container_stat_linux.go:13:49: note: ‘copy’ imported here
   13 |         "github.com/containers/podman/v3/pkg/copy"
      |                                                 ^
make: *** [Makefile:300: bin/podman] Error 2

With go version go1.16.8 linux/amd64 on the same system, calling `make`
produces no warngis.  Even when I replace `-ldflags` with `-gccgoflags` the
signed/unsigned warning stays, and the `copy` error also stays.

If golang does not emit “error: ‘copy’ defined as both imported name and global
name”, gccgo shall neither.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-23 11:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 11:44 [Bug go/102469] New: gccgo: error: ‘copy’ defined as both imported name and global name, while golang does not produce this error dilyan.palauzov at aegee dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).