public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug go/102469] New: gccgo: error: ‘copy’ defined as both imported name and global name, while golang does not produce this error Date: Thu, 23 Sep 2021 11:44:35 +0000 [thread overview] Message-ID: <bug-102469-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
reply other threads:[~2021-09-23 11:44 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102469-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).