complex.h: present but cannot be compiled

204 views
Skip to first unread message

zieglerk

unread,
Feb 20, 2010, 7:38:15 AM2/20/10
to sage-devel
Hi,

I am running OpenSUSE 11.1 and had problems with the last binaries (or
at least, that's what I am assuming for the moment), so I want to
build
sage from source. I checked all dependencies given on

http://www.sagemath.org/doc/installation/source.html

Still, ``make'' fails and the first warning -- along with the request
to
report it -- is given below.

configure: WARNING: complex.h: present but cannot be compiled
configure: WARNING: complex.h: check for missing prerequisite
headers?
configure: WARNING: complex.h: see the Autoconf documentation
configure: WARNING: complex.h: section "Present But Cannot Be
Compiled"
configure: WARNING: complex.h: proceeding with the preprocessor's
result
configure: WARNING: complex.h: in the future, the compiler will take
precedence
configure: WARNING: ## ------------------------------------------
##
configure: WARNING: ## Report this to sage-...@googlegroups.com
##
configure: WARNING: ## ------------------------------------------
##
checking for complex.h... yes
checking whether we are using the GNU Fortran compiler... (cached) yes
checking whether gfortran accepts -g... (cached) yes
checking for Fortran flag needed to allow free-form source... -ffree-
form
configure: Your Fortran compiler accepts free-format source code
configure: which older F77 compilers do not. This does not 100%
configure: guarantee your compiler is suitable for building SAGE
configure: but it probably is.
configure: You are trying to use gcc but not g++
configure: error: The mixing of GNU and non-GNU compilers is not
permitted
ERROR: You do not have all of the prerequisites needed to build Sage
from source. See the errors above.

Alex Ghitza

unread,
Feb 20, 2010, 7:51:12 AM2/20/10
to zieglerk, sage-devel
On Sat, 20 Feb 2010 04:38:15 -0800 (PST), zieglerk <konstanti...@gmail.com> wrote:
> configure: You are trying to use gcc but not g++

To me this looks like you do not have g++ installed. I googled it and
it seems that the relevant package to install is called 'gcc-c++'. Can
you try to install that with your package manager?


Best,
Alex

--
Alex Ghitza -- http://aghitza.org/
Lecturer in Mathematics -- The University of Melbourne -- Australia

Dr David Kirkby

unread,
Feb 21, 2010, 1:47:56 AM2/21/10
to sage-devel

Could you post more of the output from the 'prereq-0.7' script. You
should get something like this.

prereq-0.7/aclocal.m4
prereq-0.7/install-sh
prereq-0.7/configure
prereq-0.7/Makefile.in
prereq-0.7/config.sub
prereq-0.7/config.guess
prereq-0.7/Makefile.am
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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... gcc -E
checking for gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for bison... bison -y
checking for ar... yes
checking for m4... yes
checking for ranlib... yes
checking for ld... yes
checking for strip... yes
checking for bash... yes
checking for latex... no
configure: WARNING: You do not have 'latex', which is recommended, but
not
configure: WARNING: required. Latex is only really used for building
pdf
configure: WARNING: documents and for %latex mode in the Sage
notebook.
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep
checking for egrep... /usr/sfw/bin/ggrep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking complex.h usability... yes
checking complex.h presence... yes


checking for complex.h... yes
checking whether we are using the GNU Fortran compiler... (cached) yes
checking whether gfortran accepts -g... (cached) yes
checking for Fortran flag needed to allow free-form source... -ffree-
form
configure: Your Fortran compiler accepts free-format source code
configure: which older F77 compilers do not. This does not 100%
configure: guarantee your compiler is suitable for building SAGE
configure: but it probably is.

checking if gcc accepts -dumpversion option... yes
checking gcc version... 4.4.3
checking if g++ accepts -dumpversion option... yes
checking g++ version... 4.4.3
configure: Excellent, the C, C++ and Fortran compilers are all GCC
4.4.3
configure: Excellent, GCC 4.4.3 is later than the minimum
configure: needed to build Sage, which is GCC version 4.0.1
checking for sqrtl in -lm... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands

In particular, do you see:

checking for g++... g++
checking whether we are using the GNU C++ compiler... yes

I believe you have found a bug in the prereq script, as this is
indicating you are mixing GNU and non-GNU compilers, which I doubt
could happen on Suse. That test was put in place for systems like
Solaris, HP-UX, AIX etc where compilers from Sun, HP or IBM may be
present in addition to the GNU compilers.

Dave

zieglerk

unread,
Feb 22, 2010, 5:50:09 PM2/22/10
to sage-devel
Alex's tip was correct.

After installing the package gcc-c++ everything compiled smoothly.
The problem was, that with OpenSUSE installing the package gcc (as
mentioned on http://www.sagemath.org/doc/installation/source.html)
does not automatically install gcc-c++, too. (This is possibly
trivial for people who are familiar with gcc or maybe a deficit of
OpenSUSE?)

So, thank's for the quick help.
Konstantin

On Feb 21, 7:47 am, Dr David Kirkby <drkir...@gmail.com> wrote:

Dr. David Kirkby

unread,
Feb 22, 2010, 6:00:51 PM2/22/10
to sage-...@googlegroups.com
zieglerk wrote:
> Alex's tip was correct.
>
> After installing the package gcc-c++ everything compiled smoothly.
> The problem was, that with OpenSUSE installing the package gcc (as
> mentioned on http://www.sagemath.org/doc/installation/source.html)
> does not automatically install gcc-c++, too. (This is possibly
> trivial for people who are familiar with gcc or maybe a deficit of
> OpenSUSE?)
>
> So, thank's for the quick help.
> Konstantin

Could you please post the first part of your log file, where this faillure occured?

It is good you have solved this, but I would dearly like to change the
perquisite checks for Sage to ensure that g++ is present and working. Knowing
exactly what when wrong with your build would really help this.

Dave

Alex Ghitza

unread,
Feb 22, 2010, 6:13:12 PM2/22/10
to zieglerk, sage-devel
On Mon, 22 Feb 2010 14:50:09 -0800 (PST), zieglerk <konstanti...@gmail.com> wrote:
> Alex's tip was correct.

Glad to hear it worked for you.

> After installing the package gcc-c++ everything compiled smoothly.
> The problem was, that with OpenSUSE installing the package gcc (as
> mentioned on http://www.sagemath.org/doc/installation/source.html)
> does not automatically install gcc-c++, too. (This is possibly
> trivial for people who are familiar with gcc or maybe a deficit of
> OpenSUSE?)

A lot of Linux distributions have their quirks, so it's often impossible
(or useless) to give precise generic instructions in regards to
prerequisites, etc. It might be good for us to collect these
distribution-specific issues and put them, for instance, on the wiki.

Reply all
Reply to author
Forward
0 new messages