Hi, I have a very similar setup (gcc 6.1.1 20160602 on Arch Linux), and I'm struggling quite hard to build 7.2:
- I'm using the patch from https://trac.sagemath.org/ticket/20738 in order to get singular to build. (Which works, as far as I can tell.) - I could build (the originally failing) packages gfan, ppl, eclib, and linbox by adding the snippet above before the "./configure" in the respective spkg-install, however - brial still failed, which I could resolve by setting CXXFLAGS globally, i.e. by calling CXXFLAGS="$CXXFLAGS -std=gnu++98" make (this actually puzzles me, because the CXXFLAGS set in the spkg-install file were picked up; I was quite sure to see that in the logfile...) The next failure then occurs when the Sage library modules are compiled: as I couldn't find out how to add '-std=gnu++98' for a single module, I called CFLAGS="$CFLAGS -std=gnu++98" make (which might be the culprit; I know too little about how the building process works ...), let it compile for a while and switched back to just "make -j4" by interrupting and restarting. This lets the compilation of the modules finish, but... ... then I get a segfault (last few lines are at http://pastebin.com/CBXhNN9P -- and I uploaded my full install.log to http://benjamin-hackl.at/downloads/behackl-20160629.install.log). Unfortunately, the reason for this is not that obvious to me---does anyone have an idea or suggestions (besides downgrading my gcc...)? :-| Benjamin Am Montag, 20. Juni 2016 00:42:37 UTC+2 schrieb leif: > > Francois Bissey wrote: > > May you should post the associated config.log. > > For singular it is usually not enough to define CPPFLAGS. > > I would have gone with CXX=“g++ -std=gnu++98” there > > are places in singular where CPPFLAGS/CFLAGS are not used. > > Oh, the Singular build errors with GCC 6.1 (C++14) are trivial to fix > (see attached patch); no need to pass '-std=...'. > > There are also some *new* warnings w.r.t. C++11 (which might become > errors in the future) we could easily fix as well. > > > The other spkgs affected by stricter C++ compliance (C++11/C++14) of GCC > 6.x are the usual suspects (except for Lcalc, which we apparently > already fixed sufficiently in the past): > > BRiAl, eclib (probably just because of included NTL headers), gfan, > LinBox, and PPL. > > All of these build with '-std=gnu++98' (but not '-std=gnu++11), e.g. by > adding something like > > # GCC 6.x defaults to '-std=gnu++14', which $PKG doesn't yet compile > with > case `$CXX -dumpversion` in > 6|6.*) > echo "Adding '-std=gnu++98' to CXXFLAGS:" > CXXFLAGS="$CXXFLAGS -std=gnu++98" > echo " $CXXFLAGS" > ;; > esac > > to their spkg-install files. > > > So far I've successfully built Sage 7.2 with GCC 6.1 and the above > changes, except for some Sage library modules which include LinBox > headers, and hence have to be built with '-std=gnu++98', too. > > > -leif > > > > > François > > > >> On 19/06/2016, at 00:37, leif <[email protected] <javascript:>> > wrote: > >> > >> Johan S. R. Nielsen wrote: > >>> I just want to follow up on my compilation misadventures: I'm still > not > >>> able to compile Sage with gcc-6.1 on Arch. After two weeks of not > being > >>> able to review tickets, I have now rolled back my gcc and can get back > >>> to work. > >>> > >>> I managed to compile Brial using the `CXXFLAGS= -std=gnu++98` as > >>> explaioned by Florent Hivert. The compilation then continues for a > >>> while, until it fails with Singular, apparently with similar > >>> C++11-exceptions. This time, setting `CPPFLAGS= -std=gnu++98` seems to > >>> be the right thing to do. Unfortunately, then compilation immediately > >>> fails since autoconf fails in locating gmp.h: > >>> > >>> ... > >>> [singular-3.1.7p1.p1] checking for gmp.h... no > >>> [singular-3.1.7p1.p1] checking for MP.h... no > >>> [singular-3.1.7p1.p1] checking for MPT.h... no > >>> [singular-3.1.7p1.p1] checking for factory.h... no > >>> [singular-3.1.7p1.p1] checking for factor.h... no > >>> [singular-3.1.7p1.p1] checking for omalloc.h... no > >>> [singular-3.1.7p1.p1] checking which tmp dir to use... > /home/jsrn/mat/sage_coding_project/local/var/tmp/sage/build/singular-3.1.7p1.p1/src/latest/tmp > > > >>> [singular-3.1.7p1.p1] checking whether to configure and build > omalloc... yes > >>> [singular-3.1.7p1.p1] configure: error: can not find gmp > >>> [singular-3.1.7p1.p1] Unable to configure Singular. > >>> ... > >>> > >>> I can include gmp.h in cpp files and compile them just fine with or > >>> without the -std=gnu++98 flag. So I don't understand this error. > >> > >> This might be related to what Singular does with gmp.h, cf. #14737. > >> > >> > >> -leif > >> > >>> > >>> Best, > >>> Johan > >>> > >>> > >>> > >>> > >>> Florent Hivert writes: > >>> > >>>> Dear Vorlker, > >>>> > >>>> On Mon, Jun 06, 2016 at 06:18:12AM -0700, Volker Braun wrote: > >>>>> On Monday, June 6, 2016 at 5:10:36 AM UTC-4, hivert wrote: > >>>>>> > >>>>>>> C++11 appears to be a bit much for brial, but moving the > -std=gnu++98 > >>>>>>> into configure before any tests are run does appear to work here > and > >>>>>>> I would hope with g++6.1. > >>>>>> > >>>>> > >>>>> Which is of course not a long-term viable solution, but only a > short-term > >>>>> bugfix. > >>>>> > >>>>> > >>>>>> I just wan't to report that eclib have exactly the same problem. > >>>>> > >>>>> > >>>>> Probably not, the issue in brial was that the fallback for compiling > >>>>> without unordered_map was broken. I patched that already, so there > isn't > >>>>> anything left to see here. > >>>> > >>>> Sorry I wasn't clear. What I reported is that the following packages > >>>> - brial > >>>> - eclib > >>>> - ppl > >>>> - singular > >>>> Doesn't compile on arch where the standard compiler is gcc-6.1 whose > default > >>>> is to use c++11. > >>>> > >>>> For those package, if the option -std=gnu++98 is not set. The > compilation > >>>> fails. I didn't went all the way to check why. > >>>> > >>>> Cheers, > >>>> > >>>> Florent > > -- You received this message because you are subscribed to the Google Groups "sage-release" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-release. For more options, visit https://groups.google.com/d/optout.
