webauthn icon indicating copy to clipboard operation
webauthn copied to clipboard

Bazel build fails after webauthn went to Go 1.18

Open amirhood opened this issue 2 years ago • 1 comments

We use duo-labs/webauthn in our product. Our Bazel build fails with the following error since commit 41e0a0431b9cfc20067e537f6b3146a624745030 on Aug 13, 2022. I checked and seems the Go version has been upgraded to 1.18 plus some other dependency changes. Not sure if it is compatibility issue.

INFO: Invocation ID: 1869f449-7320-4f0e-b72b-ae43c45d1423 INFO: Analyzed target //myprodcut:myprodcut (2 packages loaded, 10 targets configured). INFO: Found 1 target... ERROR: /private/var/tmp/_bazel_my.user/cbac05759584d101e53f170500f16b04/external/com_github_duo_labs_webauthn/protocol/webauthncose/BUILD.bazel:3:11: GoCompilePkg external/com_github_duo_labs_webauthn/protocol/webauthncose/webauthncose.a failed: (Exit 1): sandbox-exec failed: error executing command (cd /private/var/tmp/_bazel_my.user/cbac05759584d101e53f170500f16b04/sandbox/darwin-sandbox/2892/execroot/mydir && \ exec env - \ CGO_ENABLED=1 \ GOARCH=amd64 \ GOOS=darwin \ GOPATH='' \ GOROOT=external/go_sdk \ GOROOT_FINAL=GOROOT \ PATH=/usr/bin:external/llvm_toolchain/bin:/bin \ TMPDIR=/var/folders/jy/s9spzp8d529b2h_56n0hdjm00000gn/T/ \ /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_my.user/cbac05759584d101e53f170500f16b04/sandbox/darwin-sandbox/2892/sandbox.sb /var/tmp/_bazel_my.user/install/35477ebf9ca1f9d07e9e2a657bdd526f/process-wrapper '--timeout=0' '--kill_delay=15' bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_duo_labs_webauthn/protocol/webauthncose/ed25519.go -src external/com_github_duo_labs_webauthn/protocol/webauthncose/ed25519_go112.go -src external/com_github_duo_labs_webauthn/protocol/webauthncose/webauthncose.go -embedroot '' -embedroot bazel-out/darwin-fastbuild/bin -embedlookupdir external/com_github_duo_labs_webauthn/protocol/webauthncose -arc 'github.com/duo-labs/webauthn/protocol/googletpm=github.com/duo-labs/webauthn/protocol/googletpm=bazel-out/darwin-fastbuild/bin/external/com_github_duo_labs_webauthn/protocol/googletpm/googletpm.x' -arc 'github.com/duo-labs/webauthn/protocol/webauthncbor=github.com/duo-labs/webauthn/protocol/webauthncbor=bazel-out/darwin-fastbuild/bin/external/com_github_duo_labs_webauthn/protocol/webauthncbor/webauthncbor.x' -arc 'golang.org/x/crypto/ed25519=golang.org/x/crypto/ed25519=bazel-out/darwin-fastbuild/bin/external/org_golang_x_crypto/ed25519/ed25519.x' -importpath github.com/duo-labs/webauthn/protocol/webauthncose -p github.com/duo-labs/webauthn/protocol/webauthncose -package_list bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/go_sdk/packages.txt -o bazel-out/darwin-fastbuild/bin/external/com_github_duo_labs_webauthn/protocol/webauthncose/webauthncose.a -x bazel-out/darwin-fastbuild/bin/external/com_github_duo_labs_webauthn/protocol/webauthncose/webauthncose.x -nogo bazel-out/darwin-opt-exec-2B5CBBC6-ST-eda1e837b650/bin/bazel/go/static_analysis_actual_/static_analysis_actual -gcflags '' -asmflags '') compilepkg: //go:build comment without // +build comment Target //myprodcut:myprodcut failed to build INFO: Elapsed time: 0.706s, Critical Path: 0.18s INFO: 2 processes: 2 internal. INFO: Build Event Protocol files produced successfully. FAILED: Build did NOT complete successfully

Not sure what has changed on /webauthn/protocol/webauthncose either. I also checked the Bazel file in the tmp dir for webauthncose and nothing unusual is there. No more error message on the output.

amirhood avatar Sep 14 '22 21:09 amirhood

Please replicate it with a go build to eliminate a bazel issue and give better output.

james-d-elliott avatar Sep 14 '22 23:09 james-d-elliott