On Mon, Aug 24, 2015 at 12:28:19PM -0400, Lennart Sorensen wrote:
> Source: numactl
> Version: 2.0.10-1
> Severity: important
> 
> The fix to the failure to build on some architectures in bug 762449
> was lost in 2.0.10-1 where the list of architectures to build on went
> back to any, so now anyone trying to build the package will get build
> failures on armhf and a number of others where the pacakge doesn't work.
> 
> Could the fix please be put back in since this is making doing a custom
> rebuild of jessie rather annoying and clearly bug 762449 is in fact no
> longer fixed.
The problem is that only 2 of 3 Architecture lines contain the list of
supported architectures, there is still an arch-any line.

The nicer fix would be to make libnuma provide stubs when the respective
syscalls are not there.

BTW, on arm the culprit is:

        http://git.kernel.org/linus/d80ade7b323152672bf66e74ec11c324332f6d1e

So something like:

diff --git a/syscall.c b/syscall.c
index 4589b8547697..2d3a468f1ac1 100644
--- a/syscall.c
+++ b/syscall.c
@@ -206,7 +206,12 @@ long WEAK set_mempolicy(int mode, const unsigned long 
*nmask,
 long WEAK migrate_pages(int pid, unsigned long maxnode,
        const unsigned long *frommask, const unsigned long *tomask)
 {
+#ifdef __NR_migrate_pages
        return syscall(__NR_migrate_pages, pid, maxnode, frommask, tomask);
+#else
+       errno = ENOSYS;
+       return -1
+#endif
 }
 
 long WEAK move_pages(int pid, unsigned long count,

should fix the build failure.

I guess upstream doesn't care about non-linux architectures. To support
them probably the easiest would be to make syscall a stub setting errno
to ENOSYS and returning -1.

Best regards
Uwe

Reply via email to