Subject: bug#12741: any cross-compile fails due to new make-prime-list

From: Jim Meyering <[email-masked]>
Date: Fri, 26 Oct 2012 17:37:13 +0200

As reported privately by Yegor Yefremov:

    coreutils-8.20 has interesting issue. Have you tried to cross
    compile it for ARM? I get following error:

    GEN    src/primes.h
    /bin/sh: src/make-prime-list: cannot execute binary file
    make[1]: * [src/primes.h] Error 126

    because make-prime-list is also cross compiled. Any idea how to fix this?

Thanks for the bug report.  (forwarding it to the bug-coreutils list)
Yes, that is a problem when cross-compiling to any target.

I would like to generate that table with a portable awk script (maybe
even Perl).  If someone can provide such a script, I would be happy
to dump the C program.  That would solve the problem.

You can work around it by touching the executable, creating the generated
file on another system and copying it to your build directory.