ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.18k stars 157 forks source link

Does not compile anymore on arm64 - but may be global #459

Closed olmoulin closed 10 months ago

olmoulin commented 10 months ago

Issue tracker is ONLY used for reporting bugs with technical details. "It doesn't work" or new features should be discussed with our customer support. Please use bug report function in Bridge or contact bridge@protonmail.ch.

The make build-nogui command throw the following error: go: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 Seems like there is an issue when looking for go-crypto which is also a protonmail package.

Expected Behavior

Should have compiled properly

Current Behavior

Does not compile and throw the error indicated above

Possible Solution

Not sure, maybe a version problem between the go-crypto package and the proton-brige one ?

Steps to Reproduce

  1. Download the master version
  2. run make build-nogui
  3. see the error.

Version Information

last one : master

Context (Environment)

linux asahi fedora ... but I suspect the problem is global go : 1.21

Detailed Description

Possible Implementation

LBeernaertProton commented 10 months ago

Hey @omoulin . I've tried to build the master branch on a clean x86_64 VM and everything built successfully.

I would recommend you clean your go module cache and try again.

I don't see particular how this can depend on the CPU architecture.

olmoulin commented 10 months ago

I agree with you, it is stange (and should not be linked with the CPU architecture). But from a fresh Fedora asahi linux install (just made this morning), I just downloaded golang, the zip file of the master branch and run the make build-nogui. I got the following output :

go build -tags='' -ldflags '-X github.com/ProtonMail/proton-bridge/v3/internal/constants.Version=3.8.1+git -X github.com/ProtonMail/proton-bridge/v3/internal/constants.Revision=NOREPO -X github.com/ProtonMail/proton-bridge/v3/internal/constants.Tag=NOREPO -X github.com/ProtonMail/proton-bridge/v3/internal/constants.BuildTime=2024-01-22T10:02:22+0100 -X "github.com/ProtonMail/proton-bridge/v3/internal/constants.FullAppName=Proton Mail Bridge" -X github.com/ProtonMail/proton-bridge/v3/internal/constants.BuildEnv=dev' -o "proton-bridge" "./cmd/Desktop-Bridge/" go: downloading github.com/bradenaw/juniper v0.12.0 go: downloading github.com/Masterminds/semver/v3 v3.2.0 go: downloading github.com/ProtonMail/gluon v0.17.1-0.20231206152152-caaf10897f9e go: downloading github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a go: downloading github.com/ProtonMail/gopenpgp/v2 v2.7.4-proton go: downloading github.com/hashicorp/go-multierror v1.1.1 go: downloading github.com/allan-simon/go-singleinstance v0.0.0-20210120080615-d0997106ab37 go: downloading github.com/pkg/errors v0.9.1 go: downloading github.com/pkg/profile v1.7.0 go: downloading github.com/sirupsen/logrus v1.9.2 go: downloading github.com/urfave/cli/v2 v2.24.4 go: downloading github.com/ProtonMail/go-proton-api v0.4.1-0.20231130083229-e8aa47d7a366 go: downloading github.com/emersion/go-imap v1.2.1 go: downloading github.com/LBeernaertProton/resty/v2 v2.0.0-20231129100320-dddf8030d93a go: downloading github.com/golang/mock v1.6.0 go: downloading golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 go: downloading google.golang.org/grpc v1.56.3 go: downloading google.golang.org/protobuf v1.30.0 go: downloading github.com/0xAX/notificator v0.0.0-20220220101646-ee9b8921e557 go: downloading github.com/google/go-cmp v0.5.9 go: downloading github.com/abiosoft/ishell v2.0.0+incompatible go: downloading github.com/miekg/dns v1.1.50 go: downloading github.com/fatih/color v1.13.0 go: downloading github.com/elastic/go-sysinfo v1.11.2-0.20231129083954-35e55cd2a542 go: downloading github.com/google/uuid v1.3.0 go: downloading github.com/getsentry/sentry-go v0.15.0 go: downloading github.com/jeandeaual/go-locale v0.0.0-20220711133428-7de61946b173 go: downloading github.com/ProtonMail/docker-credential-helpers v1.1.0 go: downloading github.com/godbus/dbus v4.1.0+incompatible go: downloading golang.org/x/sys v0.13.0 go: downloading github.com/cuthix/go-keychain v0.0.0-20230517073537-fc1740a83768 go: downloading github.com/vmihailenco/msgpack/v5 v5.3.5 go: downloading github.com/felixge/fgprof v0.9.3 go: downloading github.com/hashicorp/errwrap v1.1.0 go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230717121622-edf196117233 go: downloading github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f go: downloading github.com/emersion/go-sasl v0.0.0-20220912192320-0145f2c60ead go: downloading github.com/ProtonMail/go-smtp v0.0.0-20231109081432-2b3d50599865 go: downloading github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 go: downloading github.com/ProtonMail/go-message v0.13.1-0.20230526094639-b62c999c85b7 go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2 go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 go: downloading github.com/ProtonMail/go-srp v0.0.7 go: downloading github.com/PuerkitoBio/goquery v1.8.1 go: downloading github.com/emersion/go-vcard v0.0.0-20230331202150-f3d26859ccd3 go: downloading gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a go: downloading golang.org/x/net v0.17.0 go: downloading golang.org/x/text v0.13.0 go: downloading github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db go: downloading github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 go: downloading github.com/mattn/go-colorable v0.1.13 go: downloading github.com/mattn/go-isatty v0.0.19 go: downloading github.com/golang/protobuf v1.5.3 go: downloading google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 go: downloading golang.org/x/sync v0.2.0 go: downloading github.com/vmihailenco/tagparser/v2 v2.0.0 go: downloading github.com/google/pprof v0.0.0-20211214055906-6f57359322fd go: downloading golang.org/x/crypto v0.14.0 go: downloading github.com/jaytaylor/html2text v0.0.0-20211105163654-bc68cce691ba go: downloading github.com/pierrec/lz4/v4 v4.1.17 go: downloading github.com/mattn/go-sqlite3 v1.14.17 go: downloading github.com/russross/blackfriday/v2 v2.1.0 go: downloading github.com/andybalholm/cascadia v1.3.2 go: downloading github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594 go: downloading howett.net/plist v1.0.0 go: downloading github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 go: downloading github.com/prometheus/procfs v0.8.0 go: downloading github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf go: downloading github.com/cronokirby/saferith v0.33.0 go: downloading github.com/olekukonko/tablewriter v0.0.5 go: downloading github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf go: downloading github.com/mattn/go-runewidth v0.0.14 go: downloading github.com/rivo/uniseg v0.4.2 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/message.go:13:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:9:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/password.go:8:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/armor/armor.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 make: *** [Makefile:110: proton-bridge] Error 1

