#12703: GLPK fails to build with LTO (`gcc -flto ...`)
------------------------------------------------------------------------+---
Reporter: leif |
Owner: leif
Type: defect |
Status: needs_review
Priority: minor |
Milestone: sage-5.0
Component: packages |
Resolution:
Keywords: link time optimization nm glpsol spkg upgrade update |
Work issues:
Report Upstream: Reported upstream. Developers acknowledge bug. |
Reviewers: Nathann Cohen
Authors: Leif Leonhardy |
Merged in:
Dependencies: |
Stopgaps:
------------------------------------------------------------------------+---
Comment (by SimonKing):
Replying to [comment:8 leif]:
> Slightly off the ticket's topic:
>
> Replying to [comment:7 SimonKing]:
> > I am currently making an experiment with sage-5.0.beta8:
>
> beta9 would probably be a better starting point, since it merges three
spkgs fixing hardcoded `gcc` or `g++` (Lcalc, Singular and ratpoints).
Thank you for your hint! Indeed, Singular failed to build (more precisely:
to link) with `C(XX)FLAGS="-O2 -march=native -flto", but did work with
`-O3 -march=native`.
> I'm working on a fixed GAP spkg at #7041 as well. Andrew Ohana has
some fixed zn_poly spkg (its ticket set to "needs work", but the spkg
there being likely to work for you as is).
> (These packages will fail to build if your "default" `gcc`/`g++`, the
ones found along your `PATH`, don't understand the options intended for
`$CC`/`$CXX`.)
I'm looking forward :(
> > - Modify the gcc spkg from #12369 such that it is built with graphite
and lto support
>
> Both should be enabled by default (provided GCC finds the
prerequisites); haven't looked how Jeroen configures, though.
The problem seems to be that gcc does not automatically picks up the
installed packages. So, my suggestion is to test in spkg-install what
parts of ppl, cloog-ppl and libelf are installed, and modify the options
passed to `./configure` (such as `--with-cloog=... --enable-lto`)
accordingly. But this is not done yet.
Also, currently one can only say via an environment variable: "Build sage
with the gcc spkg." But one can not say "Build cloog-ppl and libelf
first!".
What I would like to see is a syntax like
{{{
$ make cloog_ppl libelf gcc all
}}}
which would automatically try to download (to be created) optional
cloog_ppl and libelf spkgs, build them, then build gcc, and then proceed
with the rest of Sage.
> I don't think you'll see overwhelming speedup; individual tests (and
other code) might run significantly faster.
`-march=native` only resulted in 3% gain...
> Compile time is very likely to increase, since with LTO you effectively
compile twice, and object files will of course get larger. (The GCC you
build might be faster than your default one, though, so probably hard to
compare.)
The default one on my system does not support lto or graphite.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12703#comment:10>
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.