diff options
author | Christoph Junghans <christoph.junghans@gmail.com> | 2018-06-29 13:41:52 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-06-29 14:41:52 -0500 |
commit | ec46c7c4a6d9e8660abe06bcff6e9fc3c624f1af (patch) | |
tree | d962b2876e88563aca4242cf5b908a68cd415fa2 /var | |
parent | b1d7fd886a8e2a141e04bce3a2e14a42b0cb4310 (diff) | |
download | spack-ec46c7c4a6d9e8660abe06bcff6e9fc3c624f1af.tar.gz spack-ec46c7c4a6d9e8660abe06bcff6e9fc3c624f1af.tar.bz2 spack-ec46c7c4a6d9e8660abe06bcff6e9fc3c624f1af.tar.xz spack-ec46c7c4a6d9e8660abe06bcff6e9fc3c624f1af.zip |
numactl: fix build with glibc-2.26 (#8615)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/numactl/numactl-2.0.11-sysmacros.patch | 41 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/numactl/package.py | 2 |
2 files changed, 43 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/numactl/numactl-2.0.11-sysmacros.patch b/var/spack/repos/builtin/packages/numactl/numactl-2.0.11-sysmacros.patch new file mode 100644 index 0000000000..3f95367573 --- /dev/null +++ b/var/spack/repos/builtin/packages/numactl/numactl-2.0.11-sysmacros.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/580098 + +From c1644f92e340d797e490c41a9ef9961125d202b9 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 18 Apr 2016 18:49:51 -0400 +Subject: [PATCH] include sys/sysmacros.h for major/minor + +These functions are not part of any official spec, and glibc has always +kept them in sys/sysmacros.h. As glibc moves to conform to POSIX, and +more alternative C libraries come up, we need to include this header +explicitly to get the prototypes. Otherwise we fail to build like: + +affinity.c: In function 'affinity_file': +affinity.c:177:7: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration] + if (major(d) != maj || minor(d) != min) + ^ +affinity.c:177:26: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration] + if (major(d) != maj || minor(d) != min) + ^ +./.libs/libnuma.so: undefined reference to 'minor' +./.libs/libnuma.so: undefined reference to 'major' +collect2: error: ld returned 1 exit status +--- + affinity.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/affinity.c b/affinity.c +index 9fbd6af..984291c 100644 +--- a/affinity.c ++++ b/affinity.c +@@ -40,6 +40,7 @@ + #include <linux/rtnetlink.h> + #include <linux/netlink.h> + #include <sys/types.h> ++#include <sys/sysmacros.h> + #include <ctype.h> + #include <assert.h> + #include <regex.h> +-- +2.7.4 + diff --git a/var/spack/repos/builtin/packages/numactl/package.py b/var/spack/repos/builtin/packages/numactl/package.py index fa962cc021..18123ec27e 100644 --- a/var/spack/repos/builtin/packages/numactl/package.py +++ b/var/spack/repos/builtin/packages/numactl/package.py @@ -33,6 +33,8 @@ class Numactl(AutotoolsPackage): version('2.0.11', 'b56d2367217cde390b4d8087e00773b8') + patch('numactl-2.0.11-sysmacros.patch', when="@2.0.11") + depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') |