From owner-bug-octave at bevo dot che dot wisc dot edu Mon Nov 11 17:12:49 1996 Subject: Re: Problems in octave-1.90 From: Joao Cardoso To: jwe at bevo dot che dot wisc dot edu Cc: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 11 Nov 96 22:57:31 GMT >On 4-Nov-1996, Joao Cardoso wrote: > >: 2-The Makefile in libcruft has a very long string. My _kernel_ only >: accepts strings up to 5Kbytes, so I have to split it as follows: > >I didn't get a chance to fix this for 1.91, but it is fixed now, by >shifting the responsibility for inserting object files in libcruft.a >from the top-level libcruft Makefile to the individual makefiles in >the subdirectories of libcruft. Thanks. some other problems in octave-1.90 with sco-3.2v4.0 and gcc-2.7.2 that might help you (and me...) 1- in info/terminal.c I add the following lines (not a diff) #ifdef HAVE_CONFIG_H #include #endif #include #include +#include // jc: needed to include +#include // jc: struct winsize is declared here #include "terminal.h" #include "termdep.h" extern void *xmalloc (), *xrealloc (); 2-in readline/readline.c same problem void _rl_set_screen_size (tty, ignore_env) int tty, ignore_env; { #if defined (TIOCGWINSZ) +#include // jc: needed to include +#include // jc: struct winsize is declared here struct winsize window_size; #endif /* TIOCGWINSZ */ 3- in readline/rltty.c the same problem static int get_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { int ioctl_ret; #if !defined (SHELL) && defined (TIOCGWINSZ) +#include // jc: needed to include +#include // jc: struct winsize is declared here struct winsize w; if (ioctl (tty, TIOCGWINSZ, &w) == 0) (void) ioctl (tty, TIOCSWINSZ, &w); #endif 4-after compiling octave, I got a SIGSEGV in liboctave/octave_ieee_init.cc. The reason is that my system has isnan() but not isinf()!. Also, my system has fpsetmask(), declared in , and does not have , so SIGFPE was not ignored. Further, isnan() is broken, so perhaps configure should check for this? After creating isnan() and isinf() from some macros defined in , adding them to libiberty.a, deleting isnan() from libc.a (!) adding -liberty to the LIBS environment before runing configure, I was able to start octave. Uff! My isnan() and isinf(): (are they correct? they give the right anwsers to test/octave.test/infnan/*) #define _IEEE 1 #include "nan.h" int isnan(double x) { return (IsNANorINF(x) && NaN(x)) ? 1 : 0; } int isinf(double x) { return (IsNANorINF(x) && IsINF(x)) ? 1 : 0; } Note: in octave-1.1.0 I was able to convince configure that my system does not has isnan(). 5-After this, octave did not catch SIGCHLD. When the pager (more) finish, octave got stuck, as the 'more' process became defunt. The system has HAVE_POSIX_SIGNALS. I comment the rearming of sigaction at sigchld_handler() and it start working. 'warning: broken pipe' is now displayed if I quit the pager ('q') Note: in 1.1.0 this was not needed 6-but this seems to be just a hack, as I was not able to plot nothing: after ploting, I get the following list from 'ps': root 6719 583 0 22:14:56 p3 0:00 ./octave root 6743 6719 0 22:15:10 p3 0:00 sh -c gnuplot root 6747 6743 0 22:15:10 p3 0:00 gnuplot root 6748 6747 0 22:15:12 p3 0:00 sh -c gnuplot_x11 root 6749 6748 0 22:15:12 p3 0:00 gnuplot_x11 root 6750 6749 0 0:00 The file generated in /usr/tmp/oct-xxx can be ploted from gnuplot, is this is invoqued from the command line. Gnuplot is patchlevel 315, with frames and multiplot, and works OK with octave-1.1.0. After generating a gnuplot defunt process, octave does not obey the quit command; only killing the main gnuplot process release octave (waiting in wait()?) I am now stuck with this. Note: after running octave from DDD (a X debuger based in gdb), single stepping in sigchld_handler(), etc, etc, I was able to see plots, but I am not able to reproduce the commands... It seems to be just a problem of initializing, as after it start working, it worked OK. 7-Here is a fragment of a configure that auto-detects SCO. Unfortunatelly cpp does not define a sco or SCO symbol that one could test for at compile time. ac_cv_sco=no case `uname -m`:`uname -r` in i[34]86:3.2) if test -f /usr/options/cb.name; then ac_cv_sco=no elif /bin/uname -X 2>/dev/null >/dev/null ; then ac_cv_sco=yes fi esac fi Thanks for octave and any further help, joao -- Joao Cardoso, INESC | e-mail: jcardoso at inescn dot pt R. Jose Falcao 110 | tel: + 351 2 2094345 4000 Porto, Portugal | fax: + 351 2 2008487