When updating to the latest smartmontools (6.5_1), I run into this error: c++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONFDIR='"/usr/local/etc"' -DSMARTMONTOOLS_SMARTDSCRIPTDIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontools"' -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -W -c -o smartd.o smartd.cpp /bin/sh ./config.status --file=update-smart-drivedb /bin/sh ./config.status --file=smartd_warning.sh os_freebsd.cpp:552:26: error: variable has incomplete type 'struct nvme_pt_command' struct nvme_pt_command pt; ^ os_freebsd.cpp:552:10: note: forward declaration of 'nvme_pt_command' struct nvme_pt_command pt; ^ os_freebsd.cpp:567:32: error: invalid application of 'sizeof' to an incomplete type 'struct nvme_pt_command' int status = ioctl(get_fd(), NVME_PASSTHROUGH_CMD, &pt); ^~~~~~~~~~~~~~~~~~~~ ./freebsd_nvme_ioctl.h:32:30: note: expanded from macro 'NVME_PASSTHROUGH_CMD' #define NVME_PASSTHROUGH_CMD _IOWR('n', 0, struct nvme_pt_command) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ioccom.h:61:48: note: expanded from macro '_IOWR' #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/include/sys/ioccom.h:55:16: note: expanded from macro '_IOC' ((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | (num))) ^~~ os_freebsd.cpp:552:10: note: forward declaration of 'nvme_pt_command' struct nvme_pt_command pt; ^
(In reply to bkazemi from comment #0) Upon further investigation, it looks like the problem is that there is a CPP conditional in ``freebsd_nvme_ioctl.h'' that removes the definition of struct nvme_pt_command (amongst others) when __FreeBSD_version < 1100110. My version is 1100111.
Is there any progress on this? This is causing pain on the freebsd.org cluster.
I will provide patch in the few next days, apologize for the delay
I discovered an error in our build jail updating process. I *thought* I was running later build jails than I actually was. It appears to build on HEAD, as of r302331 at least. I apologize for the noise.
The freebsd_nvme_ioctl.h should include system wide nvme.h for newer versions of FreeBSD. I can provide patch in couple of minutes. Need ports committer to commit it.
Created attachment 172105 [details] proposed patch We should either include system wide nvme.h, or on older versions local copy.
It looks like with most recent head the smartmontools is again buildable without any patch to the port required.
bkazemi, can you please confirm that problem is fixed with recent FreeBSD 11 so that we can close the bug?
(In reply to Gleb Smirnoff from comment #8) Alright, went from r302243 to r302361 and smartmontools compiled fine.