From owner-help-octave at bevo dot che dot wisc dot edu Tue Jan 21 11:00:36 1997 Subject: Install Octave 2.0.1 on Sparc20 And MkLinux From: "John W. Eaton" To: "Jay J. Williams" Cc: help-octave at bevo dot che dot wisc dot edu Date: Tue, 21 Jan 1997 10:59:20 -0600 On 17-Jan-1997, Jay J. Williams wrote: : I've been trying to get Octave to compile on a sprac20 workstation and : my MkLinux system at home. I'm using g++ version 2.7.2 : : On the Sparc20 I get the following error: : : c++ -c -I. -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc : -DHAVE_CONFIG_H -fno-implicit-templates -g -O2 -Wall sighandlers.cc : sighandlers.cc: In function `void my_friendly_exit(const char *, int)': : sighandlers.cc:128: passing `void (*)()' as argument 2 of : `octave_set_signal_handler(int, int (*)(int))' : sighandlers.cc: In function `int (* octave_set_signal_handler(int, int : (*)(int)))(int)': : sighandlers.cc:168: assignment to `void (*)(...)' from `int (*)(int)' This looks like the same problem with incorrect definitions of SIG_IGN, SIG_DFL, or SIG_ERR in signal.h and maybe sys/signal.h. My current version of INSTALL.OCTAVE says: * If you encounter errors like passing `void (*)()' as argument 2 of `octave_set_signal_handler(int, void (*)(int))' or warning: ANSI C++ prohibits conversion from `(int)' to `(...)' while compiling `sighandlers.cc', you may need to edit some files in the gcc include subdirectory to add proper prototypes for functions there. For example, Ultrix 4.2 needs proper declarations for the `signal()' and the `SIG_IGN' macro in the file `signal.h'. On some systems the `SIG_IGN' macro is defined to be something like this: #define SIG_IGN (void (*)())1 when it should really be something like: #define SIG_IGN (void (*)(int))1 to match the prototype declaration for `signal()'. This change should also be made for the `SIG_DFL' and `SIG_ERR' symbols. It may be necessary to change the definitions in `sys/signal.h' as well. The gcc fixincludes/fixproto script should probably fix these problems when gcc installs its modified set of header files, but I don't think that's been done yet. : sighandlers.cc: In function `int sigchld_handler(int)': : sighandlers.cc:243: warning: `return' with no value, in function returning : non-void But this looks like configure found that the return type for signal() on your system is void, but it is declared to return int when compiling starts. You'll need to figure out why that is happening. Do you have g++ and libg++ properly installed? : Under MkLinux I'm lost here: : /usr/lib/libm.a(cabs.o): In function `z_abs': : cabs.o(.text+0x268): multiple definition of `z_abs' : /usr/lib/libF77.a(z_abs.o)(.text+0x4): first defined here Apparently libm and libF77 both define z_abs. I don't know if they are the same function or if they are even supposed to do the same thing. If they are compatible, it would probably be best to remove the z_abs function from libF77 (you need libm to use that anyway, I think). : octave.o: In function `str_vec_compare(void const *, void const *)': : /home/beta/src/octave-2.0.1/src/../liboctave/str-vec.h:38: undefined : reference to `basic_string : >::compare(basic_string > const &, : unsigned long, unsigned long) const' : octave.o: In function `initialize_globals(basic_string > const &)': : /home/beta/src/octave-2.0.1/src/octave.cc:199: undefined reference to : `basic_string >::rfind(char, unsigned : long) const' : octave.o: In function `initialize_globals(basic_string > const &)': I don't know why string::compare (const string&, unsigned long, unsigned long) const string::rfind (char, unsigned long) const would be missing from libstdc++ on your system. What does nm /path/to/libstdc++.a | c++filt | grep compare show? jwe