google / seesaw

Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.
Apache License 2.0
5.65k stars 511 forks source link

Compilation of seesaw/netlink failing #59

Closed indricilia closed 4 years ago

indricilia commented 4 years ago

Hi, trying to compile seesaw and the following errors came up:

cd $GOPATH/src/github.com/google/seesaw make test

go build ./...

github.com/google/seesaw/netlink

netlink/netlink.go:520:9: could not determine kind of name for C.nl_socket_alloc netlink/netlink.go:528:2: could not determine kind of name for C.nl_socket_free** make: *** [all] Error 2

Environment is as follows:

]# go env GO111MODULE="" GOARCH="amd64" GOBIN="/root/go_projects/bin" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go_projects" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/golang" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/root/go_projects/src/github.com/google/seesaw/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build106279875=/tmp/go-build -gno-record-gcc-switches"

libnl packages are:

libnl3-3.2.28-4.el7.x86_64 libnl-devel-1.1.4-3.el7.x86_64 libnl-1.1.4-3.el7.x86_64 libnl3-cli-3.2.28-4.el7.x86_64

go software is:

golang-1.13.4-0.el7.x86_64 golang-bin-1.13.4-0.el7.x86_64 golang-src-1.13.4-0.el7.noarch

Any ideas?

indricilia commented 4 years ago

Due to using libnl packages with libnl3 packages. Removed libnl packages, added libnl3-devel and all worked fine.