olmoulin commented 10 months ago

my version of go is : go version go1.21.6 linux/arm64

olmoulin commented 10 months ago

Ok, I make different tests : with Fedora remix 39 on asahi -> got the error, with Fedora 38 in a Parallels VM box -> got the error, with Debian 12 in a Parallels VM box -> work after manually upgrading go ... so it seems fedora has a broken version of golang ... not your fault, you can close this issue :)

benjaminpotter commented 7 months ago

@ObelixLeGaulois would you be able to provide further instructions as to how you solved this issue? I am running Asahi Linux as well.

go version go1.21.9 linux/arm64

I've run the following:

$ git clone https://github.com/ProtonMail/proton-bridge.git
$ cd proton-bridge
$ make build

I get the following error:

go: downloading github.com/Masterminds/semver/v3 v3.2.0
go: downloading github.com/ProtonMail/gluon v0.17.1-0.20240227105633-3734c7694bcd
go: downloading github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a
go: downloading github.com/ProtonMail/gopenpgp/v2 v2.7.4-proton
go: downloading github.com/allan-simon/go-singleinstance v0.0.0-20210120080615-d0997106ab37
go: downloading github.com/elastic/go-sysinfo v1.11.2-0.20231129083954-35e55cd2a542
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/pkg/profile v1.7.0
go: downloading github.com/sirupsen/logrus v1.9.2
go: downloading github.com/urfave/cli/v2 v2.24.4
go: downloading github.com/ProtonMail/go-proton-api v0.4.1-0.20240226161523-ec58ed7ea4b9
go: downloading github.com/emersion/go-imap v1.2.1
go: downloading github.com/LBeernaertProton/resty/v2 v2.0.0-20231129100320-dddf8030d93a
go: downloading github.com/golang/mock v1.6.0
go: downloading golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
go: downloading github.com/0xAX/notificator v0.0.0-20220220101646-ee9b8921e557
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/miekg/dns v1.1.50
go: downloading google.golang.org/grpc v1.56.3
go: downloading google.golang.org/protobuf v1.31.0
go: downloading github.com/abiosoft/ishell v2.0.0+incompatible
go: downloading github.com/fatih/color v1.13.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/getsentry/sentry-go v0.15.0
go: downloading github.com/jeandeaual/go-locale v0.0.0-20220711133428-7de61946b173
go: downloading github.com/vmihailenco/msgpack/v5 v5.3.5
go: downloading golang.org/x/sys v0.16.0
go: downloading github.com/docker/docker-credential-helpers v0.8.1
go: downloading github.com/godbus/dbus v4.1.0+incompatible
go: downloading github.com/cuthix/go-keychain v0.0.0-20240103134243-0b6a41580b77
go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230717121622-edf196117233
go: downloading github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/felixge/fgprof v0.9.3
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/emersion/go-sasl v0.0.0-20220912192320-0145f2c60ead
go: downloading github.com/ProtonMail/go-smtp v0.0.0-20231109081432-2b3d50599865
go: downloading github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
go: downloading github.com/ProtonMail/go-message v0.13.1-0.20230526094639-b62c999c85b7
go: downloading github.com/ProtonMail/go-srp v0.0.7
go: downloading github.com/PuerkitoBio/goquery v1.8.1
go: downloading github.com/emersion/go-vcard v0.0.0-20230331202150-f3d26859ccd3
go: downloading gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a
go: downloading golang.org/x/net v0.17.0
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db
go: downloading github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.19
go: downloading github.com/golang/protobuf v1.5.3
go: downloading google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
go: downloading golang.org/x/sync v0.3.0
go: downloading github.com/vmihailenco/tagparser/v2 v2.0.0
go: downloading golang.org/x/crypto v0.18.0
go: downloading howett.net/plist v1.0.0
go: downloading github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/mattn/go-sqlite3 v1.14.17
go: downloading github.com/jaytaylor/html2text v0.0.0-20211105163654-bc68cce691ba
go: downloading github.com/pierrec/lz4/v4 v4.1.17
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading github.com/andybalholm/cascadia v1.3.2
go: downloading github.com/google/pprof v0.0.0-20211214055906-6f57359322fd
go: downloading github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594
go: downloading github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf
go: downloading github.com/cronokirby/saferith v0.33.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/rivo/uniseg v0.4.2
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/message.go:13:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:9:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/password.go:8:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/armor/armor.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233
make: *** [Makefile:110: proton-bridge] Error 1

