Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2022 22:26:06 GMT
From:      =?utf-8?Q?Stefan E=C3=9Fer?= <se@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: addda1277abe - main - sysutils/slurm-wlm: fix build on -CURRENT
Message-ID:  <202201022226.202MQ6ZR024853@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by se:

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

commit addda1277abed746f93ad76aecc2a2e9bc97d033
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-01-02 22:02:21 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-01-02 22:25:52 +0000

    sysutils/slurm-wlm: fix build on -CURRENT
    
    The CPU_OR macro has been made compatible with GLIBC on -CURRENT,
    the FreeBSD specific alternative is therefore no longer required.
    
    While here pass --disable-slurmrestd to prevent the auto-configure
    script from attempting to build slurmrestd if glib is found by
    auto-configure (it does not build on FreeBSD due to Linux specific
    headers and shell features provided by Bash but by the /bin/sh in
    FreeBSD).
    
    This port has numerous build issues when not building in a clean
    jail (i.e. on a system with a previous version installed or with
    other software that is detected by auto-configure).
    
    The port revision is not bumped since these changes do not modify
    the package that is generated.
---
 sysutils/slurm-wlm/Makefile                                   |  3 ++-
 .../files/patch-src_plugins_task_affinity_affinity.c          | 11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/sysutils/slurm-wlm/Makefile b/sysutils/slurm-wlm/Makefile
index 517b38320bd3..f3dd6e9c9b11 100644
--- a/sysutils/slurm-wlm/Makefile
+++ b/sysutils/slurm-wlm/Makefile
@@ -77,7 +77,8 @@ RRD_CONFIGURE_WITH=	rrdtool
 # --docdir is non-functional
 # CONFIGURE_ARGS=	--docdir=${DOCSDIR}
 # FreeBSD Infiniband support is still experimental
-CONFIGURE_ARGS=	--without-ofed
+# slurmrestd does not build on FreeBSD
+CONFIGURE_ARGS=	--without-ofed --disable-slurmrestd
 DOCSDIR=	${PREFIX}/share/doc/${PORTNAME}-${DISTVERSION}
 
 CFLAGS+=	-I${WRKSRC}/slurm -I${LOCALBASE}/include -fcommon
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c b/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c
new file mode 100644
index 000000000000..cf09d539002c
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c
@@ -0,0 +1,11 @@
+--- src/plugins/task/affinity/affinity.c.orig	2021-05-12 20:23:20 UTC
++++ src/plugins/task/affinity/affinity.c
+@@ -297,7 +297,7 @@ void reset_cpuset(cpu_set_t *new_mask, cpu_set_t *cur_
+ 	if (slurm_getaffinity(1, sizeof(full_mask), &full_mask)) {
+ 		/* Try to get full CPU mask from process init */
+ 		CPU_ZERO(&full_mask);
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) && !defined(CPU_ALLOC)
+ 		CPU_OR(&full_mask, cur_mask);
+ #else
+ 		CPU_OR(&full_mask, &full_mask, cur_mask);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201022226.202MQ6ZR024853>