can't execute example
Closed this issue · 4 comments
hwchiu commented
Environment
Ubuntu 16.04
go version go1.9 linux/amd64
Steps
- go get -u github.com/John-Lin/tinynet
- execute tinynet/example/topo-single-8.go
Issue
When I type go run topo-single-8.go
, I got following error.
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-905310536/000003.o: In function `_cgo_f36fc5609ae4_C2func_load_simple_bpf':
/tmp/go-build/github.com/containernetworking/plugins/vendor/github.com/vishvananda/netlink/_obj/cgo-gcc-prolog:32: multiple definition of `_cgo_f36fc5609ae4_C2func_load_simple_bpf'
/tmp/go-link-905310536/000001.o:/tmp/go-build/github.com/vishvananda/netlink/_obj/cgo-gcc-prolog:32: first defined here
/tmp/go-link-905310536/000003.o: In function `_cgo_f36fc5609ae4_Cfunc_load_simple_bpf':
/tmp/go-build/github.com/containernetworking/plugins/vendor/github.com/vishvananda/netlink/_obj/cgo-gcc-prolog:55: multiple definition of `_cgo_f36fc5609ae4_Cfunc_load_simple_bpf'
/tmp/go-link-905310536/000001.o:/tmp/go-build/github.com/vishvananda/netlink/_obj/cgo-gcc-prolog:55: first defined here
collect2: error: ld returned 1 exit status
hwchiu commented
This issue only happens if I install tinynet via go get.
07skat commented
And how to avoid this error?
hwchiu commented
I try to download source from git and use govendor sync
to install dependency packages and it works now.