I'm trying to rebuild sysutils/testdisk after the bump needed after the recent jpeg-turbo upgrade. $ uname -a FreeBSD bsg75.local.net 13.2-STABLE FreeBSD 13.2-STABLE 254cdd5b2 BSG75 amd64 $ make showconfig -C /usr/ports/sysutils/testdisk/ ===> The following configuration options are available for testdisk-7.1_1: DOCS=on: Build and/or install documentation ICONV=on: Encoding conversion support via iconv NTFS=on: Support NTFS via fuse-ntfs extensions PROGSREISERFS=off: Use reiserfs extensions ===> Use 'make config' to modify these settings $ pkg info -iox testdisk fusefs-ntfs testdisk-7.1 sysutils/testdisk fusefs-ntfs-2022.10.3 sysutils/fusefs-ntfs The error: cc -DHAVE_CONFIG_H -I. -I.. -DLIBICONV_PLUG -isystem /usr/local/include -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wdeclaration-after-statement -Wall -Wextra -MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -Wdisabled-optimization -Wfloat-equal -Wmissing-format-attribute -Wmultichar -Wc++-compat -Wformat=2 -Wunreachable-code -Wvla -fstack-protector-strong -MT ntfs_io.o -MD -MP -MF .deps/ntfs_io.Tpo -c -o ntfs_io.o ntfs_io.c In file included from ntfs_io.c:56: ./common.h:37:19: warning: unknown attribute 'gcc_struct' ignored [-Wunknown-attributes] } __attribute__ ((gcc_struct, __packed__)); ^~~~~~~~~~ ntfs_io.c:148:61: warning: unused parameter 'dev' [-Wunused-parameter] static int ntfs_device_testdisk_io_stat(struct ntfs_device *dev, struct stat *buf) ^ ntfs_io.c:148:79: warning: unused parameter 'buf' [-Wunused-parameter] static int ntfs_device_testdisk_io_stat(struct ntfs_device *dev, struct stat *buf) ^ ntfs_io.c:157:62: warning: unused parameter 'dev' [-Wunused-parameter] static int ntfs_device_testdisk_io_ioctl(struct ntfs_device *dev, int request, ^ ntfs_io.c:157:71: warning: unused parameter 'request' [-Wunused-parameter] static int ntfs_device_testdisk_io_ioctl(struct ntfs_device *dev, int request, ^ ntfs_io.c:158:9: warning: unused parameter 'argp' [-Wunused-parameter] void *argp) ^ ntfs_io.c:180:12: error: incompatible function pointer types initializing 'int (*)(struct ntfs_device *, unsigned long, void *)' with an expression of type 'int (*)(struct ntfs_device *, int, void *)' [-Wincompatible-function-pointer-types] .ioctl = &ntfs_device_testdisk_io_ioctl, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 warnings and 1 error generated. *** Error code 1 Stop. make[4]: stopped in /usr/ports/sysutils/testdisk/work/testdisk-7.1/src *** Error code 1
The problem was hard to reproduce for me as it only occurs if it is built with the NTFS option. I have developed a patch which I am going to deploy with my next batch of commits.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=f5fac239219bdd6b380b7bad35be559d29871ef1 commit f5fac239219bdd6b380b7bad35be559d29871ef1 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-08-08 15:16:01 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-08-09 13:01:36 +0000 sysutils/testdisk: fix build with NTFS option A benign type mismatch in a function pointer only used when compiled with the NTFS option was disagreeable to LLVM 16. Patch things over by correcting the signature. Reported by: Ale <discipline@tiscali.it> PR: 272982 MFH: 2023Q3 sysutils/testdisk/files/patch-src_ntfs__io.c (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)
A commit in branch 2023Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=467c791a968881220f827fe4703e362506d26078 commit 467c791a968881220f827fe4703e362506d26078 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-08-08 15:16:01 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-08-09 13:07:21 +0000 sysutils/testdisk: fix build with NTFS option A benign type mismatch in a function pointer only used when compiled with the NTFS option was disagreeable to LLVM 16. Patch things over by correcting the signature. Reported by: Ale <discipline@tiscali.it> PR: 272982 MFH: 2023Q3 (cherry picked from commit f5fac239219bdd6b380b7bad35be559d29871ef1) sysutils/testdisk/files/patch-src_ntfs__io.c (new) | 11 +++++++++++ 1 file changed, 11 insertions(+)
Thank you for your report.