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]> 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.
--- latest/kernel/mod_raw.cc 2014-11-19 14:06:05.000000000 +0100
+++ latest/kernel/mod_raw.cc 2016-06-19 23:27:19.420554691 +0200
@@ -38,8 +38,8 @@
lib_types type_of_LIB(char *newlib, char *libnamebuf)
{
- const char mach_o[]={0xfe,0xed,0xfa,0xce,0};
- const char mach_o_module[]={0xce,0xfa,0xed,0xfe,0};
+ const char mach_o[]="\xfe\xed\xfa\xce";
+ const char mach_o_module[]="\xce\xfa\xed\xfe";
int i=0;
while(si_bultin_libs[i]!=NULL)
{