error: C preprocessor "/lib/cpp" fails sanity check (installing sage-4.7.1 from source)

2,212 views
Skip to first unread message

jsymons

unread,
Sep 25, 2011, 11:01:06 AM9/25/11
to sage-support
I have tried to install sage-4.7.1 in a Linux system x86_64 from
sources. I have installed all the required packages: gcc 4.5.3 (gcc, g+
+, gfortran...), m4, etc. After typing 'make' I obtained this:


sage-4.7.1 $ make
cd spkg && "../spkg/pipestatus" "./install all 2>&1" "tee -a ../
install.log"
*** ALL ENVIRONMENT VARIABLES BEFORE BUILD: ***
SAGENB=sagenb-0.8.19
GD=gd-2.0.35.p5
CONWAY=conway_polynomials-0.2
CLIQUER=cliquer-1.2.p9
MANPATH=/usr/local/share/man:/usr/share/man:/opt/sun-jre/man
READLINE=readline-6.1
JINJA2=jinja2-2.5.5
SAGE_LOGS=/home/name/Applications/sage-4.7.1/spkg/logs
SSH_AGENT_PID=1416
KDE_MULTIHEAD=false
PEXPECT=pexpect-2.0.p4
F2C=f2c-20070816.p2
HOSTNAME=computer
DM_CONTROL=/var/run/xdmctl
MATPLOTLIB=matplotlib-1.0.1
G2RED=genus2reduction-0.3.p8
LIBM4RI=libm4ri-20100701.p1
GPG_AGENT_INFO=/tmp/gpg-AaoDbU/S.gpg-agent:1443:1
SAGE_BZIP2=bzip2-1.0.5
TERM=xterm
SHELL=/bin/bash
CYTHON=cython-0.14.1.p3
MAKEFLAGS=
XDG_SESSION_COOKIE=23682230fb9e63220aefc9d900000720-1316946020.554304-920956725
XDM_MANAGED=method=classic
KONSOLE_DBUS_SERVICE=:1.75
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/name/.gtkrc-2.0:/usr/share/kde4/
config/gtkrc:/home/name/.kde/share/config/gtkrc-2.0
SQLALCHEMY=sqlalchemy-0.5.8
DOCUTILS=docutils-0.7.p0
ZNPOLY=zn_poly-0.9.p5
SYMMETRICA=symmetrica-2.0.p5
GIVARO=givaro-3.2.13rc2.p2
GS_LIB=/home/name/.fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/home/name/.gtkrc:/usr/share/kde4/config/
gtkrc:/home/name/.kde/share/config/gtkrc
SAGETEX=sagetex-2.2.5
MPFR=mpfr-2.4.2
WINDOWID=52428837
SYMPY=sympy-0.6.4.p0
POLYTOPES_DB=polytopes_db-20100210
OLDPWD=/home/name/Applications/sage-4.7.1
EXAMPLES=examples-4.7.1
ATLAS=atlas-3.8.3.p16
PREREQ=prereq-0.9
DIR=dir-0.1
SHELL_SESSION_ID=4b77847785e44000a5fe6e732fe4c3b4
TACHYON=tachyon-0.98.9.p3
LC_ALL=en_US.UTF-8
KDE_FULL_SESSION=true
MPFI=mpfi-1.3.4-cvs20071125.p8
MERCURIAL=mercurial-1.6.4.p0
CDDLIB=cddlib-094f.p8
ECLIB=eclib-20100711
USER=name
R=r-2.10.1.p4
SPHINX=sphinx-1.0.4.p6
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.pisi=01;33:*.
7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.ogv=01\:
35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:
LIBGCRYPT=libgcrypt-1.4.4.p3
CVXOPT=cvxopt-1.1.3
BOEHM_GC=boehm_gc-7.1.p7
TERMCAP=termcap-1.3.1.p1
MPIR=mpir-1.2.2.p2
SSH_AUTH_SOCK=/tmp/ssh-pODerE1389/agent.1389
ZODB=zodb3-3.7.0.p4
GRAPHS=graphs-20070722.p1
ICONV=iconv-1.13.1.p3
ECL=ecl-11.1.1.p1
CEPHES=cephes-2.8
SAGE_LOCAL=/home/name/Applications/sage-4.7.1/local
MAKELEVEL=1
MC_ENV=/usr/share/mc/bin/mc.sh
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1495,unix/unix:/tmp/.ICE-
unix/1495
SAGE_SCRIPTS=sage_scripts-4.7.1
ECM=ecm-6.2.1.p2
PAGER=/usr/bin/less
TWISTED=twisted-9.0.p2
RUBIKS=rubiks-20070912.p17
FREETYPE=freetype-2.3.5.p3
MFLAGS=
PYGMENTS=pygments-1.3.1.p0
FLTK_DOCDIR=/usr/share/doc/fltk/html
GAP=gap-4.4.12.p6
PATH=/home/name/Applications/sage-4.7.1:/home/name/Applications/
sage-4.7.1/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/
sbin:/bin:/sbin:/opt/bin:/opt/sun-jre/bin
DESKTOP_SESSION=default
IML=iml-1.0.1.p13
LAPACK=lapack-20071123.p2
EXTCODE=extcode-4.7.1
BLAS=blas-20070724
ZLIB=zlib-1.2.5
SINGULAR=singular-3-1-1-4.p12
GNUTLS=gnutls-2.2.1.p5
POLYBORI=polybori-0.7.0.p4
LIBGPG_ERROR=libgpg_error-1.6.p3
PWD=/home/name/Applications/sage-4.7.1/spkg
JAVA_HOME=/opt/sun-jre
LCALC=lcalc-20100428-1.23.p6
EDITOR=/bin/nano
SCONS=scons-1.2.0
LINBOX=linbox-1.1.6.p3
OPENCDK=opencdk-0.6.6.p5
KDE_SESSION_UID=1000
LANG=en_US.UTF-8
LESSCOLOR=yes
FLINTQS=flintqs-20070817.p5
GDMODULE=gdmodule-0.56.p7
PYTHONSTARTUP=/etc/pythonstart
SCIPY=scipy-0.9
SAGE_ROOT_REPO=sage_root-4.7.1
GFAN=gfan-0.4plus.p1
SAGE_ROOT=/home/name/Applications/sage-4.7.1
SAGE=sage-4.7.1
RATPOINTS=ratpoints-2.1.3.p1
NUMPY=numpy-1.5.1
KONSOLE_DBUS_SESSION=/Sessions/1
PARI=pari-2.4.3.alpha.p7
PATCH=patch-2.5.9.p0
GLPK=glpk-4.44
PPL=ppl-0.11.2
R_HOME_DIR=/usr/lib/R
PALP=palp-1.1.p3
COLORFGBG=15;0
SHLVL=6
HOME=/home/name
PYCRYPTO=pycrypto-2.1.0
GSL=gsl-1.15
PYTHON_GNUTLS=python_gnutls-1.1.4.p7
LANGUAGE=
KDE_SESSION_VERSION=4
IPYTHON=ipython-0.9.1.p0
XCURSOR_THEME=Oxygen_White
FLINT=flint-1.5.0.p5
PYTHONPATH=/home/name/Applications/sage-4.7.1/local
LESS=-R -M --shift 5
LOGNAME=name
SQLITE=sqlite-3.7.5
CVS_RSH=ssh
MPMATH=mpmath-0.17
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-
C7zBX5Lis0,guid=f1ef8d9e91bb1ba5b3fca45c00000026
XDG_DATA_DIRS=/usr/share/kde4:/usr/share:/usr/local/share
NTL=ntl-5.5.2
FORTRAN=fortran-20100629
PIL=pil-1.1.6.p4
LESSOPEN=|lesspipe.sh %s
R_HOME=/usr/lib/R
SYMPOW=sympow-1.018.1.p9
PYNAC=pynac-0.2.3
MAXIMA=maxima-5.23.2.p0
WINDOWPATH=8
INFOPATH=/usr/share/info
FPLLL=libfplll-3.0.12.p1
DISPLAY=:0
PROFILEHOME=
LADSPA_PATH=/usr/lib/ladspa
QT_PLUGIN_PATH=/home/name/.kde/lib/kde4/plugins/:/usr/lib/kde4/
plugins/
SETUPTOOLS=setuptools-0.6.16
SANE_CONFIG_DIR=/etc/sane.d
MOIN=moin-1.9.1.p2
ELLIPTIC_CURVES=elliptic_curves-0.1
BOOST_CROPPED=boost-cropped-1.34.1
LDPATH=/opt/sun-jre/lib
PYTHON=python-2.6.4.p11
NETWORKX=networkx-1.2.p1
LIBPNG=libpng-1.2.35.p3
G_BROKEN_FILENAMES=1
_=/usr/bin/env
***********************************************
make[1]: Entering directory `/home/name/Applications/sage-4.7.1/spkg'
/home/name/Applications/sage-4.7.1/spkg/pipestatus "base/dir-0.1-
install 2>&1" "tee -a /home/name/Applications/sage-4.7.1/spkg/logs/
dir-0.1.log"
../data/
../local/
../local/etc
../local/lib
../local/bin
../local/include
../tmp/
/home/name/Applications/sage-4.7.1/spkg/build
installed/
/home/name/Applications/sage-4.7.1/spkg/pipestatus "base/prereq-0.9-
install 2>&1" "tee -a /home/name/Applications/sage-4.7.1/spkg/logs/
prereq-0.9.log"
Starting prerequisite check.
Machine: Linux computer 2.6.37.6 #1 SMP Wed Mar 30 15:28:53 EEST 2011
x86_64 x86_64 x86_64 GNU/Linux
prereq-0.9/
prereq-0.9/aclocal.m4
prereq-0.9/autom4te.cache/
prereq-0.9/config.guess
prereq-0.9/config.h.in
prereq-0.9/config.h.in~
prereq-0.9/config.sub
prereq-0.9/configure
prereq-0.9/configure.ac
prereq-0.9/depcomp
prereq-0.9/install-sh
prereq-0.9/m4/
prereq-0.9/Makefile.am
prereq-0.9/Makefile.in
prereq-0.9/missing
prereq-0.9/m4/ax_c_check_flag.m4
prereq-0.9/m4/ax_gcc_option.m4
prereq-0.9/m4/ax_gcc_version.m4
prereq-0.9/m4/ax_gxx_option.m4
prereq-0.9/m4/ax_gxx_version.m4
prereq-0.9/m4/ax_prog_perl_version.m4
prereq-0.9/m4/ax_with_perl.4
prereq-0.9/autom4te.cache/output.0
prereq-0.9/autom4te.cache/output.1
prereq-0.9/autom4te.cache/output.2
prereq-0.9/autom4te.cache/requests
prereq-0.9/autom4te.cache/traces.0
prereq-0.9/autom4te.cache/traces.1
prereq-0.9/autom4te.cache/traces.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... /lib/cpp
configure: error: in `/home/name/Applications/sage-4.7.1/spkg/build/
prereq-0.9':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: You do not have all of the prerequisites needed
to build Sage from source. See the errors above.
make[1]: *** [installed/prereq-0.9] Error 1
make[1]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg'

real 0m4.826s
user 0m0.444s
sys 0m0.560s
Error building Sage.
make: *** [build] Error 1




Do I need to run make as root?
Any idea about what has caused the error?

Maarten Derickx

unread,
Sep 25, 2011, 12:03:23 PM9/25/11
to sage-s...@googlegroups.com
You should not neet to run installing as root. The error seems to be caused by the fact that your C preprosessor as located in /lib/cpp is behaving different from what sage expects. Can you show what is in config.log file?

John H Palmieri

unread,
Sep 25, 2011, 12:21:28 PM9/25/11
to sage-s...@googlegroups.com
On Sunday, September 25, 2011 9:03:23 AM UTC-7, Maarten Derickx wrote:
You should not neet to run installing as root. The error seems to be caused by the fact that your C preprosessor as located in /lib/cpp is behaving different from what sage expects. Can you show what is in config.log file?

To clarify, do you mean the file SAGE_ROOT/spkg/build/prereq-0.9/config.log?

--
John

jsymons

unread,
Sep 25, 2011, 1:02:46 PM9/25/11
to sage-support
Hi Maarten!
Hi John!

1) My cpp executable is in /lib64/ not in /lib/, and links to /usr/
bin/cpp
Maybe this is the error. If you know how to solve it, please,
tell me step by step how to do it. Thanks!

