chewxy / math32

A float32 version of Go's math package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing function bodies for MIPS builds

sanket28 opened this issue · comments

Hello,

I'm using the gorgonia library on MIPS and I get the following errors:

../../pkg/mod/github.com/chewxy/math32@v1.10.1/exp.go:3:6: missing function body
../../pkg/mod/github.com/chewxy/math32@v1.10.1/exp.go:57:6: missing function body
../../pkg/mod/github.com/chewxy/math32@v1.10.1/log.go:76:6: missing function body
../../pkg/mod/github.com/chewxy/math32@v1.10.1/remainder.go:33:6: missing function body
../../pkg/mod/github.com/chewxy/math32@v1.10.1/sqrt.go:3:6: missing function body

I'm trying to build for mips32, mips32le, mips64, and mips64le and I get the same error. Please advise.

Thanks!

That's... interesting I thought I fixed it https://github.com/chewxy/math32/blob/master/exp.go

argh It looks like I forgot to release a new version. One sec

Hey @chewxy thanks for the quick reply. I switched to the master branch instead of using v1.10.1. So I can build it for all MIPS architectures but ARM does not work now. I get this error:

duplicated definition of symbol github.com/chewxy/math32.archRemainder, from github.com/chewxy/math32 and github.com/chewxy/math32

Hey sanket- could you run go env and copy the results here along with any build tags you are using?

Hey @soypat, here you go:

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/sanketdeshpande/Library/Caches/go-build"
GOENV="/Users/sanketdeshpande/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/sanketdeshpande/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/sanketdeshpande/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17.7"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/sanketdeshpande/go/src/test/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 -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zq/ryx07vvd63769_cyp0fg2vr80000gn/T/go-build3571280815=/tmp/go-build -gno-record-gcc-switches -fno-common"

I'm using GOARCH=arm GOOS=linux go build to build my test program.

hey @soypat any updates on why it's not working on arm?

Could you test the quick fix by adding the branch as the module to your project?

Running the following in your module base directory should do the trick

GOPROXY=direct go get -u github.com/chewxy/math32@vet-test

The previous errors are gone but I get this instead:

github.com/chewxy/math32.archSqrt: relocation target github.com/chewxy/math32.sqrt not defined

Aha. Alright I'm adding the tests to catch these errors preemptively. Not sure what's causing it this time but will investigate.

@sanket28 Please retry running and building your project using

GOPROXY=direct go get -u github.com/chewxy/math32@vet-test

If you can also run the tests of this package on an arm machine if you have it handy, that'd help out ensure these changes are OK.

@soypat It works perfectly fine now! I also tried on arm and no issues. Thanks a lot!