fangfufu / httpdirfs

A filesystem which allows you to mount HTTP directory listings or a single file, with a permanent cache. Now with Airsonic / Subsonic support!
Other
766 stars 59 forks source link

Version 1.2.6 fails to build on FreeBSD 14.1-RELEASE (amd64) #165

Closed diizzyy closed 6 hours ago

diizzyy commented 3 days ago

Hi,

Latest versions fails to build on FreeBSD, se below for details

C compiler for the host machine: cc (clang 18.1.5 "FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9)")
C linker for the host machine: cc ld.lld 18.1.5
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/local/bin/pkgconf) 2.3.0
Run-time dependency gumbo found: YES 0.12.1
Run-time dependency libcurl found: YES 8.10.1
Run-time dependency fuse3 found: YES 3.16.2
Run-time dependency uuid found: YES 1.47.1
Run-time dependency expat found: YES 2.6.3
Run-time dependency openssl found: YES 3.0.13

Build log:

[  9% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_network.c.o -MF httpdirfs.p/src_network.c.o.d -o httpdirfs.p/src_network.c.o -c ../src/network.c
FAILED: httpdirfs.p/src_network.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_network.c.o -MF httpdirfs.p/src_network.c.o.d -o httpdirfs.p/src_network.c.o -c ../src/network.c
In file included from ../src/network.c:1:
In file included from ../src/network.h:11:
In file included from ../src/link.h:12:
../src/cache.h:98:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   98 | void CacheSystem_clear();
      |                       ^
      |                        void
../src/cache.h:103:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  103 | char *CacheSystem_get_cache_dir();
      |                                ^
      |                                 void
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/network.c:3:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
In file included from ../src/network.c:4:
../src/memcache.h:35:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   35 | #endif
      |       ^
7 errors generated.
[ 18% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_main.c.o -MF httpdirfs.p/src_main.c.o.d -o httpdirfs.p/src_main.c.o -c ../src/main.c
FAILED: httpdirfs.p/src_main.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_main.c.o -MF httpdirfs.p/src_main.c.o.d -o httpdirfs.p/src_main.c.o -c ../src/main.c
In file included from ../src/main.c:2:
In file included from ../src/link.h:12:
../src/cache.h:98:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   98 | void CacheSystem_clear();
      |                       ^
      |                        void
../src/cache.h:103:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  103 | char *CacheSystem_get_cache_dir();
      |                                ^
      |                                 void
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/main.c:3:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
../src/main.c:12:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   12 | static void print_long_help();
      |                            ^
      |                             void
../src/main.c:117:33: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  117 | static char *get_XDG_CONFIG_HOME()
      |                                 ^
      |                                  void
../src/main.c:376:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  376 | static void print_long_help()
      |                            ^
      |                             void
../src/main.c:434:2: error: no newline at end of file [-Werror,-Wnewline-eof]
  434 | }
      |  ^
10 errors generated.
[ 27% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
FAILED: httpdirfs.p/src_fuse_local.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
In file included from ../src/fuse_local.c:3:
In file included from ../src/link.h:12:
../src/cache.h:98:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   98 | void CacheSystem_clear();
      |                       ^
      |                        void
../src/cache.h:103:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  103 | char *CacheSystem_get_cache_dir();
      |                                ^
      |                                 void
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/fuse_local.c:4:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
../src/fuse_local.c:16:58: error: declaration of 'struct fuse_config' will not be visible outside of this function [-Werror,-Wvisibility]
   16 | static void *fs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
      |                                                          ^
../src/fuse_local.c:144:58: error: ISO C forbids forward references to 'enum' types [-Werror,-Wpedantic]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:144:58: error: declaration of 'enum fuse_readdir_flags' will not be visible outside of this function [-Werror,-Wvisibility]
../src/fuse_local.c:144:77: error: variable has incomplete type 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:144:58: note: forward declaration of 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:166:32: error: too many arguments to function call, expected 4, have 5
  166 |     dir_add(buf, ".", NULL, 0, 0);
      |     ~~~~~~~                    ^
../src/fuse_local.c:167:33: error: too many arguments to function call, expected 4, have 5
  167 |     dir_add(buf, "..", NULL, 0, 0);
      |     ~~~~~~~                     ^
../src/fuse_local.c:172:51: error: too many arguments to function call, expected 4, have 5
  172 |             dir_add(buf, link->linkname, NULL, 0, 0);
      |             ~~~~~~~                               ^
../src/fuse_local.c:144:77: error: unused parameter 'fr_flags' [-Werror,-Wunused-parameter]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:180:16: error: incompatible function pointer types initializing 'int (*)(const char *, struct stat *)' with an expression of type 'int (const char *, struct stat *, struct fuse_file_info *)' [-Wincompatible-function-pointer-types]
  180 |     .getattr = fs_getattr,
      |                ^~~~~~~~~~
../src/fuse_local.c:181:16: error: incompatible function pointer types initializing 'int (*)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)' (aka 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *)') with an expression of type 'int (const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)' (aka 'int (const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *, enum fuse_readdir_flags)') [-Wincompatible-function-pointer-types]
  181 |     .readdir = fs_readdir,
      |                ^~~~~~~~~~
../src/fuse_local.c:184:13: error: incompatible function pointer types initializing 'void *(*)(struct fuse_conn_info *)' with an expression of type 'void *(struct fuse_conn_info *, struct fuse_config *)' [-Wincompatible-function-pointer-types]
  184 |     .init = fs_init,
      |             ^~~~~~~
17 errors generated.
[ 36% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_cache.c.o -MF httpdirfs.p/src_cache.c.o.d -o httpdirfs.p/src_cache.c.o -c ../src/cache.c
FAILED: httpdirfs.p/src_cache.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_cache.c.o -MF httpdirfs.p/src_cache.c.o.d -o httpdirfs.p/src_cache.c.o -c ../src/cache.c
In file included from ../src/cache.c:1:
In file included from ../src/cache.h:14:
In file included from ../src/link.h:12:
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/cache.c:1:
../src/cache.h:98:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   98 | void CacheSystem_clear();
      |                       ^
      |                        void
../src/cache.h:103:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  103 | char *CacheSystem_get_cache_dir();
      |                                ^
      |                                 void
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/cache.c:4:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
../src/cache.c:39:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   39 | char *CacheSystem_get_cache_dir()
      |                                ^
      |                                 void
../src/cache.c:187:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  187 | void CacheSystem_clear()
      |                       ^
      |                        void
../src/cache.c:522:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  522 | static Cache *Cache_alloc()
      |                          ^
      |                           void
10 errors generated.
[ 45% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_link.c.o -MF httpdirfs.p/src_link.c.o.d -o httpdirfs.p/src_link.c.o -c ../src/link.c
FAILED: httpdirfs.p/src_link.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_link.c.o -MF httpdirfs.p/src_link.c.o.d -o httpdirfs.p/src_link.c.o -c ../src/link.c
In file included from ../src/link.c:1:
In file included from ../src/link.h:12:
../src/cache.h:98:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   98 | void CacheSystem_clear();
      |                       ^
      |                        void
../src/cache.h:103:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  103 | char *CacheSystem_get_cache_dir();
      |                                ^
      |                                 void
../src/cache.h:156:7: error: no newline at end of file [-Werror,-Wnewline-eof]
  156 | #endif
      |       ^
In file included from ../src/link.c:3:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
In file included from ../src/link.c:4:
../src/memcache.h:35:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   35 | #endif
      |       ^
7 errors generated.
[ 54% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_util.c.o -MF httpdirfs.p/src_util.c.o.d -o httpdirfs.p/src_util.c.o -c ../src/util.c
FAILED: httpdirfs.p/src_util.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -std=c99 -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_util.c.o -MF httpdirfs.p/src_util.c.o.d -o httpdirfs.p/src_util.c.o -c ../src/util.c
In file included from ../src/util.c:4:
../src/log.h:28:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   28 | int log_level_init();
      |                   ^
      |                    void
../src/log.h:47:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   47 | void print_version();
      |                   ^
      |                    void
../src/log.h:49:7: error: no newline at end of file [-Werror,-Wnewline-eof]
   49 | #endif
      |       ^
3 errors generated.
ninja: build stopped: subcommand failed.

Best regards, Daniel

fangfufu commented 3 days ago

Could you submit a fix please? It doesn't seem to be difficult to fix. I don't have FreeBSD installed. It will take a couple of weeks I reckon for me to fix this, mainly due to personal commitments.

fangfufu commented 2 days ago

@diizzyy let me know if the fix I made works.

diizzyy commented 2 days ago

Thanks for having a look, slightly better but still fails unfortunately.

[  9% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_main.c.o -MF httpdirfs.p/src_main.c.o.d -o httpdirfs.p/src_main.c.o -c ../src/main.c
FAILED: httpdirfs.p/src_main.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_main.c.o -MF httpdirfs.p/src_main.c.o.d -o httpdirfs.p/src_main.c.o -c ../src/main.c
../src/main.c:376:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  376 | static void print_long_help()
      |                            ^
      |                             void
1 error generated.
[ 18% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
FAILED: httpdirfs.p/src_fuse_local.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
../src/fuse_local.c:16:58: error: declaration of 'struct fuse_config' will not be visible outside of this function [-Werror,-Wvisibility]
   16 | static void *fs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
      |                                                          ^
../src/fuse_local.c:144:58: error: ISO C forbids forward references to 'enum' types [-Werror,-Wpedantic]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:144:58: error: declaration of 'enum fuse_readdir_flags' will not be visible outside of this function [-Werror,-Wvisibility]
../src/fuse_local.c:144:77: error: variable has incomplete type 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:144:58: note: forward declaration of 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:166:32: error: too many arguments to function call, expected 4, have 5
  166 |     dir_add(buf, ".", NULL, 0, 0);
      |     ~~~~~~~                    ^
../src/fuse_local.c:167:33: error: too many arguments to function call, expected 4, have 5
  167 |     dir_add(buf, "..", NULL, 0, 0);
      |     ~~~~~~~                     ^
../src/fuse_local.c:172:51: error: too many arguments to function call, expected 4, have 5
  172 |             dir_add(buf, link->linkname, NULL, 0, 0);
      |             ~~~~~~~                               ^
../src/fuse_local.c:144:77: error: unused parameter 'fr_flags' [-Werror,-Wunused-parameter]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:180:16: error: incompatible function pointer types initializing 'int (*)(const char *, struct stat *)' with an expression of type 'int (const char *, struct stat *, struct fuse_file_info *)' [-Wincompatible-function-pointer-types]
  180 |     .getattr = fs_getattr,
      |                ^~~~~~~~~~
../src/fuse_local.c:181:16: error: incompatible function pointer types initializing 'int (*)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)' (aka 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *)') with an expression of type 'int (const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)' (aka 'int (const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *, enum fuse_readdir_flags)') [-Wincompatible-function-pointer-types]
  181 |     .readdir = fs_readdir,
      |                ^~~~~~~~~~
../src/fuse_local.c:184:13: error: incompatible function pointer types initializing 'void *(*)(struct fuse_conn_info *)' with an expression of type 'void *(struct fuse_conn_info *, struct fuse_config *)' [-Wincompatible-function-pointer-types]
  184 |     .init = fs_init,
      |             ^~~~~~~
11 errors generated.
[ 27% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_cache.c.o -MF httpdirfs.p/src_cache.c.o.d -o httpdirfs.p/src_cache.c.o -c ../src/cache.c
FAILED: httpdirfs.p/src_cache.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_cache.c.o -MF httpdirfs.p/src_cache.c.o.d -o httpdirfs.p/src_cache.c.o -c ../src/cache.c
../src/cache.c:39:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   39 | char *CacheSystem_get_cache_dir()
      |                                ^
      |                                 void
../src/cache.c:187:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  187 | void CacheSystem_clear()
      |                       ^
      |                        void
2 errors generated.
[ 36% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_network.c.o -MF httpdirfs.p/src_network.c.o.d -o httpdirfs.p/src_network.c.o -c ../src/network.c
[ 45% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_util.c.o -MF httpdirfs.p/src_util.c.o.d -o httpdirfs.p/src_util.c.o -c ../src/util.c
[ 54% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_link.c.o -MF httpdirfs.p/src_link.c.o.d -o httpdirfs.p/src_link.c.o -c ../src/link.c
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/fusefs-httpdirfs
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/fusefs-httpdirfs
fangfufu commented 2 days ago

Well your system's libfuse seems to be out of date. Do you have fusefs-libs3?

fangfufu commented 2 days ago

@diizzyy , Have a look at https://github.com/fangfufu/httpdirfs/commit/08700415d7b61d9f611a858481b26858fe92eb7a, let me know if it fixes it.

edenist commented 2 days ago

@diizzyy I've been helping to fix this up on FreeBSD. I have been doing so on 13.4, whereas you are on 14.1, but the packages should be the same, the only difference would be LLVM 17 vs 18.

Are you able to confirm what verson of fusefs-libs3 you have installed? I've built this successfully with v3.16.2. ~If you're using pkg from the freebsd provided builds, those update quarterly so you might be a few versions behind.~ [scratch that, this version was updated Oct 2023, so this shouldn't be an issue].

diizzyy commented 1 day ago

Hi,

I can confirm that applying both your suggested commits makes httpdirfs compile on 14.1-RELEASE using GCC 13. I am using the latest version of fuse3 (see first post).

Edit: It still fails using LLVM 18 (which would be perferable to use).

[  9% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
FAILED: httpdirfs.p/src_fuse_local.c.o
cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_fuse_local.c.o -MF httpdirfs.p/src_fuse_local.c.o.d -o httpdirfs.p/src_fuse_local.c.o -c ../src/fuse_local.c
../src/fuse_local.c:16:58: error: declaration of 'struct fuse_config' will not be visible outside of this function [-Werror,-Wvisibility]
   16 | static void *fs_init(struct fuse_conn_info *conn, struct fuse_config *cfg)
      |                                                          ^
../src/fuse_local.c:144:58: error: ISO C forbids forward references to 'enum' types [-Werror,-Wpedantic]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:144:58: error: declaration of 'enum fuse_readdir_flags' will not be visible outside of this function [-Werror,-Wvisibility]
../src/fuse_local.c:144:77: error: variable has incomplete type 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:144:58: note: forward declaration of 'enum fuse_readdir_flags'
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                          ^
../src/fuse_local.c:166:32: error: too many arguments to function call, expected 4, have 5
  166 |     dir_add(buf, ".", NULL, 0, 0);
      |     ~~~~~~~                    ^
../src/fuse_local.c:167:33: error: too many arguments to function call, expected 4, have 5
  167 |     dir_add(buf, "..", NULL, 0, 0);
      |     ~~~~~~~                     ^
../src/fuse_local.c:172:51: error: too many arguments to function call, expected 4, have 5
  172 |             dir_add(buf, link->linkname, NULL, 0, 0);
      |             ~~~~~~~                               ^
../src/fuse_local.c:144:77: error: unused parameter 'fr_flags' [-Werror,-Wunused-parameter]
  144 |            off_t offset, struct fuse_file_info *fi, enum fuse_readdir_flags fr_flags)
      |                                                                             ^
../src/fuse_local.c:180:16: error: incompatible function pointer types initializing 'int (*)(const char *, struct stat *)' with an expression of type 'int (const char *, struct stat *, struct fuse_file_info *)' [-Wincompatible-function-pointer-types]
  180 |     .getattr = fs_getattr,
      |                ^~~~~~~~~~
../src/fuse_local.c:181:16: error: incompatible function pointer types initializing 'int (*)(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *)' (aka 'int (*)(const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *)') with an expression of type 'int (const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *, enum fuse_readdir_flags)' (aka 'int (const char *, void *, int (*)(void *, const char *, const struct stat *, long), long, struct fuse_file_info *, enum fuse_readdir_flags)') [-Wincompatible-function-pointer-types]
  181 |     .readdir = fs_readdir,
      |                ^~~~~~~~~~
../src/fuse_local.c:184:13: error: incompatible function pointer types initializing 'void *(*)(struct fuse_conn_info *)' with an expression of type 'void *(struct fuse_conn_info *, struct fuse_config *)' [-Wincompatible-function-pointer-types]
  184 |     .init = fs_init,
      |             ^~~~~~~
11 errors generated.
[ 18% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_main.c.o -MF httpdirfs.p/src_main.c.o.d -o httpdirfs.p/src_main.c.o -c ../src/main.c
[ 27% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_network.c.o -MF httpdirfs.p/src_network.c.o.d -o httpdirfs.p/src_network.c.o -c ../src/network.c
[ 36% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_util.c.o -MF httpdirfs.p/src_util.c.o.d -o httpdirfs.p/src_util.c.o -c ../src/util.c
[ 45% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_cache.c.o -MF httpdirfs.p/src_cache.c.o.d -o httpdirfs.p/src_cache.c.o -c ../src/cache.c
[ 54% 6/11] cc -Ihttpdirfs.p -I. -I.. -I/usr/local/include -I/usr/local/include/fuse3 -I/usr/local/include/uuid -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O2 -pipe -march=tigerlake -fstack-protector-strong -fno-strict-aliasing -Wstrict-prototypes -pthread -D_GNU_SOURCE '-DVERSION="1.2.6"' -MD -MQ httpdirfs.p/src_link.c.o -MF httpdirfs.p/src_link.c.o.d -o httpdirfs.p/src_link.c.o -c ../src/link.c
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.

Best regards, Daniel

fangfufu commented 14 hours ago

@diizzyy , could you post the full compilation log please? We need to try and replicate whichever command you used to compile.

diizzyy commented 6 hours ago

Hi,

It seems that it works as intended now, no idea what caused it but probably some odd library mismatch.

https://pdr2.bofh.network/data/133-diizzy/2024-10-29_15h43m25s/logs/errors/fusefs-httpdirfs-1.2.6.log https://pdr2.bofh.network/data/141-diizzy/2024-10-29_15h50m16s/logs/errors/fusefs-httpdirfs-1.2.6.log

The plist issue is just for packaging.

Thanks for looking into it!

Best regards, Daniel

fangfufu commented 4 hours ago

Cool, I am glad that we got there in the end. :)