Skip to content

cmd/link: -buildmode=c-shared not supported on linux/mips64le #43264

Open
@Mengkzhaoyun

Description

@Mengkzhaoyun

What version of Go are you using (go version)?

$ go version
1.15.6

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="mips64le"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_mips64le"
GCCGO="gccgo"
GOMIPS64="hardfloat"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/go/src/github.com/cilium/cilium/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 -mabi=64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build215838537=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When I tried to migrate Cilium to the mips64le (loongnix) platform, I got an error, among others, when I compiled a class library, Proxylib, and found that Cilium was handling it as a .so file.
Here is the compile command

$ CGO_ENABLED=1 go build -mod=vendor -ldflags ' -X "github.com/cilium/cilium/pkg/version.ciliumVersion=1.9.1 6857a8d2a 2020-12-18T01 :24:42+08:00" -s -w -X "github.com/cilium/cilium/pkg/envoy.RequestedEnvoyVersionSHA=1177896bebde79915fe5f9092409bf0254084b4e" -X " github.com/cilium/cilium/pkg/datapath/loader.DatapathSHA=3d9461ac3d8ae0b334f319c93e10ddea336d8617" -extldflags -Wl,-soname, libcilium.so.1' -tags=osusergo -o libcilium.so.1 -buildmode=c-shared
-buildmode=c-shared support on linux/mips64le

Since -buildmod=c-shared is used, this buildmod prompt does not support building on linux/mips64le, does anyone have any good solutions?

What did you expect to see?

-buildmode=c-shared support on linux/mips64le

What did you see instead?

-buildmode=c-shared not supported on linux/mips64le

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.arch-mipshelp wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions