Closed diizzyy closed 6 hours 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.
@diizzyy let me know if the fix I made works.
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
Well your system's libfuse seems to be out of date. Do you have fusefs-libs3?
@diizzyy , Have a look at https://github.com/fangfufu/httpdirfs/commit/08700415d7b61d9f611a858481b26858fe92eb7a, let me know if it fixes it.
@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].
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
@diizzyy , could you post the full compilation log please? We need to try and replicate whichever command you used to compile.
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
Cool, I am glad that we got there in the end. :)
Hi,
Latest versions fails to build on FreeBSD, se below for details
Build log:
Best regards, Daniel