Compile rclone on linux - getting error about winfsp

i am trying to compile rclone for the first time.

using WSL, which is ubuntu linux.

when i run go build -tags cmount, i get the following error about winfsp. tho linux does not use winfsp.
please advise.

# github.com/winfsp/cgofuse/fuse
/root/go/pkg/mod/github.com/winfsp/cgofuse@v1.5.1-0.20221118130120-84c0898ad2e0/fuse/host_cgo.go:117:10: fatal error: fuse.h: No such file or directory
  117 | #include <fuse.h>
      |          ^~~~~~~~
1 Like

rclone cmount uses winfsp/cgofuse. This is a Go interface to libfuse written by the author of winfsp - that is its only link to WinFSP.

I think you need to apt install libfuse-dev and it should work OK.

thanks much, rclone cmount seems to work on WSL

now, i copied the executable to the synbox, i get

/rclone version
./rclone: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./rclone)
./rclone: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./rclone)

the synbox uses AMD64, same as WSL

uname -a
Linux bnas 4.4.180+ #42661 SMP Mon Jun 27 15:05:48 CST 2022 x86_64 GNU/Linux synology_apollolake_218+
```

this is the output of rclone version, running on WSL
```
rclone v1.62.2-DEV
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.90.1-microsoft-standard-WSL2 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: dynamic
- go/tags: cmount
```

and is the official rclone running on synology
```
rclone version
rclone v1.62.2
- os/version: unknown
- os/kernel: 4.4.180+ (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: none
```

This is why I don't make a linux rclone cmount!

You need to compile it with the same or older version of glibc you have on the synbox otherwise you'll get these errors

:frowning:

Can you compile it on the synbox?

thanks,

so now i compiled on synbox, go build -tags cmount, did not look correct
i re-ran the compile and same result, the go/tag is not set

user99@bnas:~/rclone/go/rclone-1.62.2$ go build -tags cmount

user99@bnas:~/rclone/go/rclone-1.62.2$ ./rclone version
rclone v1.62.2-DEV
- os/version: unknown
- os/kernel: 4.4.180+ (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: none

user99@bnas:~/rclone/go/rclone-1.62.2$ ./rclone mount wasabi01: ~/rclone/mount/remote
2023/03/20 11:52:59 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH

user99@bnas:~/rclone/go/rclone-1.62.2$ ./rclone cmount wasabi01: ~/rclone/mount/remote
Error: unknown command "cmount" for "rclone"

Did you mean this?
        mount

Run 'rclone --help' for usage.
You could use 'rclone selfupdate' to get latest features.

2023/03/20 11:53:05 Fatal error: unknown command "cmount" for "rclone"

Did you mean this?
        mount

Did it build properly? That is the right command so I can only suppose it didn't complete the build.

Or possibly you have some enviroment var set? What does go env say?

the issue with no support for fuse3 on a linux machine is going to an issue in the forum, well, it already is an issue.
so if/when i can get this to work on the synbox, i will create a how-to guide.


when i compiled it the first time, it seems to work, no errors.
when i ran the command, there was no output, so i believe there are no issues.

i used this guide to install go, worked fine on wsl, no issue on synbox
https://www.digitalocean.com/community/tutorials/how-to-install-go-on-ubuntu-20-04

the rclone go source code is at
/var/services/homes/user99/rclone/go/rclone-1.62.2

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/var/services/homes/user99/.cache/go-build"
GOENV="/var/services/homes/user99/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/var/services/homes/user99/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/var/services/homes/user99/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/var/services/homes/user99/rclone/go/rclone-1.62.2/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 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1929342556=/tmp/go-build -gno-record-gcc-switches"

This is the problem.

This needs to be "1" for cmount.

You can try setting it as an environment variable and see if that helps.

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