-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"multiple definition..." errors when building example images on ubuntu 18.04 #13
Comments
I'm getting the same (similar) on Ubuntu 16.04.5:
Never mind, my kernel actually had it enabled by default. So still not sure why it's not working. mark@ubuntu:~/go/src/binctr$ make busybox
+ busybox
go generate ./examples/busybox/...
2018/12/23 23:53:17 image not found locally, pulling the image
pulling docker.io/library/busybox:latest
pulling layer sha256:59788edf1f3e78cd0ebe6ce1446e9d10788225db3dedcfd1a59f764bad2b2690
pulling layer sha256:90e01955edcd85dac7985b72a8374545eac617ccdddcc992b732e43cd42534af
skipping config sha256:59788edf1f3e78cd0ebe6ce1446e9d10788225db3dedcfd1a59f764bad2b2690
unpacking sha256:90e01955edcd85dac7985b72a8374545eac617ccdddcc992b732e43cd42534af
CGO_ENABLED=1 go build \
-tags "seccomp apparmor static_build" \
-ldflags "-w -X github.com/genuinetools/binctr/version.GITCOMMIT=db50a63 -X github.com/genuinetools/binctr/version.VERSION=v0.0.0 -extldflags -static" -o busybox ./examples/busybox/...
# _/home/mark/go/src/binctr/examples/busybox
/usr/lib/go-1.11/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-224082363/000033.o:(.rodata+0x0): multiple definition of `C_VERSION_MICRO'
/tmp/go-link-224082363/000010.o:(.rodata+0x0): first defined here
/tmp/go-link-224082363/000033.o: In function `get_major_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:96: multiple definition of `C_VERSION_MINOR'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:137: first defined here
/tmp/go-link-224082363/000033.o: In function `get_major_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:96: multiple definition of `C_VERSION_MAJOR'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:137: first defined here
/tmp/go-link-224082363/000033.o: In function `get_major_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:97: multiple definition of `C_CMP_MASKED_EQ'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:137: first defined here
/tmp/go-link-224082363/000033.o: In function `get_minor_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:100: multiple definition of `C_CMP_GT'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:137: first defined here
/tmp/go-link-224082363/000033.o: In function `get_minor_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:101: multiple definition of `C_CMP_GE'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:138: first defined here
/tmp/go-link-224082363/000033.o: In function `get_minor_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:101: multiple definition of `C_CMP_EQ'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:137: first defined here
/tmp/go-link-224082363/000033.o: In function `get_minor_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:102: multiple definition of `C_CMP_LE'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:138: first defined here
/tmp/go-link-224082363/000033.o: In function `get_minor_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:102: multiple definition of `C_CMP_LT'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:140: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:102: multiple definition of `C_CMP_NE'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:141: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:102: multiple definition of `C_ATTRIBUTE_TSYNC'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:142: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:102: multiple definition of `C_ATTRIBUTE_NNP'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:143: first defined here
/tmp/go-link-224082363/000033.o: In function `get_micro_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:105: multiple definition of `C_ATTRIBUTE_BADARCH'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:146: first defined here
/tmp/go-link-224082363/000033.o: In function `get_micro_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:106: multiple definition of `C_ATTRIBUTE_DEFAULT'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:146: first defined here
/tmp/go-link-224082363/000033.o: In function `get_micro_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:106: multiple definition of `C_ACT_ALLOW'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:146: first defined here
/tmp/go-link-224082363/000033.o: In function `get_micro_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:107: multiple definition of `C_ACT_TRACE'
/tmp/go-link-224082363/000010.o:/home/mark/GOPATH/src/github.com/genuinetools/binctr/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:146: first defined here
/tmp/go-link-224082363/000033.o: In function `get_micro_version':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:107: multiple definition of `C_ACT_ERRNO'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:35: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:107: multiple definition of `C_ACT_TRAP'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:35: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:107: multiple definition of `C_ACT_KILL'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:43: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:107: multiple definition of `C_ARCH_S390X'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:46: first defined here
/tmp/go-link-224082363/000033.o: In function `make_arg_cmp_array':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:129: multiple definition of `C_ARCH_S390'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:46: first defined here
/tmp/go-link-224082363/000033.o: In function `make_arg_cmp_array':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:129: multiple definition of `C_ARCH_PPC64LE'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:43: first defined here
/tmp/go-link-224082363/000033.o: In function `make_arg_cmp_array':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:129: multiple definition of `C_ARCH_PPC64'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:46: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:129: multiple definition of `C_ARCH_PPC'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:46: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:142: multiple definition of `C_ARCH_MIPSEL64N32'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:46: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:142: multiple definition of `C_ARCH_MIPSEL64'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:48: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:142: multiple definition of `C_ARCH_MIPSEL'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:48: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:143: multiple definition of `C_ARCH_MIPS64N32'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:49: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:144: multiple definition of `C_ARCH_MIPS64'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:49: first defined here
/tmp/go-link-224082363/000033.o: In function `add_struct_arg_cmp':
/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:145: multiple definition of `C_ARCH_MIPS'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:51: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:145: multiple definition of `C_ARCH_AARCH64'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:51: first defined here
/tmp/go-link-224082363/000033.o:/home/mark/GOPATH/src/github.com/opencontainers/runc/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:145: multiple definition of `C_ARCH_ARM'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:51: first defined here
/tmp/go-link-224082363/000033.o: In function `_cgo_0504433a81c8_Cfunc_add_struct_arg_cmp':
/tmp/go-build/cgo-gcc-prolog:46: multiple definition of `C_ARCH_X32'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:56: first defined here
/tmp/go-link-224082363/000033.o: In function `_cgo_0504433a81c8_Cfunc_add_struct_arg_cmp':
/tmp/go-build/cgo-gcc-prolog:46: multiple definition of `C_ARCH_X86_64'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:56: first defined here
/tmp/go-link-224082363/000033.o: In function `_cgo_0504433a81c8_Cfunc_add_struct_arg_cmp':
/tmp/go-build/cgo-gcc-prolog:46: multiple definition of `C_ARCH_X86'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:65: first defined here
/tmp/go-link-224082363/000033.o: In function `_cgo_0504433a81c8_Cfunc_add_struct_arg_cmp':
/tmp/go-build/cgo-gcc-prolog:46: multiple definition of `C_ARCH_NATIVE'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:68: first defined here
/tmp/go-link-224082363/000033.o: In function `_cgo_0504433a81c8_Cfunc_add_struct_arg_cmp':
/tmp/go-build/cgo-gcc-prolog:46: multiple definition of `C_ARCH_BAD'
/tmp/go-link-224082363/000010.o:/tmp/go-build/cgo-gcc-prolog:68: first defined here
/tmp/go-link-224082363/000029.o: In function `mygetgrouplist':
/build/golang-1.11-vy4BOR/golang-1.11-1.11.1/src/os/user/getgrouplist_unix.go:16: warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-224082363/000028.o: In function `mygetgrgid_r':
/build/golang-1.11-vy4BOR/golang-1.11-1.11.1/src/os/user/cgo_lookup_unix.go:38: warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-224082363/000028.o: In function `mygetgrnam_r':
/build/golang-1.11-vy4BOR/golang-1.11-1.11.1/src/os/user/cgo_lookup_unix.go:43: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-224082363/000028.o: In function `mygetpwnam_r':
/build/golang-1.11-vy4BOR/golang-1.11-1.11.1/src/os/user/cgo_lookup_unix.go:33: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-224082363/000028.o: In function `mygetpwuid_r':
/build/golang-1.11-vy4BOR/golang-1.11-1.11.1/src/os/user/cgo_lookup_unix.go:28: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-224082363/000007.o: In function `_cgo_18049202ccd9_C2func_getaddrinfo':
/tmp/go-build/cgo-gcc-prolog:49: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
Makefile:29: recipe for target 'busybox' failed
make: *** [busybox] Error 2 |
Anybody found a solution for this ? |
Same for alpine.
The text was updated successfully, but these errors were encountered: