Problem compiling 7.3 from source

281 views
Skip to first unread message

Luis Finotti

unread,
Aug 24, 2016, 4:39:28 PM8/24/16
to sage-support
I can't compile 7.3 using Debian Unstable.  Here is some info on the system:

System:    Host: finottim83 Kernel: 4.7.0-1.slh.1-aptosid-amd64 x86_64 (64 bit gcc: 6.1.1)
           
Desktop: KDE Plasma 5.6.5 Distro: aptosid 2013-01 Ἑσπερίδες - kde-full - (201305050307)
Machine:   System: LENOVO product: 10ANS0BH00 v: ThinkCentre M83
           
Mobo: LENOVO model: SHARKBAY v: SDK0E50510 WIN Bios: LENOVO v: FBKTA1AUS date: 10/22/2014
CPU
:       Quad core Intel Core i7-4790 (-HT-MCP-) cache: 8192 KB
           flags
: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28731
           clock speeds
: max: 4000 MHz 1: 3864 MHz 2: 3600 MHz 3: 3599 MHz 4: 3600 MHz 5: 3601 MHz 6: 3600 MHz
           
7: 3600 MHz 8: 3600 MHz
Graphics:  Card: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller bus-ID: 00:02.0
           
Display Server: X.Org 1.18.4 driver: intel Resolution: 1920x1200@59.95hz, 1280x1024@60.02hz
           GLX
Renderer: Mesa DRI Intel Haswell Desktop GLX Version: 3.0 Mesa 11.2.2 Direct Rendering: Yes
Network:   Card: Intel Ethernet Connection I217-LM driver: e1000e v: 3.2.6-k port: f080 bus-ID: 00:19.0
           IF
: eth0 state: up speed: 100 Mbps duplex: full mac: 44:39:c4:8f:0a:41
Drives:    HDD Total Size: 2012.4GB (22.4% used) ID-1: model: WDC_WD5000AAKX
           ID
-2: model: Crucial_CT512M55 ID-3: model: ATAPI
Info:      Processes: 322 Uptime: 7 days Memory: 7600.0/31977.4MB Init: systemd runlevel: 5 Gcc sys: 6.1.1
           
Client: Shell (bash 4.3.461) inxi: 2.3.0


Here are the last lines of the compilation:

