Skip to content
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

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

Open
Mengkzhaoyun opened this issue Dec 18, 2020 · 3 comments
Open

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

Mengkzhaoyun opened this issue Dec 18, 2020 · 3 comments

Comments

@Mengkzhaoyun
Copy link

@Mengkzhaoyun Mengkzhaoyun commented Dec 18, 2020

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

@ianlancetaylor ianlancetaylor changed the title -buildmode=c-shared not supported on linux/mips64le cmd/link: -buildmode=c-shared not supported on linux/mips64le Dec 18, 2020
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Dec 18, 2020
@XiaodongLoong
Copy link

@XiaodongLoong XiaodongLoong commented Dec 22, 2020

I have analyzed this issue, and I try to develop this feature, but I have not completed it yet.
I will do it.

@xuan200922702
Copy link

@xuan200922702 xuan200922702 commented Dec 22, 2020

我也遇到了编译so文件,不支持的问题。这个问题如何解决呢

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Dec 22, 2020

@XiaodongLoong Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants