Bug 270776 - buildworld fails WITH_OFED_EXTRA
Summary: buildworld fails WITH_OFED_EXTRA
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-11 23:49 UTC by Mina Galić
Modified: 2023-05-01 11:50 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mina Galić freebsd_triage 2023-04-11 23:49:47 UTC
```
/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.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2023-04-12 12:57:24 UTC
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.
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2023-04-12 13:25:16 UTC
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!
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2023-04-12 14:35:23 UTC
Just do a grep. Make a patch and I'll review and test it and that's it this time.

--HPS
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-05-01 11:50:15 UTC
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(-)