2) Yes, the file is SAGE_ROOT/spkg/build/prereq-0.9/config.log
Here is the content:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Sage configure x.y.z, which was
generated by GNU Autoconf 2.68. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = computer
uname -m = x86_64
uname -r = 2.6.37.6
uname -s = Linux
uname -v = #1 SMP Wed Mar 30 15:28:53 EEST 2011

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /home/name/Applications/sage-4.7.1
PATH: /home/name/Applications/sage-4.7.1/local/bin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /bin
PATH: /sbin
PATH: /opt/bin
PATH: /opt/sun-jre/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2341: checking for a BSD-compatible install
configure:2409: result: /usr/bin/install -c
configure:2420: checking whether build environment is sane
configure:2470: result: yes
configure:2611: checking for a thread-safe mkdir -p
configure:2650: result: /bin/mkdir -p
configure:2663: checking for gawk
configure:2679: found /bin/gawk
configure:2690: result: gawk
configure:2701: checking whether make sets $(MAKE)
configure:2723: result: yes
configure:2815: checking build system type
configure:2829: result: x86_64-unknown-linux-gnu
configure:2849: checking host system type
configure:2862: result: x86_64-unknown-linux-gnu
configure:2948: checking for gcc
configure:2964: found /usr/bin/gcc
configure:2975: result: gcc
configure:3204: checking for C compiler version
configure:3213: gcc --version >&5
gcc (Pardus Linux) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

