Hum I see what you are saying. Well my case is a bit tricky but I think I'm not alone. I am using Archlinux, so there is not g++ separately. And gcc decides whether the program as a C or C++ program in the following way.
gcc file.C # uppercase .C (or .cpp) will process as C++ gcc file.c # lowercase .c will process as C see http://unix.stackexchange.com/questions/34654/c-compile-in-arch-linux-with-no-g-package-in-repositoriesfor details. So the question is what can be changed so that the gcc in my machine will interpret compile weight0.c as a C++ program... I wonder why I didn't encounter such a program earlier... perhaps it's the pre-release reversion that causes that problem. Also can I use force it to use the gcc (I suppose gcc-4.7.2.p1.spkg is the one) that comes with sage to compile? On Sun, May 5, 2013 at 1:47 AM, Francois Bissey < francois.bis...@canterbury.ac.nz> wrote: > On 05/05/13 19:32, Pong wrote: > > Looking for help in compiling SAGE 5.9 > > > > I encountered an error in buliding Singular-3-1-5.p7 > > > > I suspect the following may be the relevant part of the log file > > > > In file included from ../kernel/si_gmp.h:4:0, > > from ../kernel/structs.h:15, > > from weight0.c:13: > > ../factory/cf_gmp.h:2501:28: fatal error: bits/c++config.h: No such file > > or directory > > #include <bits/c++config.h> > > ^ > > compilation terminated. > > make[4]: *** [weight0.o] Error 1 > > > > However, I also attached the full file for the full details. > > Thank you for the help in advance. > > > > A fuller section of the log: > gcc -O2 -g -fPIC -pipe -I. -I.. -I/home/pong/sage-5.9/local > -I/home/pong/sage-5.9/local/include -I/home/pong/sage-5.9/local/include > -I/home/pong/sage-5.9/local/include -I/usr/local/include -DNDEBUG > -DOM_NDEBUG -Dx86_64_Linux -DHAVE_CONFIG_H -c weight0.c > In file included from ../kernel/si_gmp.h:4:0, > from ../kernel/structs.h:15, > from weight0.c:13: > ../factory/cf_gmp.h:2501:28: fatal error: bits/c++config.h: No such file > or directory > #include <bits/c++config.h> > > so bits/c++config.h is a c++ header provided by the compiler in your > case a pre-release of gcc-4.8.0. But the killer thing I think is that > weight0.c is a justly compiled with the c compiler but if you want > to use this header, g++ should be used. > One man's opinion at any rate. > > Francois > > -- > You received this message because you are subscribed to a topic in the > Google Groups "sage-devel" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/sage-devel/hqH8t69ixxA/unsubscribe?hl=en > . > To unsubscribe from this group and all its topics, send an email to > sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-devel?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.