go-cloud
go-cloud copied to clipboard
all: build fails on darwin
Describe the bug
Building things that use this library seems to yield an error on darwin, both amd64 and arm64.
Example output:
❯ GOOS=darwin GOARCH=arm64 go build .
# github.com/mattn/go-ieproxy
../../Go/pkg/mod/github.com/mattn/[email protected]/ieproxy.go:36:9: undefined: getConf
../../Go/pkg/mod/github.com/mattn/[email protected]/ieproxy.go:41:9: undefined: reloadConf
../../Go/pkg/mod/github.com/mattn/[email protected]/ieproxy.go:48:2: undefined: overrideEnvWithStaticProxy
../../Go/pkg/mod/github.com/mattn/[email protected]/ieproxy.go:53:13: psc.findProxyForURL undefined (type *ProxyScriptConf has no field or method findProxyForURL, but does have FindProxyForURL)
To Reproduce
GOOS=darwin GOARCH=arm64 go build .
Expected behavior
Build just fine.
Version
0.25.
Additional context
v0.24 works fine. It seems that its related to the update of go-ieproxy to v0.0.3.
Can you file a bug for mattn/go-ieproxy? I don't think this is something that go-cloud can fix.
I filed https://github.com/mattn/go-ieproxy/issues/34.
I will downgrade our referenced version for now.
Hmm I cannot downgrade our version, same error.
just verified here and it works, will open a pr
check #3116
to test I made a cmd/main.go with:
package main
import (
// Import the blob packages we want to be able to open.
_ "gocloud.dev/blob/azureblob"
_ "gocloud.dev/blob/gcsblob"
_ "gocloud.dev/blob/s3blob"
// import the secrets packages we want to be able to be used.
_ "gocloud.dev/secrets/awskms"
_ "gocloud.dev/secrets/azurekeyvault"
_ "gocloud.dev/secrets/gcpkms"
)
func main() {
print(1)
}
and built with:
GOOS=darwin GOARCH=amd64 go build -o foo ./cmd/
before this change it failed, after it compiled as expected.
@caarlos0
Can you verify which version of ie-proxy you ended up using?
Our test suite does build on Darwin, and when I tried downgrading to the 0.0.2 version, it reproduced what you were seeing. However the 0.0.3 version seemed to work.....
i was using v0.0.3, downgraded to v0.0.1, which was the one used on go-cloud v0.24
Carlos can you try the suggestion in https://github.com/mattn/go-ieproxy/issues/34#issuecomment-1094135564?
On Fri, Apr 8, 2022, 5:20 PM Carlos Alexandro Becker < @.***> wrote:
i was using v0.0.3, downgraded to v0.0.1, which was the one used on go-cloud v0.24
— Reply to this email directly, view it on GitHub https://github.com/google/go-cloud/issues/3114#issuecomment-1093513938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMCKTXUCT25DR5M33ZWPATVEDEL7ANCNFSM5S5BYL2A . You are receiving this because you modified the open/close state.Message ID: @.***>
I don't really want to add all the cgo complication to goreleaser unless its something we really cannot avoid...
If I am reading the bugs correctly, this works fine when you're actually compiling on Darwin; it fails when you are cross-compiling. Is that correct?
go mod graph shows Go CDK is pulling in this dependency from github.com/Azure/[email protected].
If I am reading the bugs correctly, this works fine when you're actually compiling on Darwin; it fails when you are cross-compiling. Is that correct?
that's likely related to default CGO_ENABLED behavior, forcing cgo disabled on darwin causes the same issue...
go mod graphshows Go CDK is pulling in this dependency fromgithub.com/Azure/[email protected].
looking at the src of that lib, seems like it doesn't really use/need ieproxy v0.0.3 though...
maybe add a build test with cgo disabled and keep using the old one?
I also filed https://github.com/Azure/azure-pipeline-go/issues/31 with azure-pipeline-go.
I hit this with the latest Hugo release today, as I had upgraded to gocloud.dev v0.25.0, downgraded now to what we had before, v0.20.0, and crossing fingers ...
@bep v0.24.0 should be OK if you want to try it.
~can confirm 0.24.0 works with darwin builds!~ Pinning go-ieproxy to 0.0.1 made it work.
will there be a release soon that includes https://github.com/google/go-cloud/pull/3117? can move back to v0.24.0, would like to move forward.
if I'm not mistaken, this has been fixed and released, so, closing :)
thanks everyone ;)