configure:3224: $? = 0
configure:3213: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr --bindir=/usr/bin --
libdir=/usr/lib
--libexecdir=/usr/lib --includedir=/usr/include --mandir=/usr/share/
man
--infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++
--build=x86_64-pc-linux-gnu --disable-libgcj --disable-nls --disable-
mudflap
--disable-libmudflap --disable-libunwind-exceptions --enable-
checking=release
--enable-clocale=gnu --enable-__cxa_atexit
--enable-languages=c,c++,fortran,objc,obj-c++,lto
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-
shared
--enable-ssp --disable-libssp --enable-plugin --enable-threads=posix
--without-included-gettext --with-arch_32=i686 --with-system-libunwind
--enable-multilib --with-tune=generic --with-system-zlib --with-
tune=generic
--with-pkgversion='Pardus Linux' --with-bugurl=http://
bugs.pardus.org.tr
Thread model: posix
gcc version 4.5.3 (Pardus Linux)
configure:3224: $? = 0
configure:3213: gcc -V >&5
gcc: '-V' option must have argument
configure:3224: $? = 1
configure:3213: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:3224: $? = 1
configure:3244: checking whether the C compiler works
configure:3266: gcc conftest.c >&5
configure:3270: $? = 0
configure:3318: result: yes
configure:3321: checking for C compiler default output file name
configure:3323: result: a.out
configure:3329: checking for suffix of executables
configure:3336: gcc -o conftest conftest.c >&5
configure:3340: $? = 0
configure:3362: result:
configure:3384: checking whether we are cross compiling
configure:3392: gcc -o conftest conftest.c >&5
configure:3396: $? = 0
configure:3403: ./conftest
configure:3407: $? = 0
configure:3422: result: no
configure:3427: checking for suffix of object files
configure:3449: gcc -c conftest.c >&5
configure:3453: $? = 0
configure:3474: result: o
configure:3478: checking whether we are using the GNU C compiler
configure:3497: gcc -c conftest.c >&5
configure:3497: $? = 0
configure:3506: result: yes
configure:3515: checking whether gcc accepts -g
configure:3535: gcc -c -g conftest.c >&5
configure:3535: $? = 0
configure:3576: result: yes
configure:3593: checking for gcc option to accept ISO C89
configure:3657: gcc -c -g -O2 conftest.c >&5
configure:3657: $? = 0
configure:3670: result: none needed
configure:3701: checking for style of include used by make
configure:3729: result: GNU
configure:3754: checking dependency style of gcc
configure:3864: result: gcc3
configure:3937: checking for g++
configure:3953: found /usr/bin/g++
configure:3964: result: g++
configure:3991: checking for C++ compiler version
configure:4000: g++ --version >&5
g++ (Pardus Linux) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

