#10120: Error building the PARI/GP spkg on 32-bit Fedora 11 (with GCC 4.4.1)
------------------------+---------------------------------------------------
   Reporter:  mpatel    |       Owner:  tbd       
       Type:  defect    |      Status:  needs_info
   Priority:  major     |   Milestone:  sage-4.6.1
  Component:  packages  |    Keywords:  gcc pari  
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by leif):

 A better work-around than `export SAGE_DEBUG=yes` might be to let the
 (preferably parallel build) fail on PARI in the first place, then install
 PARI with modified `CFLAGS`, and after that continue the build by re-
 running `make` with "better" (or unset) `CFLAGS`:

 {{{
 #!sh
 $ export SAGE_PARALLEL_SPKG_BUILD=yes

 $ export MAKE="make -j4"  # for example; using more threads/jobs than the
 number
                           # of cores the CPU has is usually ok, at least
 if the
                           # machine has enough memory (RAM) available

 $ make build  # should build all packages that do not depend on PARI, but
 will
               # fail for PARI

 $ export CFLAGS="-O1 -fno-strict-aliasing -fomit-frame-pointer"

 $ ./sage -i spkg/standard/pari-2.4.3*  # build/install only the PARI spkg;
                                        # _should_ work, unless the scripts
                                        # aren't yet installed

 $ unset CFLAGS  # clear them, such that the packages' defaults will be
 used

 $ make  # continue building the remaining packages and the documentation
 }}}

 If the `sage -i ...` doesn't work (because the necessary scripts aren't
 yet installed), one could try once again running `make build` (with unset
 or "normal" `CFLAGS`), then retrying the `sage -i ...`, again with the
 '''modified''' `CFLAGS` as given above, after a successful build of PARI
 continuing with `unset CFLAGS` followed by `make`.

 Another approach (untested) which makes sure the necessary scripts are
 installed after the build of PARI has failed in the first place is to use
 the `-k` ("keep going") option of `make`, i.e. replacing
 {{{
 #!sh
 $ make build
 }}}
 above by
 {{{
 #!sh
 $ make -k build
 }}}

 (Of course one could do the same with (additional) custom `CFLAGS` for the
 usual build, substituting the `unset CFLAGS` by `export CFLAGS="..."`, and
 '''pre'''pending those flags to the ones used above for building PARI.)

 If one doesn't want to mess around with setting and unsetting `CFLAGS`
 many times, here's the solution with one '''very long line''' to avoid
 this, this time '''without''' building in parallel:
 {{{
 #!sh
 $ make -k build  # should build all packages that do not depend on PARI,
 but will
                  # fail for PARI (with GCC 4.4.1)

 # build/install only the PARI spkg, with "temporarily" modified CFLAGS:
 $ env CFLAGS="-O1 -fno-strict-aliasing -fomit-frame-pointer" ./sage -i
 spkg/standard/pari-2.4.3*

 $ make  # continue building the remaining packages and the documentation
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10120#comment:11>
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