[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem installing Octave on Mac OS 10.2

From: Per Persson
Subject: Re: Problem installing Octave on Mac OS 10.2
Date: Fri, 20 Sep 2002 17:43:21 +0200

jwe wrote:

I've checked in some changes so that instead of
we now have

  #pragma interface

and then in config.h,

  #if defined  (__GNUG__)

so that you only have to change one line (you'll need to update, run
autoconf and then configure again to regenerate the config.h file).


If you can tell me what preprocessor macros and versions of g++ have
the bug (or better, some way to test for the bug, so we don't have to
rely on version info), then we could add that information to the
generated config.h file so that you would not need to make any change
at all after running configure.

OK, I'll try ;-)

% gcc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420 (prerelease)

The version number is contained in macro __APPLE_CC__ and the bug is present in 1151 and 1161 (released versions, inbetween numbers are non-release versions) and apparently pertains in 1199, see below.

I'm sure exactly what is needed for a test, but this snippet (from a different discussion) would probably be sufficient:

I just got gcc3-1199 compiled (with updated bootstrap_cmds, Libstreams and cctools). I found an interesting bug (reported on with declaring a virtual destructor when using both #pragma implementation and #pragma interface.


#pragma interface

class Foo {
    virtual ~Foo() {}


#pragma implementation
#include "foo.h"

When I compile this with g++, I get

somebody% g++ -c -o foo.o
foo.h:3: storage size of `_ZTI3Foo' isn't known

If I take out either #pragma implementation or #pragma interface or both, compilation succeeds. If I remove the virtual tag on the destructor, compilation succeeds (with any combination of #pragmas). If I move the #pragma implementation *after* the #include "foo.h", it's also fine (but now in violation of the gcc info page which describes how to use these pragmas == "If you use an explicit #pragma implementation, it must appear in your source file before you include the affected header files.").

Will that do?

| There are a few more quirks, but a lot less than there used to be:-)

If you (or others) can please let me know what the problems are, then
perhaps we can come up with some fixes for the Octave sources to
eliminate most or all of the problems that remain.

In file liboctave/lo-ieee.h there is a problem with isnan() and isinf(). A bug in cmath actually undo the declaration in math.h, meaning that they _do_ exist in libm (which btw is part of libSystem on OS X).

My work-around was to add
extern "C" int isnan (double);
extern "C" int isinf (double);
to lo-ieee.h (as is done for SCO).

That one should be fairly easy to detect I presume.

In file src/c_file_ptr_stream.h the header file
# include <ext/stdio_filebuf.h>
simply doesn't exist so I just skipped the include and everything seems OK, not really sure what this is really about though...

Furhermore, there was (if memory serves me correct) a problem with (a few, maybe just one) multiply-defined symbols (a no-no on OS X) that I had to adress by adding -Xlinker -m to force the linker into linking octave. (I'm still on OS X 10.1.5 until I get octave w. dynamic loading working properly on 10.2, kind of a catch 22;-) Anyhow, I'll switch to 10.2 and rebuild with any changes you make to see what happens.

It would be great to have octave build out-of-the-box, then we could concentrate on things like getting octave to use the built-in (as of 10.2) BLAS and LAPACK, native dynamic loading etc.


Oh, one more thing!
Mac OS X 10.2 identifies itself as "powerpc-apple-darwin6.0" and 10.2.1 (just released) is "powerpc-apple-darwin6.1"

Per Persson
Blekinge Institute of Technology
Dept. of Signal Processing and Telecommunications

e-mail: address@hidden

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]