configure:4011: $? = 0
configure:4000: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/usr --bindir=/usr/bin --
libdir=/usr/lib
--libexecdir=/usr/lib --includedir=/usr/include --mandir=/usr/share/
man
--infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++
--build=x86_64-pc-linux-gnu --disable-libgcj --disable-nls --disable-
mudflap
--disable-libmudflap --disable-libunwind-exceptions --enable-
checking=release
--enable-clocale=gnu --enable-__cxa_atexit
--enable-languages=c,c++,fortran,objc,obj-c++,lto
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-
shared
--enable-ssp --disable-libssp --enable-plugin --enable-threads=posix
--without-included-gettext --with-arch_32=i686 --with-system-libunwind
--enable-multilib --with-tune=generic --with-system-zlib --with-
tune=generic
--with-pkgversion='Pardus Linux' --with-bugurl=http://
bugs.pardus.org.tr
Thread model: posix
gcc version 4.5.3 (Pardus Linux)
configure:4011: $? = 0
configure:4000: g++ -V >&5
g++: '-V' option must have argument
configure:4011: $? = 1
configure:4000: g++ -qversion >&5
g++: unrecognized option '-qversion'
g++: no input files
configure:4011: $? = 1
configure:4015: checking whether we are using the GNU C++ compiler
configure:4034: g++ -c conftest.cpp >&5
configure:4034: $? = 0
configure:4043: result: yes
configure:4052: checking whether g++ accepts -g
configure:4072: g++ -c -g conftest.cpp >&5
configure:4072: $? = 0
configure:4113: result: yes
configure:4138: checking dependency style of g++
configure:4248: result: gcc3
configure:4268: checking how to run the C preprocessor
configure:4299: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4299: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4299: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:362:0,
from /usr/include/assert.h:38,
from conftest.c:15:
/usr/include/sys/cdefs.h:32:3: error: #error "You need a ISO C
conforming
compiler to use the glibc headers"

*** 1 errors, 0 warnings
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4299: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:362:0,
from /usr/include/assert.h:38,
from conftest.c:15:
/usr/include/sys/cdefs.h:32:3: error: #error "You need a ISO C
conforming
compiler to use the glibc headers"

