I have prepared a patch based on Uwe Kleine-König's proposal that fixes the arm build.
thanks diff -Nru numactl-2.0.11/debian/changelog numactl-2.0.11/debian/changelog --- numactl-2.0.11/debian/changelog 2016-12-21 18:27:02.000000000 +0000 +++ numactl-2.0.11/debian/changelog 2017-08-17 22:16:39.000000000 +0000 @@ -1,3 +1,13 @@ +numactl (2.0.11-2.2) UNRELEASED; urgency=medium + + * syscall.c: + - add __arm__ to avoid failure due to missing syscalls. + - return -1 and set errno to ENOSYS on migrate_pages function + if __NR_migrate_pages is undefined, thanks Uwe Kleine-König + for the initial patch. Closes: #796802. LP: #1711478. + + -- Tiago Stürmer Daitx <tiago.da...@ubuntu.com> Thu, 17 Aug 2017 22:16:39 +0000 + numactl (2.0.11-2.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru numactl-2.0.11/debian/patches/fix-arm-nr-missing-pages.patch numactl-2.0.11/debian/patches/fix-arm-nr-missing-pages.patch --- numactl-2.0.11/debian/patches/fix-arm-nr-missing-pages.patch 1970-01-01 00:00:00.000000000 +0000 +++ numactl-2.0.11/debian/patches/fix-arm-nr-missing-pages.patch 2017-08-17 22:16:39.000000000 +0000 @@ -0,0 +1,43 @@ +Description: allow __arm__ to pass syscall check even without migrate_pages + numactl build fails on arm because arm does not define __NR_migrate_pages. + In order to build it on arm the arch must be added to the syscalls check + and the migrate_pages must return with -1 and set errno to ENOSYS. + . + This patch is based on Uwe Kleine-König's suggestion at + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796802#15 +Author: Tiago Stürmer Daitx <tiago.da...@ubuntu.com> +Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796802#15 +Bug-Debian: https://bugs.debian.org/796802 +Bug-Ubuntu: https://launchpad.net/bugs/1711478 +Last-Update: 2017-08-17 + +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +--- a/syscall.c ++++ b/syscall.c +@@ -109,6 +109,10 @@ + + #define __NR_migrate_pages 272 + ++#elif defined(__arm__) ++// arm does not define __NR_migrate_pages ++// ignore that and continue (Debian #796802) ++ + #elif !defined(DEPS_RUN) + #error "Add syscalls for your architecture or update kernel headers" + #endif +@@ -206,7 +210,13 @@ long WEAK set_mempolicy(int mode, const + long WEAK migrate_pages(int pid, unsigned long maxnode, + const unsigned long *frommask, const unsigned long *tomask) + { ++#if defined(__NR_migrate_pages) + return syscall(__NR_migrate_pages, pid, maxnode, frommask, tomask); ++#else ++ // See Debian #796802 ++ errno = ENOSYS; ++ return -1; ++#endif + } + + long WEAK move_pages(int pid, unsigned long count, diff -Nru numactl-2.0.11/debian/patches/series numactl-2.0.11/debian/patches/series --- numactl-2.0.11/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ numactl-2.0.11/debian/patches/series 2017-08-17 22:16:39.000000000 +0000 @@ -0,0 +1 @@ +fix-arm-nr-missing-pages.patch
numactl_2.0.11-2.1_2.0.11-2.2.debdif
Description: Binary data