Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
diizzyy opened this issue Oct 27, 2024 · 14 comments
Closed

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

diizzyy opened this issue Oct 27, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@diizzyy
Copy link

diizzyy commented Oct 27, 2024

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 fangfufu added the bug Something isn't working label Oct 27, 2024
@fangfufu
Copy link
Owner

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
Copy link
Owner

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

@diizzyy
Copy link
Author

diizzyy commented Oct 28, 2024

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 fangfufu reopened this Oct 28, 2024
@fangfufu
Copy link
Owner

fangfufu commented Oct 28, 2024

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

@fangfufu
Copy link
Owner

@diizzyy ,
Have a look at 0870041, let me know if it fixes it.

@edenist
Copy link
Contributor

edenist commented Oct 28, 2024

@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
Copy link
Author

diizzyy commented Oct 29, 2024

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
Copy link
Owner

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

@diizzyy
Copy link
Author

diizzyy commented Oct 30, 2024

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

@diizzyy diizzyy closed this as completed Oct 30, 2024
@fangfufu
Copy link
Owner

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

@fangfufu
Copy link
Owner

@diizzyy , would you be interested in writing up how to compile it under FreeBSD, and add it to the README?

@diizzyy
Copy link
Author

diizzyy commented Oct 31, 2024

@fangfufu
It's submitted to be committed to the ports tree,
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282451

@fangfufu
Copy link
Owner

fangfufu commented Nov 1, 2024

@diizzyy
Thanks for submitting the changes to port tree. I removed the instruction for how to compile and install from the source from the README. I am just wondering if you would like to help out by adding it back.

@fangfufu fangfufu added invalid Invalid issues bug Something isn't working and removed bug Something isn't working invalid Invalid issues labels Nov 1, 2024
@diizzyy
Copy link
Author

diizzyy commented Nov 2, 2024

Hi,

pkg install curl meson fusefs-libs3 gumbo e2fsprogs-libuuid expat pkgconf (binary packages)
or simply
cd sysutils/fusefs-httpdirfs && make depends (compile deps from source, requires that the ports tree is installed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants