``` /usr/src/contrib/ofed/opensm/opensm/osm_console.c:1655:55: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time] fprintf(out, "%s build %s %s\n", p_osm->osm_version, __DATE__, __TIME__); ^ /usr/src/contrib/ofed/opensm/opensm/osm_console.c:1655:65: error: expansion of date or time macro is not reproducible [-Werror,-Wdate-time] fprintf(out, "%s build %s %s\n", p_osm->osm_version, __DATE__, __TIME__); ^ 2 errors generated. *** [osm_console.o] Error code 1 make[5]: stopped in /usr/src/usr.bin/ofed/opensm ``` we could either disable this warning for this part of the build, or remove the __DATE__ & __TIME__ macros. Upstream hasn't stumbled across this yet either: https://github.com/linux-rdma/opensm/blob/master/opensm/osm_console.c so if we decide to drop __DATE__ & __TIME__ we should push it upstream.
We should remove the __DATE__ and __TIME__, ideally upstream but otherwise as a local patch. If we just disable the warning it will probably conflict with the switch pkgbase for security updates.
Yes, the upstreaming thing is good, but currently we are somewhat apart from upstream. I think in many of those libraries we already have bunches of patches for FreeBSD, which are only there, and any upstream process needs to involve tools like meld!
Just do a grep. Make a patch and I'll review and test it and that's it this time. --HPS
upstream, https://github.com/linux-rdma/opensm/pull/33 freebsd: https://github.com/freebsd/freebsd-src/pull/715
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d502d3fc72f123f104cba3d1ad9135a7ef7cf78b commit d502d3fc72f123f104cba3d1ad9135a7ef7cf78b Author: Mina Galić <freebsd@igalic.co> AuthorDate: 2023-05-01 09:13:30 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2023-05-01 11:46:24 +0000 opensm: Fix build with -Werror and -Wdate-time. This fixes builds WITH_OFED_EXTRA=YES . PR: 270776 Pull Request: https://github.com/freebsd/freebsd-src/pull/715 MFC after: 1 week Sponsored by: NVIDIA Networking contrib/ofed/opensm/opensm/osm_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)