*** 1 errors, 0 warnings
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4299: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4299: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4299: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4338: result: /lib/cpp
configure:4358: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4358: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4358: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:157:0,
from /usr/include/limits.h:145,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:169,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/syslimits.h:7,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/limits.h:34,
from conftest.c:12:
/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file
or directory
compilation terminated.
configure:4358: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Sage"
| #define PACKAGE_TARNAME "sage"
| #define PACKAGE_VERSION "x.y.z"
| #define PACKAGE_STRING "Sage x.y.z"
| #define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "sage"
| #define VERSION "x.y.z"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:4388: error: in
`/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9':
configure:4390: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=
ac_cv_env_FC_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_SAGE64_set=
ac_cv_env_SAGE64_value=
ac_cv_env_SAGE_FORTRAN_LIB_set=
ac_cv_env_SAGE_FORTRAN_LIB_value=
ac_cv_env_SAGE_FORTRAN_set=
ac_cv_env_SAGE_FORTRAN_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP=/lib/cpp
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/missing --run
aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/name/Applications/sage-4.7.1/spkg/build/
prereq-0.9/missing
--run tar'
AUTOCONF='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/missing --run
autoconf'
AUTOHEADER='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/missing --run
autoheader'
AUTOMAKE='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/missing --run
automake-1.11'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='/lib/cpp'
CPPFLAGS=''
CXX='g++'
CXXCPP=''
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -O2'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FC=''
FCFLAGS=''
GCC_VERSION=''
GREP=''
GXX_VERSION=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/missing --run
makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT='o'
PACKAGE='sage'
PACKAGE_BUGREPORT='sage-...@googlegroups.com'
PACKAGE_NAME='Sage'
PACKAGE_STRING='Sage x.y.z'
PACKAGE_TARNAME='sage'
PACKAGE_URL=''
PACKAGE_VERSION='x.y.z'
PATH_SEPARATOR=':'
PERL=''
SAGE64=''
SAGE_FORTRAN=''
SAGE_FORTRAN_LIB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='x.y.z'
YACC=''
YFLAGS=''
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_FC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
found_ar=''
found_bash=''
found_latex=''
found_ld=''
found_m4=''
found_ranlib=''
found_strip=''
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL}
/home/name/Applications/sage-4.7.1/spkg/build/prereq-0.9/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "Sage"
#define PACKAGE_TARNAME "sage"
#define PACKAGE_VERSION "x.y.z"
#define PACKAGE_STRING "Sage x.y.z"
#define PACKAGE_BUGREPORT "sage-...@googlegroups.com"
#define PACKAGE_URL ""
#define PACKAGE "sage"
#define VERSION "x.y.z"

configure: exit 1

jsymons

unread,
Sep 25, 2011, 1:08:47 PM9/25/11
to sage-support
WAIT!
It is also in /lib/ and links to /usr/bin/cpp

Maarten Derickx

unread,
Sep 25, 2011, 1:57:50 PM9/25/11
to sage-s...@googlegroups.com
It seems that the error is that on your system you cannot include the c header file limits.h . But this is a file which is part of the C standard library and hence including it should work on any system with gcc installed. From this I conclude that gcc shipped with your linux distro (pradus linux right?) is broken. You should ask them on how to fix this problem.

The shortest way to test it my above interpretation of your logs is indeed correct is by seeing if excecuting:

echo "#include <limits.h>" | cpp

gives any errors. If so my interpretation is correct.

D. S. McNeil

unread,
Sep 25, 2011, 2:14:54 PM9/25/11
to sage-s...@googlegroups.com
> The shortest way to test it my above interpretation of your logs is indeed
> correct is by seeing if excecuting:
> echo "#include <limits.h>" | cpp
>
> gives any errors. If so my interpretation is correct.

And if it is, which seems likely, there's probably a kernel headers
package missing. Googling suggests it's probably called
kernel-headers in Pardus, but maybe kernel-module-headers or
kernel-source or something.


Doug

jsymons

unread,
Sep 25, 2011, 5:07:05 PM9/25/11
to sage-support
Yes, the echo "#include <limits.h>" | cpp gave a fatal error:

/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No
such file or directory

After installing the packages kernel-headers, kernel-module-headers,
and kernel-docs,

sage has been compiling until another error:



***********************************************************************************************
***********************************************************************************************
gnutls_compress_int.c: In function '_gnutls_comp_init':
gnutls_compress_int.c:119:33: error: 'LZO1X_1_MEM_COMPRESS' undeclared
(first use in this function)
gnutls_compress_int.c:119:33: note: each undeclared identifier is
reported only once for each function it appears in
gnutls_compress_int.c: In function '_gnutls_compress':
gnutls_compress_int.c:193:2: error: 'lzo_uint' undeclared (first use
in this function)
gnutls_compress_int.c:193:11: error: expected ';' before 'out_len'
gnutls_compress_int.c:208:7: error: 'out_len' undeclared (first use in
this function)
gnutls_compress_int.c:210:13: error: 'LZO_E_OK' undeclared (first use
in this function)
gnutls_compress_int.c: In function '_gnutls_decompress':
gnutls_compress_int.c:307:2: error: 'lzo_uint' undeclared (first use
in this function)
gnutls_compress_int.c:307:11: error: expected ';' before 'out_size'
gnutls_compress_int.c:308:11: error: expected ';' before 'new_size'
gnutls_compress_int.c:314:2: error: 'out_size' undeclared (first use
in this function)
gnutls_compress_int.c:327:6: error: 'new_size' undeclared (first use
in this function)
gnutls_compress_int.c:334:17: error: 'LZO_E_OUTPUT_OVERRUN' undeclared
(first use in this function)
gnutls_compress_int.c:336:13: error: 'LZO_E_OK' undeclared (first use
in this function)

*** 12 errors, 0 warnings
make[5]: *** [gnutls_compress_int.lo] Error 1
make[5]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg/
build/gnutls-2.2.1.p5/src/lib'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg/
build/gnutls-2.2.1.p5/src/lib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg/
build/gnutls-2.2.1.p5/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg/
build/gnutls-2.2.1.p5/src'
failed to build GNUTLS

real 0m43.227s
user 0m21.998s
sys 0m17.431s
sage: An error occurred while installing gnutls-2.2.1.p5
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /home/name/Applications/sage-4.7.1/install.log. Describe your
computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/name/Applications/sage-4.7.1/spkg/build/gnutls-2.2.1.p5 and type
'make check' 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/name/Applications/sage-4.7.1/spkg/build/gnutls-2.2.1.p5' &&
'/home/name/Applications/sage-4.7.1/sage' -sh)
When you are done debugging, you can type "exit" to leave the
subshell.
make[1]: *** [installed/gnutls-2.2.1.p5] Error 1
make[1]: Leaving directory `/home/name/Applications/sage-4.7.1/spkg'

