Installing Octave 1.1.0 Linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing Octave 1.1.0 Linux

root-129

I wonder whether anyone has some suggestions as to what may be going wrong:

I have tried installing Octave 1.1.0 on a Linux box  (ver 1.1.59)
with gcc 2.6.3 and libg++ 2.6.2 and (on one box I get the
following error)
make[2]: Entering directory `/usr2/octave-1.1.0/src'
c++ -c  -I. -I../src -I.. -I../liboctave -I../src -DHAVE_CONFIG_H    -g -O arith-ops.cc
In file included from arith-ops.cc:29:
/usr/include/math.h:20: warning: declaration of `const double cos(double)'
/usr/include/math.h:20: warning: conflicts with built-in declaration `double cos(double)'
/usr/include/math.h:36: warning: declaration of `const double sin(double)'
/usr/include/math.h:36: warning: conflicts with built-in declaration `double sin(double)'
In file included from tree-const.h:29,
                 from arith-ops.cc:37:
/usr/include/stdlib.h:213: warning: declaration of `volatile void abort()'
/usr/include/stdlib.h:213: warning: conflicts with built-in declaration `void abort()'
/usr/include/stdlib.h:229: warning: declaration of `volatile void exit(int)'
/usr/include/stdlib.h:229: warning: conflicts with built-in declaration `void exit(int)'
/usr/lib/g++-include/SLList.h: In method `int tree_indirect_ref::is_identifier_only() const':
In file included from tree-const.h:35,
                 from arith-ops.cc:37:
/usr/lib/g++-include/SLList.h:89: non-const member function `SLList<char *>::empty()'
tree-expr.h:337: called for const object at this point in file
make[2]: *** [arith-ops.o] Error 1



on another box I get a similat error but at a different place
(complains about some conflicting definitions when compiling
another routine - mappers.cc - which seems linked to Complex.h).

I have managed to install octave-1.1.0 on a SGI Indy 5.2 with the
same versions of libg++ and gcc. So.......


Anyone able to provide binaries for the linux?
(One linux box is a pentium 90 and the other a pentium 60 - of that
matters).

regards
d.s.

Reply | Threaded
Open this post in threaded view
|

Re: Installing Octave 1.1.0 Linux

Phil Johnson
> I wonder whether anyone has some suggestions as to what may be going wrong:
>
> I have tried installing Octave 1.1.0 on a Linux box  (ver 1.1.59)
> with gcc 2.6.3 and libg++ 2.6.2 and (on one box I get the
> following error)
> make[2]: Entering directory `/usr2/octave-1.1.0/src'
> c++ -c  -I. -I../src -I.. -I../liboctave -I../src -DHAVE_CONFIG_H    -g -O arith-ops.cc
[....]

The reason for the problems is that the octave configuration script fails
to recognize that linux has a lot of the math stuff already and tries to
use its own.  This results in the conflicts.  The source of the error isn't
octave per se, rather that on linux alone libc isn't being linked in
with libm automatically when the test programs are compiled.  Octave 1.1.1
should have a work-around included.

Although 1.1.1 is coming soon, you can compile now by adding -lc to the
LIBS definition in the configure program directly above the checks for
isinf and other math related stuff.  Somewhere around line 2850.  Be
sure to remove config.cache before you reconfigure.

Phil

--
Phil Johnson                             Email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Installing Octave 1.1.0 Linux

niles-5
In reply to this post by root-129

I had the same problem! You must do the following:
in /usr/include/sys/cdefs.h c replace:

#define __CONSTVALUE __const__
with:
#define __CONSTVALUE

and

#define __NORETURN __volatile__
with
#define __NORETURN

then it will work...It's a gcc 2.6.3 difference.  I don't think it's
really the perfect fix, but I've had no problems whatsoever after this
change with compilation of anything...but perhaps keep a back-up of
the orginal include file.

I wanted to tell someone who's in charge of these things for Linux
about it, but I don't know who/where I should post/mail.....if you
have any ideas...pass on the message.

Also, once Octave 1.1.1 is released (any day now), I will
put a binary version of octave for Linux at ftp.che.utexas.edu

Other than that you should be OK....

jwe: Perhaps you could put a blurb in the docs somewhere so
if people get stuck here...we don't get flooded with mail...
or better yet since these statements are in #ifndef clauses
perhaps you could define them for Linux in the configure.

        Good Luck!

        Rick Niles.