[GH-ISSUE #2503] Compiling on Windows is broken #1220

Closed
opened 2026-03-04 01:52:19 +03:00 by kerem · 5 comments
Owner

Originally created by @MargaretaWhite23 on GitHub (Jul 24, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2503

Additional Information

Version of s3fs being used (s3fs --version)

Commit:411e42384ee88acaf388c3d36070d109274bd027
Version 1.94

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse or dpkg -s fuse)

# pkg-config --modversion fuse.pc
2.8.4

Kernel information (uname -r)

3.5.3-d8b21b8c.x86_64

GNU/Linux Distribution, if applicable (cat /etc/os-release)

# cat /etc/os-release
NAME=MSYS2
ID=msys2
PRETTY_NAME="MSYS2"
ID_LIKE="cygwin arch"
HOME_URL="https://www.msys2.org"
BUG_REPORT_URL="https://github.com/msys2/MSYS2-packages/issues"

How to run s3fs, if applicable

N/A

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

N/A

Details about issue

Compilation of the Windows executable seems to be broken
(Following guide on:
https://github.com/s3fs-fuse/s3fs-fuse/blob/master/COMPILATION.md
)

Error message is as follows:

Administrator@WIN-HRGF8TFIGPP MSYS ~/s3fs-fuse-master
# make
make  all-recursive
make[1]: Entering directory '/home/Administrator/s3fs-fuse-master'
Making all in src
make[2]: Entering directory '/home/Administrator/s3fs-fuse-master/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse -I/usr/include/libxml2  -DUSE_OPENSSL_30   -Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=3 -std=c++11 -g -O2 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
In file included from /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/fuse_common.h:30,
                 from /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/fuse.h:30,
                 from s3fs.h:26,
                 from s3fs.cpp:35:
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘void* fsp_fuse_signal_thread(void*)’:
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:342:14: error: ‘sigwait’ was not declared in this scope
  342 |     if (0 == sigwait((sigset_t *)psigmask, &sig))
      |              ^~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘int fsp_fuse_set_signal_handlers(void*)’:
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:22: error: aggregate ‘fsp_fuse_set_signal_handlers(void*)::sigaction oldsa’ has incomplete type and cannot be defined
  364 |     struct sigaction oldsa, newsa;
      |                      ^~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:29: error: aggregate ‘fsp_fuse_set_signal_handlers(void*)::sigaction newsa’ has incomplete type and cannot be defined
  364 |     struct sigaction oldsa, newsa;
      |                             ^~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:367:5: error: ‘memset’ was not declared in this scope
  367 |     memset(&newsa, 0, sizeof newsa);
      |     ^~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:237:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
  236 | #include <utime.h>
  +++ |+#include <cstring>
  237 |
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:351:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  351 |     if (-1 != sigaction((sig), 0, &oldsa) &&\
      |                                         ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:373:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’
  373 |             FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:355:35: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  355 |         sigaction((sig), &newsa, 0);\
      |                                   ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:373:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’
  373 |             FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:375:13: error: ‘sigemptyset’ was not declared in this scope
  375 |             sigemptyset(&sigmask);
      |             ^~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  358 |     if (-1 != sigaction((sig), 0, &oldsa) &&\
      |                                         ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:376:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  376 |             FSP_FUSE_SIGADDSET(SIGHUP);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope
  360 |         sigaddset(&sigmask, (sig));
      |         ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:376:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  376 |             FSP_FUSE_SIGADDSET(SIGHUP);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  358 |     if (-1 != sigaction((sig), 0, &oldsa) &&\
      |                                         ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:377:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  377 |             FSP_FUSE_SIGADDSET(SIGINT);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope
  360 |         sigaddset(&sigmask, (sig));
      |         ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:377:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  377 |             FSP_FUSE_SIGADDSET(SIGINT);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  358 |     if (-1 != sigaction((sig), 0, &oldsa) &&\
      |                                         ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:378:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  378 |             FSP_FUSE_SIGADDSET(SIGTERM);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope
  360 |         sigaddset(&sigmask, (sig));
      |         ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:378:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’
  378 |             FSP_FUSE_SIGADDSET(SIGTERM);
      |             ^~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:379:38: error: ‘SIG_BLOCK’ was not declared in this scope
  379 |             if (0 != pthread_sigmask(SIG_BLOCK, &sigmask, 0))
      |                                      ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:379:22: error: ‘pthread_sigmask’ was not declared in this scope
  379 |             if (0 != pthread_sigmask(SIG_BLOCK, &sigmask, 0))
      |                      ^~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:394:38: error: ‘SIG_UNBLOCK’ was not declared in this scope; did you mean ‘SOCK_NONBLOCK’?
  394 |             if (0 != pthread_sigmask(SIG_UNBLOCK, &sigmask, 0))
      |                                      ^~~~~~~~~~~
      |                                      SOCK_NONBLOCK
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:394:22: error: ‘pthread_sigmask’ was not declared in this scope
  394 |             if (0 != pthread_sigmask(SIG_UNBLOCK, &sigmask, 0))
      |                      ^~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:396:13: error: ‘sigemptyset’ was not declared in this scope
  396 |             sigemptyset(&sigmask);
      |             ^~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:351:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  351 |     if (-1 != sigaction((sig), 0, &oldsa) &&\
      |                                         ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:398:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’
  398 |             FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:355:35: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  355 |         sigaction((sig), &newsa, 0);\
      |                                   ^
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:398:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’
  398 |             FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’
  364 |     struct sigaction oldsa, newsa;
      |            ^~~~~~~~~
s3fs.cpp: At global scope:
s3fs.cpp:4688:12: warning: ‘int print_umount_message(const std::string&, bool)’ defined but not used [-Wunused-function]
 4688 | static int print_umount_message(const std::string& mp, bool force)
      |            ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:725: s3fs.o] Error 1
make[2]: Leaving directory '/home/Administrator/s3fs-fuse-master/src'
make[1]: *** [Makefile:418: all-recursive] Error 1
make[1]: Leaving directory '/home/Administrator/s3fs-fuse-master'
make: *** [Makefile:357: all] Error 2


Originally created by @MargaretaWhite23 on GitHub (Jul 24, 2024). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2503 <!-- -------------------------------------------------------------------------- The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all. Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD. --------------------------------------------------------------------------- --> ### Additional Information #### Version of s3fs being used (`s3fs --version`) ``` Commit:411e42384ee88acaf388c3d36070d109274bd027 Version 1.94 ``` #### Version of fuse being used (`pkg-config --modversion fuse`, `rpm -qi fuse` or `dpkg -s fuse`) ``` # pkg-config --modversion fuse.pc 2.8.4 ``` #### Kernel information (`uname -r`) `3.5.3-d8b21b8c.x86_64` #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) ``` # cat /etc/os-release NAME=MSYS2 ID=msys2 PRETTY_NAME="MSYS2" ID_LIKE="cygwin arch" HOME_URL="https://www.msys2.org" BUG_REPORT_URL="https://github.com/msys2/MSYS2-packages/issues" ``` #### How to run s3fs, if applicable `N/A` #### s3fs syslog messages (`grep s3fs /var/log/syslog`, `journalctl | grep s3fs`, or `s3fs outputs`) `N/A` ### Details about issue Compilation of the Windows executable seems to be broken (Following guide on: https://github.com/s3fs-fuse/s3fs-fuse/blob/master/COMPILATION.md ) Error message is as follows: ``` Administrator@WIN-HRGF8TFIGPP MSYS ~/s3fs-fuse-master # make make all-recursive make[1]: Entering directory '/home/Administrator/s3fs-fuse-master' Making all in src make[2]: Entering directory '/home/Administrator/s3fs-fuse-master/src' g++ -DHAVE_CONFIG_H -I. -I.. -I/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse -I/usr/include/libxml2 -DUSE_OPENSSL_30 -Wall -fno-exceptions -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=3 -std=c++11 -g -O2 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp In file included from /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/fuse_common.h:30, from /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/fuse.h:30, from s3fs.h:26, from s3fs.cpp:35: /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘void* fsp_fuse_signal_thread(void*)’: /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:342:14: error: ‘sigwait’ was not declared in this scope 342 | if (0 == sigwait((sigset_t *)psigmask, &sig)) | ^~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘int fsp_fuse_set_signal_handlers(void*)’: /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:22: error: aggregate ‘fsp_fuse_set_signal_handlers(void*)::sigaction oldsa’ has incomplete type and cannot be defined 364 | struct sigaction oldsa, newsa; | ^~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:29: error: aggregate ‘fsp_fuse_set_signal_handlers(void*)::sigaction newsa’ has incomplete type and cannot be defined 364 | struct sigaction oldsa, newsa; | ^~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:367:5: error: ‘memset’ was not declared in this scope 367 | memset(&newsa, 0, sizeof newsa); | ^~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:237:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’? 236 | #include <utime.h> +++ |+#include <cstring> 237 | /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:351:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 351 | if (-1 != sigaction((sig), 0, &oldsa) &&\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:373:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’ 373 | FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:355:35: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 355 | sigaction((sig), &newsa, 0);\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:373:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’ 373 | FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:375:13: error: ‘sigemptyset’ was not declared in this scope 375 | sigemptyset(&sigmask); | ^~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 358 | if (-1 != sigaction((sig), 0, &oldsa) &&\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:376:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 376 | FSP_FUSE_SIGADDSET(SIGHUP); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope 360 | sigaddset(&sigmask, (sig)); | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:376:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 376 | FSP_FUSE_SIGADDSET(SIGHUP); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 358 | if (-1 != sigaction((sig), 0, &oldsa) &&\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:377:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 377 | FSP_FUSE_SIGADDSET(SIGINT); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope 360 | sigaddset(&sigmask, (sig)); | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:377:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 377 | FSP_FUSE_SIGADDSET(SIGINT); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:358:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 358 | if (-1 != sigaction((sig), 0, &oldsa) &&\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:378:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 378 | FSP_FUSE_SIGADDSET(SIGTERM); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:360:9: error: ‘sigaddset’ was not declared in this scope 360 | sigaddset(&sigmask, (sig)); | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:378:13: note: in expansion of macro ‘FSP_FUSE_SIGADDSET’ 378 | FSP_FUSE_SIGADDSET(SIGTERM); | ^~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:379:38: error: ‘SIG_BLOCK’ was not declared in this scope 379 | if (0 != pthread_sigmask(SIG_BLOCK, &sigmask, 0)) | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:379:22: error: ‘pthread_sigmask’ was not declared in this scope 379 | if (0 != pthread_sigmask(SIG_BLOCK, &sigmask, 0)) | ^~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:394:38: error: ‘SIG_UNBLOCK’ was not declared in this scope; did you mean ‘SOCK_NONBLOCK’? 394 | if (0 != pthread_sigmask(SIG_UNBLOCK, &sigmask, 0)) | ^~~~~~~~~~~ | SOCK_NONBLOCK /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:394:22: error: ‘pthread_sigmask’ was not declared in this scope 394 | if (0 != pthread_sigmask(SIG_UNBLOCK, &sigmask, 0)) | ^~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:396:13: error: ‘sigemptyset’ was not declared in this scope 396 | sigemptyset(&sigmask); | ^~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:351:41: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 351 | if (-1 != sigaction((sig), 0, &oldsa) &&\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:398:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’ 398 | FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:355:35: error: invalid use of incomplete type ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 355 | sigaction((sig), &newsa, 0);\ | ^ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:398:13: note: in expansion of macro ‘FSP_FUSE_SET_SIGNAL_HANDLER’ 398 | FSP_FUSE_SET_SIGNAL_HANDLER(SIGPIPE, SIG_IGN); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:364:12: note: forward declaration of ‘struct fsp_fuse_set_signal_handlers(void*)::sigaction’ 364 | struct sigaction oldsa, newsa; | ^~~~~~~~~ s3fs.cpp: At global scope: s3fs.cpp:4688:12: warning: ‘int print_umount_message(const std::string&, bool)’ defined but not used [-Wunused-function] 4688 | static int print_umount_message(const std::string& mp, bool force) | ^~~~~~~~~~~~~~~~~~~~ make[2]: *** [Makefile:725: s3fs.o] Error 1 make[2]: Leaving directory '/home/Administrator/s3fs-fuse-master/src' make[1]: *** [Makefile:418: all-recursive] Error 1 make[1]: Leaving directory '/home/Administrator/s3fs-fuse-master' make: *** [Makefile:357: all] Error 2 ```
kerem 2026-03-04 01:52:19 +03:00
Author
Owner

@gaul commented on GitHub (Jul 25, 2024):

Sorry no one active on this project uses Windows so we cannot help you. @siketyan added the original MSYS support so maybe they have a suggestion? The error appears to be in the WinFsp header itself:

/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘void* fsp_fuse_signal_thread(void*)’:
/home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:342:14: error: ‘sigwait’ was not declared in this scope
  342 |     if (0 == sigwait((sigset_t *)psigmask, &sig))

so I suggest investigating why signal support is not working. I can submit a PR for some shallow issues but they won't address your main problem.

<!-- gh-comment-id:2251184835 --> @gaul commented on GitHub (Jul 25, 2024): Sorry no one active on this project uses Windows so we cannot help you. @siketyan added the original MSYS support so maybe they have a suggestion? The error appears to be in the WinFsp header itself: ``` /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h: In function ‘void* fsp_fuse_signal_thread(void*)’: /home/Administrator/s3fs-fuse-master/WinFsp/inc/fuse/winfsp_fuse.h:342:14: error: ‘sigwait’ was not declared in this scope 342 | if (0 == sigwait((sigset_t *)psigmask, &sig)) ``` so I suggest investigating why signal support is not working. I can submit a PR for some shallow issues but they won't address your main problem.
Author
Owner

@siketyan commented on GitHub (Jul 26, 2024):

I am also not a Windows user for now but will try the compile instructions on this weekend.

<!-- gh-comment-id:2251615090 --> @siketyan commented on GitHub (Jul 26, 2024): I am also not a Windows user for now but will try the compile instructions on this weekend.
Author
Owner

@siketyan commented on GitHub (Jul 26, 2024):

I tried compiling s3fs-fuse on a fresh Windows + MSYS2 environment and here is what I learned:

  • libopenssl-devel is no longer available, use openssl-devel instead.
  • -I/usr/include compiler option is missing so we can't find any libc headers on compilation. Use make CXXFLAGS=-I/usr/include instead of make.
  • inc/fuse/winfsp_fuse.h is missing import of string.h for memset(). Add #include <string.h> at the top of the file.
  • fdcache_entity.cpp uses fallocate() but it's not available. We can use posix_fallocate() but I don't know it's enough to work or not.

After these considerations, I was able to finish the compile and .\s3fs.exe --version works!

Screenshot 2024-07-27 at 1 50 09
<!-- gh-comment-id:2253132129 --> @siketyan commented on GitHub (Jul 26, 2024): I tried compiling s3fs-fuse on a fresh Windows + MSYS2 environment and here is what I learned: - `libopenssl-devel` is no longer available, use `openssl-devel` instead. - `-I/usr/include` compiler option is missing so we can't find any libc headers on compilation. Use `make CXXFLAGS=-I/usr/include` instead of `make`. - `inc/fuse/winfsp_fuse.h` is missing import of `string.h` for `memset()`. Add `#include <string.h>` at the top of the file. - `fdcache_entity.cpp` uses `fallocate()` but it's not available. We can use `posix_fallocate()` but I don't know it's enough to work or not. After these considerations, I was able to finish the compile and `.\s3fs.exe --version` works! <img width="817" alt="Screenshot 2024-07-27 at 1 50 09" src="https://github.com/user-attachments/assets/31909926-d939-45c1-9d3b-baea4d4d3e6d">
Author
Owner

@ggtakec commented on GitHub (Jul 27, 2024):

@siketyan Thanks!

inc/fuse/winfsp_fuse.h is missing import of string.h for memset(). Add #include <string.h> at the top of the file.

Thanks. This issue can be resolved with a PR from @gaul, so I will merge it.

fdcache_entity.cpp uses fallocate() but it's not available. We can use posix_fallocate() but I don't know it's enough to work or not.

Thank you for noticing that fallocate is not available.
However, posix_fallocate cannot be used to replace fallocate.
To save space on the cache file, s3fs uses PUNCH HOLE(sparse file) instead of reserving the entire file size, thus fallocate is used.

<!-- gh-comment-id:2253679073 --> @ggtakec commented on GitHub (Jul 27, 2024): @siketyan Thanks! > inc/fuse/winfsp_fuse.h is missing import of string.h for memset(). Add #include <string.h> at the top of the file. Thanks. This issue can be resolved with a PR from @gaul, so I will merge it. > fdcache_entity.cpp uses fallocate() but it's not available. We can use posix_fallocate() but I don't know it's enough to work or not. Thank you for noticing that `fallocate` is not available. However, `posix_fallocate` cannot be used to replace `fallocate`. To save space on the cache file, s3fs uses PUNCH HOLE(sparse file) instead of reserving the entire file size, thus `fallocate` is used.
Author
Owner

@gaul commented on GitHub (Aug 6, 2024):

I believe that this is fixed -- please reopen if this is not addressed. It would be great if someone could further improve Windows support and set up a CI task to avoid future breakage.

<!-- gh-comment-id:2270482344 --> @gaul commented on GitHub (Aug 6, 2024): I believe that this is fixed -- please reopen if this is not addressed. It would be great if someone could further improve Windows support and set up a CI task to avoid future breakage.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1220
No description provided.