real 3m56.794s
user 2m25.054s
sys 1m4.351s
Error building Sage.
make: *** [build] Error 1
***********************************************************************************************
***********************************************************************************************


I have got installed in my system gnutls, gnutls-devel version 2.12.3
and libtasn1 and libtasn1-devel version 2.7

Any idea?

Thanks!






jsymons

unread,
Sep 25, 2011, 5:26:17 PM9/25/11
to sage-support
Well, I had installed lzo but not lzo-devel. Now, it seems OK.

Still compiling. I will keep you updated. Cheers!

jsymons

unread,
Sep 27, 2011, 5:04:05 PM9/27/11
to sage-support
Another error:



libImaging/Jpeg.h:11:21: fatal error: jpeglib.h: No such file or
directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Warning: Failed to install PIL with TK, retrying without TK support...
Disabling Tkinter (Tcl/Tk) support in PIL build.
running install
running build
running build_py
running build_ext
Searching the following library directories:
['/home/name/Applications/sage-4.7.1/local/lib', '/usr/local/lib', '/
usr/lib', '/home/name/Applications/sage-4.7.1/local/lib']
Searching the following include directories:
['libImaging', '/home/name/Applications/sage-4.7.1/local/include', '/
usr/local/include', '/usr/include', '/home/name/Applications/
sage-4.7.1/local/include/python2.6']
building '_imaging' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-
prototypes -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -I/home/name/Applications/
sage-4.7.1/local/include/freetype2 -IlibImaging -I/home/name/
Applications/sage-4.7.1/local/include -I/usr/local/include -I/usr/
include -I/home/name/Applications/sage-4.7.1/local/include/python2.6 -
c decode.c -o build/temp.linux-x86_64-2.6/decode.o
In file included from decode.c:653:0:
libImaging/Jpeg.h:11:21: fatal error: jpeglib.h: No such file or
directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Error building / installing PIL



How to solve this step?

jsymons

unread,
Sep 28, 2011, 2:03:21 PM9/28/11
to sage-support
I succesfully compiled from sources sage-4.7.1 on Pardus 2011.1 x86_64

using only this repository

http://packages.pardus.org.tr/pardus/2011.1/stable/x86_64/pisi-index.xml.xz

and these upgrades

FreeImage-devel is upgraded from 3.15.0-7-p11-x86_64 to 3.15.0-10-p11-
x86_64
FreeImage is upgraded from 3.15.0-7-p11-x86_64 to 3.15.0-10-p11-
x86_64

from here

http://packages.pardus.org.tr/pardus/2011.1/devel/x86_64/


The sources of sage-4.7.1 can be found here

http://www.sagemath.org/download-source.html

Just unpack, cd to the directory of sage-4.7.1 and (without root
permissions)
type make. It lasted approximately 5 hours on my computer.

More information:

http://www.sagemath.org/doc/installation/source.html#install-from-source-code
Reply all
Reply to author
Forward
0 new messages