From bug-octave-request at bevo dot che dot wisc dot edu Fri Nov 27 09:17:53 1998 Subject: Trouble compiling octave---wrong version of gcc? From: Nick Youd To: bug-octave at bevo dot che dot wisc dot edu Cc: nick at merton dot logica dot co dot uk Date: Fri, 27 Nov 1998 15:17:47 GMT Bug report for Octave 2.0.13 configured for sparc-sun-sunos4.1.4 Description: ----------- I'm trying to compile octave and get so far (through all the fortran libraries for example). The problem seems to be in compiling c++ --- I don't know enough of the language to decide whether this comes about because the classes in libg++ are inconsistent with the definitions here, or because my version of gcc can't handle templates of this kind. I'm running gcc/g++ 2.7.2.1 --which according to the documentation should be OK I'd appreciate any suggestions, such as: install an earlier version of octave Thanks Nick Repeat-By: --------- here is an extract from the make output which illustrates the problem making all in liboctave cd liboctave ; /usr/local/bin/make all make[2]: Entering directory `/u4/nick/octave-2.0.13/liboctave' c++ -c -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob -I../glob -DHAVE_CONFIG_H -fno-rtti -fno-implicit-templates -g -O2 -Wall Bounds.cc In file included from mx-defs.h:72, from dColVector.h:32, from Bounds.h:32, from Bounds.cc:33: oct-cmplx.h:28: non-template type `complex' used as a template oct-cmplx.h:28: warning: ANSI C++ forbids typedef which does not specify a type oct-cmplx.h:28: conflicting types for `typedef int Complex' /usr/local/lib/g++-include/complex:18: previous declaration as `class __complex' make[2]: *** [Bounds.o] Error 1 make[2]: Leaving directory `/u4/nick/octave-2.0.13/liboctave' make[1]: *** [liboctave] Error 2 make[1]: Leaving directory `/u4/nick/octave-2.0.13' make: *** [all] Error 2 Fix: --- Configuration (please do not edit this section): ----------------------------------------------- uname output: SunOS merton 4.1.4 2 sun4m configure opts: -prefix=/packages/octave --with-f2c --enable-dl --enable-shared --enable-lite-kernel Fortran compiler: FFLAGS: F2C: f2c F2CFLAGS: FLIBS: CPPFLAGS: INCFLAGS: -I/packages/octave/include -I/packages/octave/include/octave-2.0.13 C compiler: gcc, version 2.7.2.1 CFLAGS: -DHAVE_CONFIG_H -g -O2 -Wall CPICFLAG: -fPIC C++ compiler: c++, version 2.7.2.1 CXXFLAGS: -DHAVE_CONFIG_H -fno-rtti -fno-implicit-templates -g -O2 -Wall CXXPICFLAG: -fPIC LDFLAGS: -g LIBFLAGS: -L/packages/octave/lib/octave-2.0.13 RLD_FLAG: -L/packages/octave/lib/octave-2.0.13 TERMLIBS: -ltermcap LIBS: LEXLIB: LIBPLPLOT: LIBDLFCN: DEFS: -DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" -DUSE_READLINE=1 -DF77_APPEND_UNDERSCORE=1 -DOCTAVE_LITE=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_DIRENT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_ASSERT_H=1 -DHAVE_CURSES_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOAT_H=1 -DHAVE_FLOATINGPOINT_H=1 -DHAVE_GRP_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_NAN_H=1 -DHAVE_PWD_H=1 -DHAVE_SGTTY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_TERMIO_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_VARARGS_H=1 -DHAVE_BCOPY=1 -DHAVE_BZERO=1 -DHAVE_DUP2=1 -DHAVE_ENDGRENT=1 -DHAVE_ENDPWENT=1 -DHAVE_EXECVP=1 -DHAVE_FCNTL=1 -DHAVE_FORK=1 -DHAVE_GETCWD=1 -DHAVE_GETEGID=1 -DHAVE_GETEUID=1 -DHAVE_GETGID=1 -DHAVE_GETGRENT=1 -DHAVE_GETGRGID=1 -DHAVE_GETGRNAM=1 -DHAVE_GETHOSTNAME=1 -DHAVE_GETPGRP=1 -DHAVE_GETPID=1 -D