rclone / rclone

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
https://rclone.org
MIT License
46.73k stars 4.18k forks source link

Error on building rclone - goftp.io/server missing v1.0.0-rc1 tag #7237

Closed Viktor-Yakovchuk closed 1 year ago

Viktor-Yakovchuk commented 1 year ago

What is the problem you are having with rclone?

When I am trying to build rclone I received following issue:

[viktor@fedora rclone]$ make
go build -v --ldflags "-s -X github.com/rclone/rclone/fs.Version=v1.64.0-beta.7158.cb0bd5d18.linkbox"  
go: downloading goftp.io/server v1.0.0-rc1
get "goftp.io/server": found meta tag vcs.metaImport{Prefix:"goftp.io/server", VCS:"git", RepoRoot:"https://gitea.com/goftp/server"} at //goftp.io/server?go-get=1
cmd/serve/ftp/ftp.go:32:2: reading goftp.io/server/go.mod at revision v1.0.0-rc1: unknown revision v1.0.0-rc1
make: *** [Makefile:49: rclone] Error 1

My workaround is to change version of goftp in go.mod file:

-       goftp.io/server v1.0.0-rc1
+       goftp.io/server v0.4.1

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Linux fedora 6.4.7-200.fc38.x86_64

How to use GitHub

Animosity022 commented 1 year ago

Please use the forums for general support.

https://forum.rclone.org

ncw commented 1 year ago

I'm going to re-open this because it does look like a problem we need to deal with.

It looks like they've deleted the v1.0.0-rc1 tag here https://gitea.com/goftp/server/tags

This isn't causing a problem for most users since that revision is in the go module cache, but I'm guessing you aren't using it @Viktor-Yakovchuk ?

Also looking at that list of tags v2 is released which we are not using.

Viktor-Yakovchuk commented 1 year ago

No, I have clear installation of my operating system, so I have no cache.

ncw commented 1 year ago

Can you do go env and report what it says please @Viktor-Yakovchuk ?

Viktor-Yakovchuk commented 1 year ago
[viktor@fedora linkbox]$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/viktor/.cache/go-build"
GOENV="/home/viktor/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/viktor/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/viktor/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.7"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/viktor/rclone/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1189560504=/tmp/go-build -gno-record-gcc-switches"
ncw commented 1 year ago

GOPROXY="direct"

This is the difference here.

I have

GOPROXY="https://proxy.golang.org,direct"

And if you set that I think it will compile properly.

Did you set that setting? Or is it part of Fedora?

Viktor-Yakovchuk commented 1 year ago

Seems it is part of Fedora, because I didn't change that.

Animosity022 commented 1 year ago

I build Caddy all the time on my Fedora box and that is there as well.

GOPROXY="https://proxy.golang.org,direct"
Animosity022 commented 1 year ago

See:

https://bugzilla.redhat.com/show_bug.cgi?id=1794110

Viktor-Yakovchuk commented 1 year ago

Thanks for the explanation. Now it is work without my workaround.

ncw commented 1 year ago

I've ported serve ftp to the v2.0.1 of the goftp.io/server library

Can you give this a go @Viktor-Yakovchuk ? It should compile with GOPROXY="direct" and also have more features!

v1.64.0-beta.7252.adb637755.fix-7237-serve-ftp on branch fix-7237-serve-ftp (uploaded in 15-30 mins)

Viktor-Yakovchuk commented 1 year ago

I received new error:

[viktor@fedora rclone]$ make
go build -v --ldflags "-s -X github.com/rclone/rclone/fs.Version=v1.64.0-beta.7252.adb637755.fix-7237-serve-ftp"  
go: downloading github.com/henrybear327/go-proton-api v0.0.0-20230725203741-316f1b3227a9
/home/viktor/go/pkg/mod/github.com/henrybear327/!proton-!a!p!i-!bridge@v0.0.0-20230725204219-611ec433f83c/common/keyring.go:7:2: github.com/henrybear327/go-proton-api@v0.0.0-20230725203741-316f1b3227a9: invalid version: unknown revision 316f1b3227a9
ncw commented 1 year ago

@henrybear327 it looks like your commit in henrybear327/go-proton-api 316f1b3227a9 (which is in the rclone's current go.mod) is orphaned.

So we should probably update rclone's go.mod to point to a commit which isn't orphaned!

@Viktor-Yakovchuk can you comment protondrive out of backend/all/all.go and try building again while we fix this - thanks.

Viktor-Yakovchuk commented 1 year ago

Without protondrive rclone was build successfully.

ncw commented 1 year ago

I've merged this fix master now which means it will be in the latest beta in 15-30 minutes and released in v1.64

We'll sort the protondrive build out before v1.64 is released.