tup icon indicating copy to clipboard operation
tup copied to clipboard

Building on Windows and a FUSE port

Open billziss-gh opened this issue 8 years ago • 5 comments

I am looking to build tup on native Windows. Are there clear instructions somewhere on how to achieve this? For example, what variant of the mingw tools is one supposed to use (I have mingw-w64, but it is not clear to me how to use it to build). [Is it MSYS2?]

I have already had success in porting tup to Cygwin including the FUSE layer. I would send a PR, but the problem is that Cygwin does not understand Windows mountpoints (junctions) and although mounting the tup file system happens correctly, the file system is inaccessible from Cygwin and hence tup running on Cygwin. [I can see it from cmd.exe or explorer but not Cygwin, because Cygwin erroneously interprets mountpoints as symbolic links. This is a Cygwin bug.]

FULL DISCLOSURE: I am the author of WinFsp, which is a FUSE solution for Windows (and Cygwin). I am interested to help port the tup FUSE layer to Windows.

billziss-gh avatar Jun 21 '17 18:06 billziss-gh

It is currently not possible. The way Tup's build system is arranged, the build is carried under the assumption that it happens on Linux, such that the Linux version is always built and the Windows/MinGW version only optionally, as an addition (that's why there's this mingwcc macro). I am currently working on Tup on Windows and the way I have fixed this is by making the build generic, so only one version of Tup is built and the compiler and flags are specified in tup.config. Specifically, what you are looking for is to make all instances of the mingwcc macro read cc. It builds fine here with MSYS2-MinGW64 on Windows 10.

In case it is of interest to you, I am working on making Tup truly native on Windows (i.e. no MinGW or Cygwin). Hopefully it's possible to implement all of Tup's features in a native way, so that it needs no compat layers and builds with MSVC.

kalrish avatar Jun 25 '17 12:06 kalrish

Done — check #320.

kalrish avatar Jun 25 '17 16:06 kalrish

It is currently not possible. The way Tup's build system is arranged, the build is carried under the assumption that it happens on Linux.

Thanks for confirming this.

Done — check #320.

Fantastic. I will have a look.

As said my interest was to see how whether it was possible to make a native Windows port including the FUSE layer. It sounds like you have made this easier. Thank you.

billziss-gh avatar Jun 26 '17 21:06 billziss-gh

@billziss-gh @kalrish Can WinFsp make support variants on windows easy?

pbl-pw avatar Oct 24 '18 01:10 pbl-pw

@pbl-pw

Unfortunately I do not understand tup well enough at this time to be able to answer this question.

billziss-gh avatar Oct 24 '18 04:10 billziss-gh