Thank you, Ben

olmoulin commented 7 months ago

I installed a debian under parallels on macos, and compiled from there... the issue may be linked to the version of golang coming with fedora asahi remix.... then copy the binaries to my asahi install. We should be able to fix the golang problem on asahi but I wanted a quick solution and this was my first try to see if it was related to fedora asahi ...

e-fu commented 6 months ago

same here, also on fedora asahi remix

❯ make build go build -tags='' -ldflags '-X github.com/ProtonMail/proton-bridge/v3/internal/constants.Version=3.11.0+git -X github.com/ProtonMail/proton-bridge/v3/internal/constants.Revision=82607efe1c -X github.com/ProtonMail/proton-bridge/v3/internal/constants.Tag=v3.11.0 -X github.com/ProtonMail/proton-bridge/v3/internal/constants.BuildTime=2024-05-09T20:03:55+0800 -X "github.com/ProtonMail/proton-bridge/v3/internal/constants.FullAppName=Proton Mail Bridge" -X github.com/ProtonMail/proton-bridge/v3/internal/constants.BuildEnv=dev' -o "proton-bridge" "./cmd/Desktop-Bridge/" go: downloading github.com/ProtonMail/go-crypto v0.0.0-20230717121622-edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/message.go:13:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:9:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:11:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/key_clear.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/password.go:8:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/crypto/attachment.go:12:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 ../../go/pkg/mod/github.com/!proton!mail/gopenpgp/v2@v2.7.4-proton/armor/armor.go:10:2: github.com/ProtonMail/go-crypto@v0.0.0-20230717121622-edf196117233: invalid version: unknown revision edf196117233 make: *** [Makefile:111: proton-bridge] Error 1

englut commented 3 weeks ago

I'm getting this error too. Running latest go version go1.23.2 linux/arm64, on Asahi Linux Fedora 41.