-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mpir-2.6.0.p0 fails to build on Intel "Core" and Pentium4 Prescott CPUs #14172
Comments
Changed keywords from mpir, spkg to mpir spkg ABI 32 |
comment:2
Could you attach What does |
comment:3
Also |
comment:4
For reference, this is the current logic (originally for MPIR 2.4.0): Linux)
# MPIR fails to build on 32-bit operating systems running on
# 64-bit CPUs if CFLAGS happen to contain '-m32' and ABI is
# *not* set, so we set it here if necessary:
# (Cf. http://groups.google.com/group/mpir-devel/browse_thread/thread/46ccdc5dfc3485cd#)
# Note: This code snippet could in principle be moved out of the
# Linux branch, but since we already set ABI for other
# OSs above (and print an according message), it's here.
if [ -z "$ABI" ]; then
echo "int main(){return 0;}" > foo.c
# Try building and running a 64-bit executable:
# (Building usually succeeds even on 32-bit systems, unless e.g. a 32-bit
# CPU is explicitly selected by CFLAGS, while running does not.)
if $CC $CFLAGS $CFLAG64 -o foo foo.c 2>/dev/null && ./foo 2>/dev/null; then
# We can run 64-bit executables.
# Setting ABI=64 shouldn't be necessary, but shouldn't hurt either.
echo "Building a 64-bit version of MPIR."
case "`uname -m`" in
ppc64) ABI=mode64;;
*) ABI=64
esac
elif $CC $CFLAGS $CFLAG32 -o foo foo.c 2>/dev/null && ./foo 2>/dev/null; then
# We're on a 32-bit OS which cannot run 64-bit executables.
echo "Building a 32-bit version of MPIR."
ABI=32
else
# It seems the compiler does not support -m32 nor -m64 (e.g.
# GCC on Itanium rejects both); do not set ABI at all.
echo "Your compiler does not support '$CFLAG32' nor '$CFLAG64'. Leaving ABI unset."
fi
rm -f foo foo.c
fi
;; # Linux If only MPIR (2.6.0) requires
That way (not globally setting We'll see whether we can tweak
(SCNR.) |
comment:6
The problem seems to be an upstream bug in MPIR 2.6.0, specifically on Intel Core (not Core2 or Core i7) processors, or, more precisely, shows up if |
Changed keywords from mpir spkg ABI 32 to mpir spkg ABI standard Intel Core |
comment:7
It doesn't seem to matter whether the OS is 32- or 64-bit, it's just Note that (on |
Upstream: Reported upstream. Developers acknowledge bug. |
comment:8
Replying to @nexttime:
Thierry, could you paste the output of Also, do you happen to have the MPIR build log from Sage 5.6 on the same machine? (It seems the actual bug had been present in MPIR 2.4.0 and probably older releases as well, so we're curious what has changed inbetween -- probably the output of MPIR's |
comment:9
Here are the files.
I will see if i can found a log for the sage 5.6 build somewhere. Note that is is sometimes good to be able to build a 32-bits sage system on a 64-bits machine. For example, i need this when building sage for a live USB key that aims to boot on a widest range of machines. |
comment:10
Replying to @sagetrac-tmonteil:
Thanks.
Sorry, I meant the output of running
If you still have the Sage 5.6 installation (but not the logs in
Yes. Some also prefer 32-bit versions for virtual machines (on 64-bit machines). The safest way to produce (32-bit) binary dists is still to create them natively, on old machines. (E.g., |
This comment has been minimized.
This comment has been minimized.
comment:11
The output of running config.guess is indeed core-pc-linux-gnu (as well as on the mpir-2.4.0.p6.spkg). Now, looking back at the logs of the sage-5.6 build, it seems that i built it on a more recent machine (though the live USB key with 32-bit OS was the same). Sorry for having missing that (i am currently oscillating between two different locations every two weeks). Running ./sage -f -s spkg/standard/mpir-2.4.0.p6.spkg on the older machine does the same bug. |
This comment has been minimized.
This comment has been minimized.
Author: Leif Leonhardy |
comment:13
Thierry, could you give this preliminary spkg a try on your Intel Core machine? Especially without ( And attach the resulting spkg log(s) here... Thanks. P.S.: If you're going to rebuild Sage or other spkgs depending on it with that, you should copy the spkg into |
Replying to @nexttime:
|
comment:15
[Note to myself:] I'll upload a slightly fixed spkg (also patching |
Diff between the |
comment:16
Attachment: mpir-2.6.0.p0-p1.diff.gz Replying to @nexttime:
Done. Note: New spkg also has a new name ( |
Changed upstream from Reported upstream. Developers acknowledge bug. to Completely fixed; Fix reported upstream |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed keywords from mpir spkg ABI standard Intel Core to mpir spkg ABI standard Intel Core Pentium4 Prescott |
This comment has been minimized.
This comment has been minimized.
comment:19
Hi Leif, i am back in Montpellier and the machine is still in Paris. I will try to find a similar machine here or ask someone to bring it back this week-end. |
This comment has been minimized.
This comment has been minimized.
comment:21
Just in case you intend to support / fix the use of (And cc me if you open a ticket for that; I'll otherwise probably do so.) |
Attachment: cpuinfo.gz Attachment: 2.6.0.p0_config.log |
Attachment: 2.6.0.p0_mpir-2.6.0.p0.log Attachment: 2.6.0.p0-ABI32_config.log |
Attachment: 2.6.0.p0-ABI32_mpir-2.6.0.p0.log |
Attachment: 2.6.0.p1_config.log Attachment: 2.6.0.p1_mpir-2.6.0.p1.log |
Attachment: 2.6.0.p1-ABI32_config.log |
Attachment: 2.6.0.p1-ABI32_mpir-2.6.0.p1.log |
Attachment: 2.6.0.p1-FAT_config.log Attachment: 2.6.0.p1-FAT_mpir-2.6.0.p1.log |
Attachment: 2.6.0.p1-FAT-ABI32_config.log |
Attachment: 2.6.0.p1-FAT-ABI32_mpir-2.6.0.p1.log Attachment: config.guess.gz |
comment:22
Hi Leif, i found a Core Duo at the lab, and did the tests you asked on the same 32-bit OS, and all possibilities lead to a build without error with mpir-2.6.0.p1.spkg. FAT means that i exported SAGE_FAT_BINARY='yes', ABI32 means i exported ABI='32'. I also tried exporting SAGE_CHECK='yes' (with no other options exported) and the tests went fine. |
comment:23
Replying to @sagetrac-tmonteil:
So do we have a positive review? |
Reviewer: Thierry Monteil, ... |
comment:24
All tests passed on Core Duo, so it is OK for me. It could be nice to have it tested on some prescott cpu as well. Also, i let someone who is used in maintaining this spkg to check whether the patch is ok on the code side and give a positive review. |
comment:25
Replying to @sagetrac-tmonteil:
Ping... (Yesterday again someone reported running into this on sage-release.) |
comment:26
Looks fine and build on a my (non problematic) system. Just a little remark, I think you should tag the commit yourself as this is automatically done by Jeroen's scripts, though I think they are smart enough to realize you did it, so no worry. |
Changed reviewer from Thierry Monteil, ... to Thierry Monteil, Jean-Pierre Flori |
comment:27
Thanks for the review. Replying to @jpflori:
I prefer tagging the changesets myself (and I'd appreciate if others did as well -- some do); doing so makes it easier to base spkgs on previous ones which haven't been merged yet (otherwise tags may even be missing). The merger script shouldn't do anything with spkgs unless necessary, i.e., it should only perform sanity checks, and in case some of these fail, automagically modify the spkg if appropriate (which includes adding a missing revision tag). |
Merged: sage-5.9.beta2 |
Changed keywords from mpir spkg ABI standard Intel Core Pentium4 Prescott to mpir, spkg, ABI, standard, Intel, Core, Pentium4, Prescott, sdl |
The build of sage 5.7 stops during the build of the mpir-2.6.0.p0 package.
spkg/logs/mpir-2.6.0.p0.log is pasted at http://paste.debian.net/237529/
The problem seems related to some 32-bit architecture:
The machine is running Debian wheezy, Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.35-2 i686 GNU/Linux
I used the following sage variables :
Exporting ABI='standard' globally (see http://ask.sagemath.org/question/1713/error-installing-package-mpir-240p6) allows the mpir spkg to be built but then gap-4.5.7.p3 cannot be built since it also uses the ABI variable for which the value 'standard' does not make sense (it only accepts ABI=32 or ABI=64).
Just for completeness: The previous spkg (and of course also vanilla MPIR 2.6.0) failed in exactly the same way when configured on (or with [
MPIR_CONFIGURE=
]--host=
)prescott-pc-linux-gnu
:The new spkg also fixes this.
New spkg: http://boxen.math.washington.edu/home/leif/Sage/spkgs/mpir-2.6.0.p1.spkg
md5sum:
6e65bb989b0e5513371a35447b43b0da mpir-2.6.0.p1.spkg
Now patches
acinclude.m4
,configure.in
, andconfigure
.(Changes now committed, and bug report and patches submitted upstream, too.)
mpir-2.6.0.p1 (Leif Leonhardy, February 27th 2013)
"Core" CPUs (expecting ABI to be "standard" rather than "32", which is
just one symptom). (Similar for Pentium4 Prescott.)
Add patch (
core-prescott-configure.patch
) fixingacinclude.m4
,configure.in
, and the generatedconfigure
, rebased to the patches weapply in advance.
Patch(es) have been submitted upstream.
Upstream: Completely fixed; Fix reported upstream
CC: @nexttime @jpflori @jhpalmieri @kcrisman
Component: build
Keywords: mpir, spkg, ABI, standard, Intel, Core, Pentium4, Prescott, sdl
Author: Leif Leonhardy
Reviewer: Thierry Monteil, Jean-Pierre Flori
Merged: sage-5.9.beta2
Issue created by migration from https://trac.sagemath.org/ticket/14172
The text was updated successfully, but these errors were encountered: