dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.2k stars 661 forks source link

Support newer FUSE APIs #1129

Closed Gentoli closed 1 year ago

Gentoli commented 1 year ago

Environment

Check List

N/A

Description

I am trying to compile s3fs-fuse with dokanfuse2. It requires fuse >= 2.8.4 but the fuse version defined in pkg-config.pc.in is 2.6.0.

According to libfuse release tags, FUSE 2.9.4 is released around end of 2015 and 3.0 in the end of 2016. I think dokanfuse2 should at least support all 2.x or even 3.x.

Logs

Some compilation error logs when dokanfuse2 version is manually set:

g++ -DHAVE_CONFIG_H -I. -I..  -I/c/Users/<user>/source/repos/s3fs-fuse/dokan/Msys2/include -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2      -g -O2 -Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘void* s3fs_init(fuse_conn_info*)’:
s3fs.cpp:3939:28: error: ‘struct fuse_conn_info’ has no member named ‘capable’
 3939 |     if((unsigned int)conn->capable & FUSE_CAP_ATOMIC_O_TRUNC){
      |                            ^~~~~~~
s3fs.cpp:3939:38: error: ‘FUSE_CAP_ATOMIC_O_TRUNC’ was not declared in this scope
 3939 |     if((unsigned int)conn->capable & FUSE_CAP_ATOMIC_O_TRUNC){
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
s3fs.cpp:3940:16: error: ‘struct fuse_conn_info’ has no member named ‘want’
 3940 |          conn->want |= FUSE_CAP_ATOMIC_O_TRUNC;
      |                ^~~~
s3fs.cpp:3944:28: error: ‘struct fuse_conn_info’ has no member named ‘capable’
 3944 |     if((unsigned int)conn->capable & FUSE_CAP_BIG_WRITES){
      |                            ^~~~~~~
s3fs.cpp:3944:38: error: ‘FUSE_CAP_BIG_WRITES’ was not declared in this scope
 3944 |     if((unsigned int)conn->capable & FUSE_CAP_BIG_WRITES){
      |                                      ^~~~~~~~~~~~~~~~~~~
s3fs.cpp:3945:16: error: ‘struct fuse_conn_info’ has no member named ‘want’
 3945 |          conn->want |= FUSE_CAP_BIG_WRITES;
      |                ^~~~
s3fs.cpp: In function ‘int main(int, char**)’:
s3fs.cpp:5343:15: error: ‘struct fuse_operations’ has no member named ‘flag_utime_omit_ok’
 5343 |     s3fs_oper.flag_utime_omit_ok = true;
      |               ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:729: s3fs.o] Error 1
Liryna commented 1 year ago

Hi @Gentoli ,

Indeed, this is a good idea. There is an issue already open for this feature here https://github.com/dokan-dev/dokany/issues/182. I would be glad to review and help any contribution!

Liryna commented 1 year ago

Closing for inactivity