control: tag -1 + upstream
control: tag -1 + patch

Hi

On 2021-09-07 16:45, Helmut Grohne wrote:
> Source: slurm
> Version: 0.4.3-2
> Severity: serious
> Tags: ftbfs
> X-Debbugs-Cc: debian-gl...@lists.debian.org
> 
> slurm fails to build from source with glibc 2.32, because sys/sysctl.h
> was removed. A build ends with:
> 
> | [ 50%] Building C object CMakeFiles/slurm.dir/slurm.c.o
> | /usr/bin/cc -D_HAVE_NCURSES  -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -o CMakeFiles/slurm.dir/slurm.c.o -c 
> /<<PKGBUILDDIR>>/slurm.c
> | In file included from /<<PKGBUILDDIR>>/slurm.c:37:
> | /<<PKGBUILDDIR>>/os.h:180:10: fatal error: sys/sysctl.h: No such file or 
> directory
> |   180 | #include <sys/sysctl.h>
> |       |          ^~~~~~~~~~~~~~
> | compilation terminated.
> | make[3]: *** [CMakeFiles/slurm.dir/build.make:85: 
> CMakeFiles/slurm.dir/slurm.c.o] Error 1
> | make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | make[2]: *** [CMakeFiles/Makefile2:98: CMakeFiles/slurm.dir/all] Error 2
> | make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | make[1]: *** [Makefile:152: all] Error 2
> | make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j1 VERBOSE=1 
> returned exit code 2
> | make: *** [debian/rules:3: build] Error 25
> | dpkg-buildpackage: error: debian/rules build subprocess returned exit 
> status 2
> 

Please find attached a patch to fix that. This upstream PR might also be
relevant here: https://github.com/mattthias/slurm/pull/39

Regards,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net
--- slurm-0.4.3/debian/patches/0002-Drop-sysctl-h-include
+++ slurm-0.4.3/debian/patches/0002-Drop-sysctl-h-include
@@ -0,0 +1,19 @@
+Description: Drop sysctl.h include
+ The <sys/sysctl.h> include is used to get access to the sysctl function. In
+ practice this function is only used on FreeBSD, NetBSD, OpenBSD and MacOS, but
+ not on Linux. Drop the include as it is not provided anymore by recent glibc
+ versions.
+Author: Aurelien Jarno <aure...@debian.org> 
+Forwarded: no
+Last-Update: 2021-09-07
+
+--- slurm-0.4.3.orig/os.h
++++ slurm-0.4.3/os.h
+@@ -177,7 +177,6 @@
+ #elif defined (__linux__)             /* L I N U X */
+ #include <stdio.h>
+ #include <sys/param.h>
+-#include <sys/sysctl.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <unistd.h>
--- slurm-0.4.3/debian/patches/series
+++ slurm-0.4.3/debian/patches/series
@@ -1 +1,2 @@
 0001-Fix-empty-lines-in-manpage.patch
+0002-Drop-sysctl-h-include

Reply via email to