Cross-compilation error to Darwin on Ubuntu
papalagichen opened this issue · 3 comments
papalagichen commented
I am new to go lang. I tried to build v0.0.3 for Darwin on Ubuntu but got the following errors. Cross-compilation for Windows is OK. Not sure what causes the problem.
> GOOS=darwin GOARCH=amd64 go build .
# github.com/mattn/go-ieproxy
./ieproxy.go:36:9: undefined: getConf
./ieproxy.go:41:9: undefined: reloadConf
./ieproxy.go:48:2: undefined: overrideEnvWithStaticProxy
./ieproxy.go:53:12: psc.findProxyForURL undefined (type *ProxyScriptConf has no field or method findProxyForURL, but does have FindProxyForURL)
My environment is
> go version
go version go1.17.6 linux/amd64
> uname -rv
5.4.0-1063-gcp #67~18.04.1-Ubuntu SMP Tue Jan 18 11:59:15 UTC 2022
gabzim commented
Same issue, but compiling on m1 mac to an intel mac
mattn commented
Because you don't use cross C compiler for macOS on Linux.
dvaldivia commented
I'm experiencing this issue building locally on a Mac M1, no cross compilation involved, could it be something else is missing?