Bug 278686

Summary: net-mgmt/collectd5: Fails to build with SLURM option ON
Product: Ports & Packages Reporter: Nuno Teixeira <eduardo>
Component: Individual Port(s)Assignee: Nuno Teixeira <eduardo>
Status: Closed FIXED    
Severity: Affects Only Me CC: ports
Priority: --- Flags: ports: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
update patch
ports: maintainer-approval+
poudriere testport log
none
update patch ports: maintainer-approval+

Description Nuno Teixeira freebsd_committer freebsd_triage 2024-05-01 17:32:00 UTC
Hello,

SLURM option fails with slurm-wlm-23.11.1_2 (actual version on tree).

I did found this as I'm doing an exp-run on sysutils/slurm-wlm update to latest version 23.11.6 that shows same error.

With this I will carry on with update.

Thanks

---
src/slurm.c:187:29: error: use of undeclared identifier 'NODE_STATE_REBOOT'; did you mean 'NODE_STATE_ERROR'?
  bool reboot_flag = (inx & NODE_STATE_REBOOT);
                            ^~~~~~~~~~~~~~~~~
                            NODE_STATE_ERROR
/usr/local/include/slurm/slurm.h:946:2: note: 'NODE_STATE_ERROR' declared here
        NODE_STATE_ERROR,       /* UNUSED - node is in an error state */
        ^
src/slurm.c:191:33: error: use of undeclared identifier 'NODE_STATE_POWER_SAVE'
  bool power_down_flag = (inx & NODE_STATE_POWER_SAVE);
                                ^
src/slurm.c:251:14: error: use of undeclared identifier 'NODE_STATE_CANCEL_REBOOT'
  if (inx == NODE_STATE_CANCEL_REBOOT)
             ^
src/slurm.c:253:14: error: use of undeclared identifier 'NODE_STATE_POWER_SAVE'
  if (inx == NODE_STATE_POWER_SAVE)
             ^
4 errors generated.
---
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2024-05-01 19:26:30 UTC
sysutils/slurm-wlm: Update to 23.11.6

https://cgit.freebsd.org/ports/commit/?id=8b690b7d2ac6d17be6a61f7ba5ace0b21d76c124
Comment 2 Krzysztof 2024-06-11 17:36:27 UTC
Created attachment 251400 [details]
update patch

Update patch - when SLURM is on port is broken. By the way: change python dependency to python311
Comment 3 Krzysztof 2024-06-11 17:37:08 UTC
Created attachment 251401 [details]
poudriere testport log

poudriere testport log with SLURM set to off
Comment 4 Krzysztof 2024-06-11 17:39:26 UTC
So I've made a patch which updates the port to disable slurm. I've found on github  - https://github.com/collectd/collectd/issues/3959 that new version of slurm causes problems for collectd. As you can see this patch is "blocked" as untested

I hope my patch will be applied soon :-)
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2024-06-12 06:59:52 UTC
(In reply to Krzysztof from comment #2)

Hello!

I'm working on commit msg but I'm confused with:

> Update patch - when SLURM is on port is broken. By the way: change python
> dependency to python311

For what patch tells me is that:

- Put broken on SLURM option
- Update varninsh dependency

Don't get what change to python dep was done here.

Thanks
Comment 6 Krzysztof 2024-06-12 07:31:08 UTC
Created attachment 251406 [details]
update patch

Ah, yeah I've forgot about varnish :-)

Python311 changed location of cpython.h So there should be one more patch file...

OK. New version of patch is attached. With additional patch-file for cpython
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-06-12 11:35:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a0b8a9fe86c4c4b065f0327c08f30db48c078ba

commit 0a0b8a9fe86c4c4b065f0327c08f30db48c078ba
Author:     Krzysztof <ports@bsdserwis.com>
AuthorDate: 2024-06-12 11:28:55 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-06-12 11:28:55 +0000

    net-mgmt/collectd5: Fix build with python 3.11

    While here:

    - Put SLURM option as broken, doesn't compile with slurm-wlm >= 21.x
      See also: https://github.com/collectd/collectd/issues/3959
    - Update VARNISH lib depends: www/varnish6 -> www/varnish7

    PR:             278686

 net-mgmt/collectd5/Makefile                        |  7 ++++---
 net-mgmt/collectd5/files/patch-src__pf.c           | 11 +++++------
 net-mgmt/collectd5/files/patch-src_cpython.h (new) | 11 +++++++++++
 3 files changed, 20 insertions(+), 9 deletions(-)
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2024-06-12 11:47:51 UTC
Committed, thanks!