#11705: Port Sage to SUSE Linux Power 7 (ppc64).
-------------------------------+--------------------------------------------
       Reporter:  was          |         Owner:  drkirkby
           Type:  enhancement  |        Status:  new     
       Priority:  major        |     Milestone:  sage-5.0
      Component:  porting      |    Resolution:          
       Keywords:  sd32 sd35.5  |   Work issues:          
Report Upstream:  N/A          |     Reviewers:          
        Authors:               |     Merged in:          
   Dependencies:               |      Stopgaps:          
-------------------------------+--------------------------------------------

Comment (by leif):

 Replying to [comment:60 zimmerma]:
 > I did compare your config.log of MPFR 3.1.0.p0 configured with MPIR
 2.4.0 with the
 > one for a vanilla MPFR-3.1.0 configured with GMP 5.0.4:
 >
 > (1) it seems your config.log does not extract CC and CFLAGS from gmp.h

 It does, but MPIR takes (also) the flags I specified and hence writes
 these to `gmp.h`:

 {{{
 #!sh
 leif@silius:~/.../sage-5.0.beta9-gcc-4.6.3> egrep
 "__(GMP|MPIR)_(CC|CFLAGS)" local/include/gmp.h
 #define __GMP_CC __MPIR_CC
 #define __GMP_CFLAGS __MPIR_CFLAGS
 #define __MPIR_CC "gcc -std=gnu99"
 #define __MPIR_CFLAGS " -g -O3 -mcpu=power7 -mtune=power7 -O3 -g -fno-
 strict-aliasing "
 }}}
 (This is the `gmp.h` created by MPIR 2.'''4.0'''.p1.  I know the one from
 MPIR 2.1.3 does look different: First of all, `__GMP_CC` and
 `__GMP_CFLAGS` are defined to strings as well, instead of referring to
 their respective MPIR macros, and -- which is a known bug -- `__GMP_CC`
 doesn't contain `-std=gnu99`, although `__MPIR_CC` does.)


 > (2) mine uses gcc -std=gnu99 instead of gcc alone

 This shouldn't matter; I could retry building MPIR and MPFR with `CC="gcc
 -std=gnu99"` though.


 > (3) your config.log uses -mcpu=power7 -mtune=power7 instead of -m64

 See above.


 > (4) the linker used is ld in your case and
 {{{/usr/local/binutils-2.21.1/ppc64-Linux-power7-suse-gcc-4.6.1/bin/ld}}}
 for a vanilla MPFR

 {{{
 #!sh
 leif@silius:~> command -v ld
 /usr/bin/ld
 leif@silius:~> (. /usr/local/skynet_bash_profile ; command -v ld)
 /usr/bin/ld

 leif@silius:~> command ld --version
 GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9
 Copyright 2009 Free Software Foundation, Inc.
 This program is free software; you may redistribute it under the terms of
 the GNU General Public License version 3 or (at your option) a later
 version.
 This program has absolutely no warranty.
 leif@silius:~> (. /usr/local/skynet_bash_profile ; command ld --version)
 GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9
 Copyright 2009 Free Software Foundation, Inc.
 This program is free software; you may redistribute it under the terms of
 the GNU General Public License version 3 or (at your option) a later
 version.
 This program has absolutely no warranty.

 leif@silius:~> echo $PATH
 /usr/local/bin/ppc64-Linux-
 
power7-suse:/home/leif/.local/bin:/home/leif/bin/silius:/home/leif/bin:/opt/csm/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
 }}}


 > I'd like to reproduce exactly your build with a vanilla MPFR but I
 cannot access some of your files.

 I've copied the headers and libs into
 `/tmp/leif/sage-5.0beta9/MPIR-{2.1.3,2.4.0}/local/{include,lib}/`, so you
 should be able to configure MPFR with `--with-
 gmp=/tmp/leif/sage-5.0beta9/MPIR-2.1.3/local/` etc.

 [Sorry for the delay, had some network trouble.]

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11705#comment:61>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to