From bug-octave-request at bevo dot che dot wisc dot edu Thu May 4 22:52:13 2000 Subject: Error compiling octave-2.1.30/liboctave/oct-time.cc - mips-sgi-ir ix6.5 From: "Billinghurst, David (CRTS)" To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 4 May 2000 22:53:55 -0500 (CDT) I get an error compiling octave-2.1.30/liboctave/oct-time.cc on mips-sgi-irix6.5 with gcc-2.95.2 The error is: c++ -c -I. -I/usr/local/imports/octave-2.1.30/liboctave -I.. -I../liboctave -I../src -I../libcruft/misc -I/usr/local/imports/octave-2.1.30 -I/usr/local/imports/octave-2.1.30/liboctave -I/usr/local/imports/octave-2.1.30/src -I/usr/local/imports/octave-2.1.30/libcruft/misc -I/usr/local/imports/octave-2.1.30/glob -I../glob -DHAVE_CONFIG_H -fno-rtti -fno-exceptions -fno-implicit-templates -g -O2 -Wall /usr/local/imports/octave-2.1.30/liboctave/oct-time.cc -o oct-time.o /usr/local/imports/octave-2.1.30/liboctave/oct-time.cc: In method `void octave_time::stamp()': /usr/local/imports/octave-2.1.30/liboctave/oct-time.cc:112: aggregate `struct timeval tp' has incomplete type and cannot be initialized /usr/local/imports/octave-2.1.30/liboctave/oct-time.cc:117: confused by earlier errors, bailing out make: *** [oct-time.o] Error 1 This was raised as http://www.che.wisc.edu/octave/mailing-lists/bug-octave/2000/96 timeval is: * conditionally declared in /usr/include/sys/time.h (see below), and * declared in /usr/include/sys/resource.h To work around I have complied oct-time.cc by hand with -D_BSD_TYPES There will be a better solution. I'll look into it. ############## extract from /usr/include/sys/time.h ####################### #if _XOPEN4UX || defined(_BSD_TYPES) || defined(_BSD_COMPAT) /* * Structure returned by gettimeofday(2) system call, * and used in other calls. * Note this is also defined in sys/resource.h */ #ifndef _TIMEVAL_T #define _TIMEVAL_T struct timeval { #if _MIPS_SZLONG == 64 __int32_t :32; #endif time_t tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------