Build rlcone for windows in ubuntu

i try to build rclone in ubuntu for window,and it succed,but i run rclone in window and find it don't have mount command.i try to use "go build -tags cmount" to build again in ubuntu for windows,but it give out some err,like this
root@dzhl-virtual-machine:~/rclone# go build -tags cmount

In file included from ../go/pkg/mod/
/usr/include/fuse/fuse_common.h:12:2: error: #error "Never include <fuse_common.h> directly; use <fuse.h> or <fuse_lowlevel.h> instead."
#error "Never include <fuse_common.h> directly; use <fuse.h> or <fuse_lowlevel.h> instead."
In file included from ../go/pkg/mod/
/usr/include/fuse/fuse_common.h:33:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
#error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
In file included from ../go/pkg/mod/
/usr/include/fuse/fuse.h:33:10: fatal error: sys/statvfs.h: No such file or directory
#include <sys/statvfs.h>
compilation terminated.
and i don't know how to add -D_FILE_OFFSET_BITS=64 flag,so i try "go build -tags cmount -tags D_FILE_OFFSET_BITS=64" and "go build -tags '-cmount -D_FILE_OFFSET_BITS=64'",these command all can build suceed,but all rclone.exe not have mount there anybody can tell me how to build rclone.exe with mount flag in ubuntu for window?thanks very much

anybody can help me?

Why not just download the binary? Is there a reason you are building it?

i change some code for onedrive

You are building rclone on Ubuntu, and cross-compiling to rclone windows binary? I don't think that is possible, cmount on Windows depends, via cgofuse, on the Windows-specific WinFsp SDK. You can/must build it on Windows, with WinFsp and mingw gcc installed.

1 Like

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