[gcc-4.9.3.p1] In file included from ../../src/gcc/cp/except.c:1013:0:
[gcc-4.9.3.p1] cfns.gperf: In function 'const char* libc_name_p(const char*, unsigned int)':
[gcc-4.9.3.p1] cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' att
ribute
[gcc-4.9.3.p1] cfns.gperf:26:14: note: 'const char* libc_name_p(const char*, unsigned int)' previously declared here
[gcc-4.9.3.p1] cfns.gperf: At global scope:
[gcc-4.9.3.p1] cfns.gperf:26:14: warning: inline function 'const char* libc_name_p(const char*, unsigned int)' used but never define
d
[gcc-4.9.3.p1] Makefile:1058: recipe for target 'cp/except.o' failed
[gcc-4.9.3.p1] make[6]: *** [cp/except.o] Error 1
[gcc-4.9.3.p1] make[6]: *** Waiting for unfinished jobs....
[gcc-4.9.3.p1] rm gcc.pod
[gcc-4.9.3.p1] make[6]: Leaving directory '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build/gcc'
[gcc-4.9.3.p1] Makefile:4222: recipe for target 'all-stage1-gcc' failed
[gcc-4.9.3.p1] make[5]: *** [all-stage1-gcc] Error 2
[gcc-4.9.3.p1] make[5]: Leaving directory '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
[gcc-4.9.3.p1] Makefile:18866: recipe for target 'stage1-bubble' failed
[gcc-4.9.3.p1] make[4]: *** [stage1-bubble] Error 2
[gcc-4.9.3.p1] make[4]: Leaving directory '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
[gcc-4.9.3.p1] Makefile:889: recipe for target 'all' failed
[gcc-4.9.3.p1] make[3]: *** [all] Error 2
[gcc-4.9.3.p1] make[3]: Leaving directory '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
[gcc-4.9.3.p1]
[gcc-4.9.3.p1] real     1m15.222s  
[gcc-4.9.3.p1] user     3m58.571s  
[gcc-4.9.3.p1] sys      0m20.283s  
[gcc-4.9.3.p1] ************************************************************************
[gcc-4.9.3.p1] Error installing package gcc-4.9.3.p1
[gcc-4.9.3.p1] ************************************************************************
[gcc-4.9.3.p1] Please email sage-devel (http://groups.google.com/group/sage-devel)
[gcc-4.9.3.p1] explaining the problem and including the relevant part of the log file
[gcc-4.9.3.p1]   /usr/local/sage-7.3/logs/pkgs/gcc-4.9.3.p1.log
[gcc-4.9.3.p1] Describe your computer, operating system, etc.
[gcc-4.9.3.p1] If you want to try to fix the problem yourself, *don't* just cd to
[gcc-4.9.3.p1] /usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1 and type '
make' or whatever is appropriate.
[gcc-4.9.3.p1] Instead, the following commands setup all environment variables
[gcc-4.9.3.p1] correctly and load a subshell for you to debug the error:
[gcc-4.9.3.p1]   (cd '
/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1' && '/usr/local/sage-7.3/sage' --sh)
[gcc-4.9.3.p1] When you are done debugging, you can type "exit" to leave the subshell.
[gcc-4.9.3.p1] ************************************************************************
Makefile:1661: recipe for target '
/usr/local/sage-7.3/local/var/lib/sage/installed/gcc-4.9.3.p1' failed
make[2]: *** [/usr/local/sage-7.3/local/var/lib/sage/installed/gcc-4.9.3.p1] Error 1
make[2]: Leaving directory '
/usr/local/sage-7.3/build/make'
Makefile:859: recipe for target '
all-toolchain' failed
make[1]: *** [all-toolchain] Error 2
make[1]: Leaving directory '
/usr/local/sage-7.3/build/make'

real    1m45.203s
user    4m26.326s
sys     0m22.833s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of '
make all'):

* package: gcc-4.9.3.p1
  log file: /usr/local/sage-7.3/logs/pkgs/gcc-4.9.3.p1.log
  build directory: /usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run '
make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to '
yes' to prevent this.

Makefile:16: recipe for target '
all' failed
make: *** [all] Error 1


The log files can be found here: install.log and gcc-4.9.3.p1.log.

Any help would be greatly appreciated.

leif

unread,
Aug 24, 2016, 5:41:37 PM8/24/16
to sage-s...@googlegroups.com
Luis Finotti wrote:
> I can't compile 7.3 using Debian Unstable.

Do you intentionally (try to) build Sage's GCC? (I have to admit I
haven't tried to build 4.9.3 with 6.x, but building older GCCs with
newer versions of it in my experience is likely to fail.)

If not, take a look at config.log, which should tell you /why/ Sage
attempts to build and use its own GCC.

Presumably your system lacks g++ and/or gfortran; if you install these
from your distro, Sage won't have to build them.


-leif


> Here is some info on the system:
>
> |
> System: Host:finottim83 Kernel:4.7.0-1.slh.1-aptosid-amd64 x86_64
> (64bit gcc:6.1.1)
> Desktop:KDE Plasma5.6.5Distro:aptosid
> 2013-01Ἑσπερίδες-kde-full -(201305050307)
> Machine: System:LENOVO product:10ANS0BH00v:ThinkCentreM83
> Mobo:LENOVO model:SHARKBAY v:SDK0E50510 WIN Bios:LENOVO
> v:FBKTA1AUS date:10/22/2014
> CPU: Quadcore IntelCorei7-4790(-HT-MCP-)cache:8192KB
> flags:(lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx)bmips:28731
> clock
> speeds:max:4000MHz1:3864MHz2:3600MHz3:3599MHz4:3600MHz5:3601MHz6:3600MHz
> 7:3600MHz8:3600MHz
> Graphics: Card:IntelXeonE3-1200v3/4thGenCoreProcessorIntegratedGraphicsControllerbus-ID:00:02.0
> DisplayServer:X.Org1.18.4driver:intel
> Resolution:1920...@59.95hz,1280...@60.02hz
> GLX Renderer:MesaDRI IntelHaswellDesktopGLX
> Version:3.0Mesa11.2.2DirectRendering:Yes
> Network: Card:IntelEthernetConnectionI217-LM driver:e1000e v:3.2.6-k
> port:f080 bus-ID:00:19.0
> IF:eth0 state:up speed:100Mbpsduplex:full mac:44:39:c4:8f:0a:41
> Drives: HDD TotalSize:2012.4GB(22.4%used)ID-1:model:WDC_WD5000AAKX
> ID-2:model:Crucial_CT512M55ID-3:model:ATAPI
> Info: Processes:322Uptime:7days Memory:7600.0/31977.4MBInit:systemd
> runlevel:5Gccsys:6.1.1
> Client:Shell(bash 4.3.461)inxi:2.3.0
>
> |
>
> Here are the last lines of the compilation:
>
> |
> [gcc-4.9.3.p1]Infile included from../../src/gcc/cp/except.c:1013:0:
> [gcc-4.9.3.p1]cfns.gperf:Infunction'const char* libc_name_p(const char*,
> unsigned int)':
> [gcc-4.9.3.p1]cfns.gperf:101:1:error:'const char* libc_name_p(const
> char*, unsigned int)'redeclared inlinewith'gnu_inline'att
> ribute
> [gcc-4.9.3.p1]cfns.gperf:26:14:note:'const char* libc_name_p(const
> char*, unsigned int)'previously declared here
> [gcc-4.9.3.p1]cfns.gperf:Atglobalscope:
> [gcc-4.9.3.p1]cfns.gperf:26:14:warning:inlinefunction'const char*
> libc_name_p(const char*, unsigned int)'used but never define
> d
> [gcc-4.9.3.p1]Makefile:1058:recipe fortarget 'cp/except.o'failed
> [gcc-4.9.3.p1]make[6]:***[cp/except.o]Error1
> [gcc-4.9.3.p1]make[6]:***Waitingforunfinished jobs....
> [gcc-4.9.3.p1]rm gcc.pod
> [gcc-4.9.3.p1]make[6]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build/gcc'
> [gcc-4.9.3.p1]Makefile:4222:recipe fortarget 'all-stage1-gcc'failed
> [gcc-4.9.3.p1]make[5]:***[all-stage1-gcc]Error2
> [gcc-4.9.3.p1]make[5]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]Makefile:18866:recipe fortarget 'stage1-bubble'failed
> [gcc-4.9.3.p1]make[4]:***[stage1-bubble]Error2
> [gcc-4.9.3.p1]make[4]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]Makefile:889:recipe fortarget 'all'failed
> [gcc-4.9.3.p1]make[3]:***[all]Error2
> [gcc-4.9.3.p1]make[3]:Leavingdirectory
> '/usr/local/sage-7.3/local/var/tmp/sage/build/gcc-4.9.3.p1/gcc-build'
> [gcc-4.9.3.p1]
> [gcc-4.9.3.p1]real 1m15.222s
> [gcc-4.9.3.p1]user 3m58.571s
> [gcc-4.9.3.p1]sys 0m20.283s
> [gcc-4.9.3.p1]************************************************************************
> [gcc-4.9.3.p1]Errorinstalling packagegcc-4.9.3.p1
> [gcc-4.9.3.p1]************************************************************************
> [gcc-4.9.3.p1]Pleaseemail sage-devel
> (http://groups.google.com/group/sage-devel)
> [gcc-4.9.3.p1]explaining the problem andincluding the relevant part of
> the log file
> [gcc-4.9.3.p1] /usr/local/sage-7.3/logs/pkgs/gcc-4.9.3.p1.log
> [gcc-4.9.3.p1]Describeyour computer,operating system,etc.
> [gcc-4.9.3.p1]Ifyou want to tryto fix the problem yourself,*don't* just
> <http://www.math.utk.edu/~finotti/misc/install.log> and
> gcc-4.9.3.p1.log. <http://www.math.utk.edu/~finotti/misc/gcc-4.9.3.p1.log>

Dima Pasechnik

unread,
Aug 25, 2016, 2:49:12 AM8/25/16
to sage-support
Do we support gcc 6.1.1 now?
This is what is used during the build.

leif

unread,
Aug 25, 2016, 3:32:26 AM8/25/16
to sage-s...@googlegroups.com
Dima Pasechnik wrote:
> Do we support gcc 6.1.1 now?

Sure. (Modulo building Sage's GCC 4.9.3 with it... ;-) )

(6.2 has just been released, but that's a bugfix release in the 6.x series.)


-leif

leif

unread,
Aug 25, 2016, 3:43:00 AM8/25/16
to sage-s...@googlegroups.com
leif wrote:
> Dima Pasechnik wrote:
>> Do we support gcc 6.1.1 now?
>
> Sure. (Modulo building Sage's GCC 4.9.3 with it... ;-) )

The only thing we missed in Sage 7.3 is Givaro's testsuite, which
currently only builds when manually passing '-std=c++98' in CXXFLAGS.


-leif


Luis Finotti

unread,
Aug 25, 2016, 1:58:30 PM8/25/16
to sage-support


On Wednesday, August 24, 2016 at 5:41:37 PM UTC-4, leif wrote:
Luis Finotti wrote:
> I can't compile 7.3 using Debian Unstable.

Do you intentionally (try to) build Sage's GCC?  (I have to admit I
haven't tried to build 4.9.3 with 6.x, but building older GCCs with
newer versions of it in my experience is likely to fail.)

If not, take a look at config.log, which should tell you /why/ Sage
attempts to build and use its own GCC.

Presumably your system lacks g++ and/or gfortran; if you install these
from your distro, Sage won't have to build them.


-leif


I wasn't trying to compile gcc.  Indeed I was missing gfortran, which is funny since I've built sage many times in this machine.

After installing gfortran, I could compile it without problems.

Thank you for your help!
 

leif

unread,
Aug 25, 2016, 2:38:48 PM8/25/16
to sage-s...@googlegroups.com
Luis Finotti wrote:
> On Wednesday, August 24, 2016 at 5:41:37 PM UTC-4, leif wrote:
>
> Luis Finotti wrote:
> > I can't compile 7.3 using Debian Unstable.
>
> Do you intentionally (try to) build Sage's GCC? (I have to admit I
> haven't tried to build 4.9.3 with 6.x, but building older GCCs with
> newer versions of it in my experience is likely to fail.)
>
> If not, take a look at config.log, which should tell you /why/ Sage
> attempts to build and use its own GCC.
>
> Presumably your system lacks g++ and/or gfortran; if you install these
> from your distro, Sage won't have to build them.
>
>
> -leif
>
>
> I wasn't trying to compile gcc. Indeed I was missing gfortran, which is
> funny since I've built sage many times in this machine.

Well, a "version mismatch" (e.g. gcc-6.1 but gfortran-5.4) would also
cause Sage to install its GCC package, so probably gfortran hadn't been
upgraded.


FWIW, setting SAGE_INSTALL_GCC=no (before running 'configure') prevents
from Sage building its own GCC; in your case 'configure' would then have
exited with an error (if gfortran wasn't installed at all), or a warning
(upon a "version mismatch").


-leif


Reply all
Reply to author
Forward
0 new messages