Page MenuHomeFreeBSD

sysutils/smartmontools: unbreak in recent 12-CURRENT
ClosedPublic

Authored by fernape on Aug 26 2018, 3:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 3:17 AM
Unknown Object (File)
Sun, Nov 24, 12:36 AM
Unknown Object (File)
Fri, Nov 22, 5:52 PM
Unknown Object (File)
Fri, Nov 22, 11:43 AM
Unknown Object (File)
Fri, Nov 22, 9:23 AM
Unknown Object (File)
Wed, Nov 20, 1:58 AM
Unknown Object (File)
Fri, Nov 8, 2:54 PM
Unknown Object (File)
Fri, Nov 8, 2:54 PM
Subscribers

Details

Summary

Reported via PR 230867

Broken in 12-CURRENT after r338182

Test Plan
  • portlint -AC OK
  • poudriere builds for {10.4,11.1}{amd64,i386}, 11.2amd64, 12i386 OK
  • Reporter confirms the port builds with the patch in 12-CURRENT@r338317

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fails to build for me (r337738):

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:526:10: error: no member named 'opc' in 'nvme_command'
  pt.cmd.opc = in.opcode;
  ~~~~~~ ^
1 warning and 1 error generated.

Fails to build for me (r337738):

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:526:10: error: no member named 'opc' in 'nvme_command'
  pt.cmd.opc = in.opcode;
  ~~~~~~ ^
1 warning and 1 error generated.

You are in r337738 Last change in nvme.h is in r338182 and in that revision, opc and fuse are independent fields: https://svnweb.freebsd.org/base/head/sys/dev/nvme/nvme.h?r1=334200&r2=338182.

The fact that the port builds fine in 10 and 11 implies that there was a temporary change to merge opc and fuse in opc_fuse field, the port was patched with the code:

+#if __FreeBSD_version >= 1200058
+  pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode);
+#else

and now in r338182 that field merge has been reverted.

So it seems you are in the middle revisions in -CURRENT where the port was patched to match a base src code that is no longer there. In such a case, I would ask the user to update to a more recent -CURRENT revision.

Fix the port for the whole life cycle of 12-CURRENT.

Maybe this solution is better, although at some point in the future (maybe when
12.0-RELEASE is out?) it would be good to delete that conditional completely

Works for me :)

I would point to the commits in src that made this necessary.

This revision is now accepted and ready to land.Sep 6 2018, 7:57 PM
This revision was automatically updated to reflect the committed changes.