GNU bug report logs - #12741
build: cross-compiling: any cross-compile fails due to new

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Fri, 26 Oct 2012 15:40:02 UTC

Severity: normal

Tags: fixed

Merged with 78377

Done: Assaf Gordon <assafgordon <at> gmail.com>

To reply to this bug, email your comments to 12741 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#12741; Package coreutils. (Fri, 26 Oct 2012 15:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Meyering <jim <at> meyering.net>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 26 Oct 2012 15:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: bug-coreutils <at> gnu.org
Cc: yegorslists <at> googlemail.com
Subject: any cross-compile fails due to new make-prime-list
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.




Information forwarded to bug-coreutils <at> gnu.org:
bug#12741; Package coreutils. (Fri, 26 Oct 2012 17:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 12741 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>
Cc: 12741 <at> debbugs.gnu.org, yegorslists <at> googlemail.com
Subject: Re: bug#12741: any cross-compile fails due to new make-prime-list
Date: Fri, 26 Oct 2012 10:07:18 -0700
On 10/26/2012 08:37 AM, Jim Meyering wrote:
> 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.

It'd be a pain to do it in portable awk, as it requires
arithmetic modulo (UINTMAX_MAX + 1), which Awk is not
likely to support directly.

Since there are only two or three plausible values of UINTMAX_MAX
these days, one possibility is to precompute primes.h for these
two or three values, and ship the precomputed primes.h in the
tarball, and to use the precomputed primes.h on hosts with typical
UINTMAX_MAX values.  People who are on a weird platform where
UINTMAX_MAX is an unusual value wouldn't be able to cross-compile,
but that's unlikely to ever happen and even if it does, we simply
add the unusual case to the precomputed primes.h.




Information forwarded to bug-coreutils <at> gnu.org:
bug#12741; Package coreutils. (Fri, 26 Oct 2012 17:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 12741 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 12741 <at> debbugs.gnu.org, yegorslists <at> googlemail.com
Subject: Re: bug#12741: any cross-compile fails due to new make-prime-list
Date: Fri, 26 Oct 2012 19:27:42 +0200
Paul Eggert wrote:
> On 10/26/2012 08:37 AM, Jim Meyering wrote:
>> 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.
>
> It'd be a pain to do it in portable awk, as it requires
> arithmetic modulo (UINTMAX_MAX + 1), which Awk is not
> likely to support directly.
>
> Since there are only two or three plausible values of UINTMAX_MAX
> these days, one possibility is to precompute primes.h for these
> two or three values, and ship the precomputed primes.h in the
> tarball, and to use the precomputed primes.h on hosts with typical
> UINTMAX_MAX values.  People who are on a weird platform where
> UINTMAX_MAX is an unusual value wouldn't be able to cross-compile,
> but that's unlikely to ever happen and even if it does, we simply
> add the unusual case to the precomputed primes.h.

That would be fine with me.
We were precomputing the "wheel.h" table of primes before, too.

If we go the route of distributing the generated file,
then we might as well resort to using Perl and say, -Mbigint,
to do generate all variants.




Changed bug title to 'build: cross-compiling: any cross-compile fails due to new' from 'any cross-compile fails due to new make-prime-list' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 15 Oct 2018 17:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#12741; Package coreutils. (Tue, 06 Nov 2018 18:11:02 GMT) Full text and rfc822 format available.

Message #16 received at 12741 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 12741 <at> debbugs.gnu.org
Subject: Re: bug#12741: any cross-compile fails due to new make-prime-list
Date: Tue, 6 Nov 2018 11:10:17 -0700
tags 12741 fixed
close 12741
stop

(triaging old bugs)

On 2012-10-26 11:27 a.m., Jim Meyering wrote:
> That would be fine with me.
> We were precomputing the "wheel.h" table of primes before, too.
> 
> If we go the route of distributing the generated file,
> then we might as well resort to using Perl and say, -Mbigint,
> to do generate all variants.

Starting with version 8.21, "prime.h" is pre-built and distributed.

Committed here:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=f16e251dae43117c2cd19359c26ce7b5e05165b6

As such, closing this bug.

-assaf




Added tag(s) fixed. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 06 Nov 2018 18:11:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 12741 <at> debbugs.gnu.org and Jim Meyering <jim <at> meyering.net> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 06 Nov 2018 18:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Dec 2018 12:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Sat, 17 May 2025 07:52:02 GMT) Full text and rfc822 format available.

Forcibly Merged 12741 78377. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Sat, 17 May 2025 07:52:02 GMT) Full text and rfc822 format available.

This bug report was last modified 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.