#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 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).
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`.)
[[BR]]
> - Use the modified ppl package from #12672
I've so far only tried with a GCC built with PPL 0.12. With `-floop-
flatten`, I get PPL errors for GSL, PALP and rubiks, and PARI's test suite
fails (as well as `libs/pari/gen.pyx` if the PARI package was built with
that); the other options work.
[[BR]]
> - 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.
[[BR]]
> - Test whether -flto actually yields code that is noticeably faster in,
say, `sage -testall`.
I don't think you'll see overwhelming speedup; individual tests (and other
code) might run significantly faster.
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.) Also note that `-g`, i.e., meaningful debugging, is said to
currently not work well with LTO. (But ''specifying'' `-g` in addition
doesn't lead to errors; a couple of packages add it by themselves.)
(Some packages or parts of them ignore `CFLAGS` you provide, so won't
benefit from loop optimization and LTO at all. To use LTO for ''static''
libraries -- upon linking to them -- as well, you need GNU `ld` >= 2.21
and have to specify `-fuse-linker-plugin`.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12703#comment:8>
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.