You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ plz build ///third_party/go/github.com_klauspost_pgzip//:pgzip
Build stopped after 8.29s. 1 target failed:
///third_party/go/github.com_klauspost_pgzip//:pgzip
Error building target ///third_party/go/github.com_klauspost_pgzip//:pgzip: exit status 1
pkg/darwin_amd64/github.com/klauspost/pgzip/gunzip.go, line 26, column 2: could not import github.com/klauspost/compress/flate (open : no such file or directory)
$
Attempt 2: on darwin_arm64 cross-compiling to linux_amd64
$ plz build ///third_party/go/github.com_klauspost_pgzip//:pgzip -a linux_amd64
Build stopped after 40ms. 1 target failed:
///third_party/go/github.com_klauspost_pgzip_linux_amd64//:pgzip
Subrepo third_party/go/github.com_klauspost_pgzip_linux_amd64 is not defined (referenced by command-line targets)
$
Attempt 3: on linux_amd64
$ plz build ///third_party/go/github.com_klauspost_pgzip//:pgzip
Build stopped after 23.32s. 1 target failed:
///third_party/go/github.com_klauspost_pgzip//:pgzip
Error building target ///third_party/go/github.com_klauspost_pgzip//:pgzip: exit status 1
pkg/linux_amd64/github.com/klauspost/pgzip/gunzip.go, line 26, column 2: could not import github.com/klauspost/compress/flate (open : no such file or directory)
$
The standard go command builds it fine but there appears to be no way of building it using Please 17.3.0.
This appears to be because github.com/klauspost/pgzip doesn't have a go.mod file so we don't attach dependencies properly.
I suppose it needs to try to figure out that it should be doing that from the source, which I think might be tricky to fully generalise (the module location isn't extant in the import path). Alternatively maybe we allow a deps argument on go_repo to let the user hint this where necessary.
$ plz build ///third_party/go/github.com_klauspost_pgzip//:pgzip
Build finished; total time 11.95s, incrementality 62.5%. Outputs:
///third_party/go/github.com_klauspost_pgzip//:pgzip:
plz-out/gen/third_party/go/github.com_klauspost_pgzip/pgzip.a
I don't think that fixes the cross-compile issue which seems more generic... We've talked a few times about revisiting how architectures work in the face of things like go_repo that extensively use subrepos.
Attempt 1: on
darwin_arm64
Attempt 2: on
darwin_arm64
cross-compiling tolinux_amd64
Attempt 3: on
linux_amd64
The standard
go
command builds it fine but there appears to be no way of building it using Please 17.3.0.Repro script
The text was updated successfully, but these errors were encountered: