[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Octave-2.1.31 on an alpha
From: |
John W. Eaton |
Subject: |
Octave-2.1.31 on an alpha |
Date: |
Tue, 18 Jul 2000 14:31:55 -0500 (CDT) |
On 18-Jul-2000, A Scottedward Hodel <address@hidden> wrote:
| I'm attempting to install Octave -2.1.31 on our alpha here. I have been
unable
| to compile since roughly version 2.1.28 (currently using 2.1.24).
|
| The error message is below. I've spent some time digging in the configure
| script and in liboctave/oct-time.cc to find the source of the problem.
| For some reason, the compilation of oct-time.cc does not define _OSF_SOURCE
| whereas the default configure script test case (using gcc or g++) does.
|
| This is the test C program compiled by the configure script (with a
| hand modification to confirm that _OSF_SOURCE is defined):
|
| #line 6130 "configure"
| #include "confdefs.h"
| #include <sys/types.h>
| #include <sys/time.h>
|
| #ifdef _OSF_SOURCE
| #else
| THIS SHOULD BE IGNORED
| #endif
|
| int main() {
| struct tm tm; tm.tm_zone;
| ; return 0; }
|
| The program compiles without error whether I use gcc conftest.c or
| g++ conftest.cc as compilation commands, so apparently _OSF_SOURCE is
| available by default. However, when running a compile in Octave, I get
| c++ -c -I. -I.. -I../liboctave -I../src -I../libcruft/misc
| -I../glob -I../glob -DHAVE_CONFIG_H -mieee-with-inexact -fno-rtti
| -fno-exceptions -fno-implicit-templates -g -O2 -Wall oct-time.cc -o
| oct-time.o
| oct-time.cc: In method `octave_time::octave_time(const octave_base_tm &)':
| oct-time.cc:89: `struct tm' has no member named `tm_zone'
| oct-time.cc: In method `class string octave_base_tm::strftime(const
| string &) const':
| oct-time.cc:185: `struct tm' has no member named `tm_zone'
| oct-time.cc: In method `void octave_base_tm::init(void *)':
| oct-time.cc:232: `struct tm' has no member named `tm_zone'
| oct-time.cc: In method `void octave_strptime::init(const string &,
| const string &)':
| oct-time.cc:276: `struct tm' has no member named `tm_zone'
|
|
| The offending structure element is conditionally compiled in the time.h
| header file based on _OSF_SOURCE being defined.
|
| I can compile oct-time.cc by typing "make CXXFLAGS="$CXXFLAGS -D_OSF_SOURCE".
| This looks like some change needs to be added to the alpha.*osf.*
| part of the configure script. I tried using CXXPICFLAGS but that didn't
| do the job.
I think the trouble is this code from oct-time.cc:
// I am told that without _BSD_SOURCE, tm_zone won't be declared on
// some systems. Defining _XOPEN_SOURCE provides the declaration for
// strptime on some others.
//
// These defines go here, before any system header files are included,
// because the system header files may define other macros that are
// actually used to determine the feature set. If we wait until after
// some system header file is included, it may be too late.
#if !defined (_BSD_SOURCE)
#define _BSD_SOURCE 1
#define OCTAVE_UNDEFINE_BSD_SOURCE
#endif
#if !defined (_XOPEN_SOURCE)
#define _XOPEN_SOURCE 1
#define OCTAVE_UNDEFINE_XOPEN_SOURCE
#endif
If you remove these definitions, then oct-time.cc should compile on
your system. Unfortunately, these defines may be needed on some
systems. I suppose we need a better way of testing this. Any
volunteers?
BTW, please report problems with the development sources to the
octave-maintainers mailing list.
Thanks,
jwe
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------