On recent 12-CURRENT (FreeBSD 12.0-ALPHA3 #450 r338290: Fri Aug 24 07:37:10 CEST 2018 amd64; ports tree at Revision: 477934), compilation of port sysutils/smartmontools fail with the error shown below: [...] 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 In file included from os_freebsd.cpp:45: ./atacmds.h:96:9: warning: 'ATA_WRITE_LOG_EXT' macro redefined [-Wmacro-redefined] #define ATA_WRITE_LOG_EXT 0x3F ^ /usr/include/sys/ata.h:387:9: note: previous definition is here #define ATA_WRITE_LOG_EXT 0x3f ^ os_freebsd.cpp:527:10: error: no member named 'opc_fuse' in 'nvme_command' pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode); ~~~~~~ ^ /bin/sh ./config.status --file=smartd_warning.sh os_freebsd.cpp:527:21: error: use of undeclared identifier 'NVME_CMD_SET_OPC' pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode);
(In reply to O. Hartmann from comment #0) It builds fine in not so recent 12-CURRENT r332309. Responsible commit is most likely r338182 (https://svnweb.freebsd.org/base/head/sys/dev/nvme/nvme.h?r1=334200&r2=338182)
Created attachment 196536 [details] Fix for current Trying to fix the build in 12-CURRENT.
Would you try this patch? I don't have a 12-CURRENT as updated as yours, but this builds in {10.4,11.2}{amd64,i386} and 12i386@332309 The most recent CURRENT has (again) opc and fuse as two separate fields so it should build.
(In reply to Fernando ApesteguÃa from comment #3) The patch of yours builds the port on FreeBSD 12.0-ALPHA3 #458 r338317: Sat Aug 25 18:58:28 CEST 2018 amd64. Thank you very much. oh
Confirming patch does work with 12.0-ALPHA3 FreeBSD 12.0-ALPHA3 #0 r338331
Thanks for the feedback. I'll commit it ASAP
Patch works for me too (12.0-ALPHA3 r338342). Thanks you!
A commit references this bug: Author: fernape Date: Fri Sep 7 15:45:15 UTC 2018 New revision: 479196 URL: https://svnweb.freebsd.org/changeset/ports/479196 Log: sysutils/smartmontools: unbreak in 12-CURRENT Between __FreeBSD_version 1200058 and 1200081 fields opc and fuse of struct nvme_command (sys/dev/nvme/nvme.h) where merged under opc_fuse, but in r338182 this change was undone and this port broke. Update patch to fix it so it works regardless of the revision we check out. PR: 230867 Submitted by: ohartmann@walstatt.org Approved by: tcberner (mentor), maintainer (timeout, 2 weeks) Differential Revision: https://reviews.freebsd.org/D16908 Changes: head/sysutils/smartmontools/files/patch-os__freebsd.cpp
Committed, Thanks for reporting and testing.