Problems trying to build rclone from source: errors in the ftp backend

Hello everyone,

After a long time since I did it last (in 2016 or so), I'm again trying to build rclone from source.

What I did is to create an Ubuntu 20.04 VM, update it fully, manually install Golang 1.17.5 (not forgetting to set PATH, GOPATH, etc -- it's working OK, at least well enough to compile and run HelloWorld.go) and then pull rclone and its dependencies with go get, but this results in (AFAICS, I'm no Golang expert) in syntax errors in rclone's ftp backend:

$ go get
[... long list of progress messages omitted  ...] 
go get: installing executables with 'go get' in module mode is deprecated.
        Use 'go install pkg@version' instead.
        For more information, see
        or run 'go help get' or 'go help install'.
REDACTED/pkg/mod/ undefined: ftp.DialWithShutTimeout
REDACTED/pkg/mod/ undefined: ftp.DialWithWritingMDTM
REDACTED/pkg/mod/ c.IsGetTimeSupported undefined (type *ftp.ServerConn has no field or method IsGetTimeSupported)
REDACTED/pkg/mod/ c.IsSetTimeSupported undefined (type *ftp.ServerConn has no field or method IsSetTimeSupported)
REDACTED/pkg/mod/ c.IsTimePreciseInList undefined (type *ftp.ServerConn has no field or method IsTimePreciseInList)
REDACTED/pkg/mod/ c.GetTime undefined (type *ftp.ServerConn has no field or method GetTime)
REDACTED/pkg/mod/ c.SetTime undefined (type *ftp.ServerConn has no field or method SetTime)


So, what am I doing wrong? Isn't go get the proper way to pull in rclone and its dependencies anymore?

Thanks in advance,
-- Durval.

Hi Durval,

The Go and rclone setup has changed since 2016.

I did my first setup in the spring and afterwards updated the contributing guide to reflect the new and easier setup. You see the guide here: rclone/ at master · rclone/rclone · GitHub

My best advice is to forget your old memories about GOPATH and go get, and then just follow the guide.

Hope it helps, otherwise please ask.

Happy coding,


Thanks for the tip, @Ole, and sorry for the delay in getting back to you.

Indeed, go get doesn't seem to work anymore; I didn't go through all the steps on, but what solved it for me was simply running go build where I previously used to run go get [...] and then make: go build alone downloaded dependencies (all 776MB of them, OUCH -- back in 2016 it used to be ~250MB, so TRIPLE OUCH) and resulted in a shiny new ./rclone binary, ready for immediate execution (or at least responding as expected to ./rclone --version).

-- Durval.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.