From owner-bug-octave at bevo dot che dot wisc dot edu Thu Oct 26 14:45:38 1995 Subject: gets SIGSEGV after help From: Mirsad Todorovac To: bug-octave at che dot utexas dot edu Date: Thu, 26 Oct 1995 20:43:15 +0100 Bug report for Octave 1.1.1 configured for sparc-sun-sunos4.1.1 Description: ----------- While compiling with gcc 2.7.0 I had complaints about: a) for (int i; ... ) { scope avoided with -fno-for-scope b) private constructors avoided with -fno-access-control c) obfuscated definitions in header file. Including this file from test C++ source induced no errors I used -D__CSTRING__ to bypass this lines, only on this files that made problems. Repeat-By: --------- Install octave. Pass "make -k". Pass "make -k CXXFLAGS='-g -O2 -fno-for-scope -fno-access-control'" Pass "make -k " " " -D__CSTRING__" After this, octave is installed. I don't have DejaGNU yet, but installation in course. Note: Allthough all definitions had -g (checked visually while compiling), dbx and gdb complain about 'no symbols' !!?!??! Now, start octave: octave:1> help [press enter few times for help to end] octave:2> octave:2> Segmentation fault .... { caught by internal handler, occasionally dumps core, if the weather is good and the moon is rising ... :) } Fix: --- For problem with "in defined variable's scope" refer to g++.FAQ in libg++7.0. Option '-fno-for-scope' is mentioned there and only there. GNU info gcc and man are silent. It should not affect final result, but I recommend some #ifdef's around such definitions, so it would work both with gcc-2.5.8 and gcc-2.7.x . You may be aware that now variable defined in for has scope until the end of the for's body, and that's final now! It's standard and it's ANSI/ISO and it's only few lines of code to be modified. Make your constructors public. That's a way to allow constructing such object in arbitrary place. More details and (GNU) make output on demand. Because of fantomly disapeared symtable, I'm not able to help any further. Hope info about for scope helps at least, but I'm sure you know it allready. ------------------------- I've installed awfull lot of other programs to get octave on the track, and I'm now anxious to see it working... It's five days of compiling and 'make distclean'-ing already!! HELP! Configuration (please do not edit this section): ----------------------------------------------- uname output: SunOS rasips2 4.1.1 3 sun4c Fortran compiler: g77 FFLAGS: -O F2C: F2CFLAGS: FLIBS: -lf2c -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.1/2.7.0 -L/usr/local/lib -lgcc C compiler: gcc CFLAGS: -DHAVE_CONFIG_H -O2 -g C++ compiler: c++ CXXFLAGS: -DHAVE_CONFIG_H -fno-implicit-templates -O2 -g LDFLAGS: -s DEFS: -DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=: -DNPSOL_MISSING=1 -DQPSOL_MISSING=1 -DFSQP_MISSING=1 -DHAVE_STRFTIME=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DWORDS_BIGENDIAN=1 -DIEEE_BIG_ENDIAN=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DF77_APPEND_UNDERSCORE=1 -DHAVE_ASSERT_H=1 -DHAVE_FLOAT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PWD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FLOATINGPOINT_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_FCNTL_H=1 -DHAVE_SYS_TTOLD_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_DIRENT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TERMIOS_H=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1 -DHAVE_GETHOSTNAME=1 -DHAVE_BZERO=1 -DHAVE_BCOPY=1 -DHAVE_RINDEX=1 -DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRICMP=1 -DHAVE_STRNICMP=1 -DHAVE_STRCASECMP=1 -DHAVE_STRNCASECMP=1 -DHAVE_ON_EXIT=1 -DHAVE_TEMPNAM=1 -DHAVE_PUTENV=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_GETRUSAGE=1 -DHAVE_LIBM=1 -DHAVE_FINITE=1 -DHAVE_ISNAN=1 -DHAVE_ISINF=1 -DHAVE_INFINITY=1 -DHAVE_QUIET_NAN=1 -DH