From help-octave-request at bevo dot che dot wisc dot edu Tue Jul 2 13:25:22 2002 Subject: problem to compile octave-2.1.36 on i686/RedHat-7.3 From: "John W. Eaton" To: Ted Sariyski Cc: help-octave at bevo dot che dot wisc dot edu Date: Tue, 2 Jul 2002 13:25:13 -0500 On 2-Jul-2002, Ted Sariyski wrote: | Hi, | | I try to compile octave-2.1.36 on i686/RedHat-7.3 but at the very end I get an | error: | | make[2]: Entering directory `/u/zip/octave/octave-2.1.36/src' | g++ -c -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob -I../glob | -DHAVE_CONFIG_H -mieee-fp -fno-implicit-templates -g -O2 -Wall octave.cc -o octave.o | octave.cc:81: declaration of C function `int on_exit ()' conflicts with | /usr/include/stdlib.h:513: previous declaration `int on_exit (void (*) | (int, void *), void *)' here | octave.cc: In function `int main (int, char **)': | octave.cc:81: too many arguments to function `int on_exit ()' | octave.cc:488: at this point in file | make[2]: *** [octave.o] Error 1 | make[2]: Leaving directory `/u/zip/octave/octave-2.1.36/src' | make[1]: *** [src] Error 2 | make[1]: Leaving directory `/u/zip/octave/octave-2.1.36' | make: *** [all] Error 2 | | What am I missing? The on_exit function is only supposed to be used if atexit doesn't exist. As I recall, this was typically true on older SunOS systems. But atexit is part of standard C and you have a newer system, so why doesn't configure find atexit? It is supposed to be declared in stdlib.h, and octave.cc includes the cstdlib header file, so using atexit should be OK if configure found it. Please send me the relevant parts of config.log. The prototype for on_exit on your system seems to be different from the one on older SunOS systems, which I believe matched atexit, though I no longer have access to any old systems to check. Perhaps it is time to avoid worrying about atexit missing? After all, ANSI C has been around for quite some time now, and I doubt that the current Octave sources will compile and link on systems that don't have a complete ANSI C runtime environment. Comments or suggestions? jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------