Problem compiling Sage 7.6 from source

73 views
Skip to first unread message

Bernardo Feijoo

unread,
May 27, 2017, 2:27:34 PM5/27/17
to sage-support
Hello, I'm trying to build Sage 7.6 from source and it fails due to "Error installing package gcc-5.4.0". I'm running Ubuntu 17.04.

The relevant part of gcc-5.4.0.log follows.

Any help would be appreciated.

Thanks,
Bernardo.


/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/./prev-gcc/xg++ -B/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/./prev-gcc/ -B/home/bernardo/sage/sage-7.6/local/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu  -I/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include  -I/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/src/libstdc++-v3/libsupc++ -L/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c  -DIN_GCC_FRONTEND -g -O2 -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I../../src/gcc -I../../src/gcc/cp -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I/home/bernardo/sage/sage-7.6/local/include -I/home/bernardo/sage/sage-7.6/local/include -I/home/bernardo/sage/sage-7.6/local/include  -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/bid -I../libdecnumber -I../../src/gcc/../libbacktrace   -o cp/decl2.o -MT cp/decl2.o -MMD -MP -MF cp/.deps/decl2.TPo ../../src/gcc/cp/decl2.c
../../src/gcc/cp/decl2.c: In function 'void cp_write_global_declarations()':
../../src/gcc/cp/decl2.c:4474:1: internal compiler error: Segmentation fault
 cp_write_global_declarations (void)
 ^
0x56253d0827ec crash_signal
    ../../src/gcc/toplev.c:383
0x56253ca79523 lookup_page_table_entry
    ../../src/gcc/ggc-page.c:659
0x56253ca7a763 ggc_set_mark(void const*)
    ../../src/gcc/ggc-page.c:1540
0x56253c95c6fb gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:236
0x56253c95e5fc gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:602
0x56253c95dc81 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:468
0x56253cdbcb80 gt_ggc_mx_dw_fde_node(void*)
    /home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/gcc/gtype-desc.c:1381
0x56253cbd6d72 gt_ggc_mx(dw_fde_node*&)
    ./gt-dwarf2out.h:458
0x56253cbd6d34 gt_ggc_mx_vec_dw_fde_ref_va_gc_(void*)
    ./gt-dwarf2out.h:450
0x56253cccea2f ggc_mark_root_tab
    ../../src/gcc/ggc-common.c:81
0x56253cccead5 ggc_mark_roots()
    ../../src/gcc/ggc-common.c:98
0x56253ca7bb43 ggc_collect()
    ../../src/gcc/ggc-page.c:2199
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:1065: recipe for target 'cp/decl2.o' failed
make[6]: *** [cp/decl2.o] Error 1
make[6]: Leaving directory '/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build/gcc'
Makefile:4410: recipe for target 'all-stage2-gcc' failed
make[5]: *** [all-stage2-gcc] Error 2
make[5]: Leaving directory '/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build'
Makefile:19822: recipe for target 'stage2-bubble' failed
make[4]: *** [stage2-bubble] Error 2
make[4]: Leaving directory '/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build'
Makefile:901: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0/gcc-build'

real    182m0.423s
user    175m25.120s
sys    3m11.876s
************************************************************************
Error installing package gcc-5.4.0
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /home/bernardo/sage/sage-7.6/logs/pkgs/gcc-5.4.0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/home/bernardo/sage/sage-7.6/local/var/tmp/sage/build/gcc-5.4.0' && '/home/bernardo/sage/sage-7.6/sage' --sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************

Dima Pasechnik

unread,
May 27, 2017, 4:32:26 PM5/27/17
to sage-support
you probably have a very new gcc (which version?), to which Sage is not yet ported, and it cannot build gcc 5.4.
you can downgrade gcc to a supported version.


or perhaps you do not have gfortran installed?

Jeroen Demeyer

unread,
May 30, 2017, 4:14:27 AM5/30/17
to sage-s...@googlegroups.com
Is the problem reproducible, i.e. does it happen again if you rebuild Sage?

Which compiler are you using?

Bernardo Feijoo

unread,
May 31, 2017, 8:13:51 PM5/31/17
to sage-support
Thank you for your help, Dima.

I had version 6.3.0 of gcc installed. I tried to downgrade it but I was not able to. I also installed gfortran. Then I unistalled gcc, g++ and gfortran and installed them again (I was trying to install version 5.4.0, but failed again!).

Then I tried to install again and the installation stopped with an error about linbox. I just started it again and it seems to be progressing past linbox, so I think it's making progress. I'm just gonna keep trying.

Thanks again.
Bernardo.

Bernardo Feijoo

unread,
May 31, 2017, 8:15:43 PM5/31/17
to sage-support
Thank you for your help Jeroen.

No, it's not reproducible. See my answer to Dima. Using gcc 6.3.0.

Jeroen Demeyer

unread,
Jun 1, 2017, 5:25:35 AM6/1/17
to sage-s...@googlegroups.com
On 2017-06-01 02:13, Bernardo Feijoo wrote:
> Then I tried to install again and the installation stopped with an error
> about linbox. I just started it again and it seems to be progressing
> past linbox, so I think it's making progress. I'm just gonna keep trying.

This suggests a hardware problem of some sort, most likely bad memory. I
strongly suggest to run a memtester on that machine.
Reply all
Reply to author
Forward
0 new messages