Compile trouble octave2.09 on Mklinux

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

Compile trouble octave2.09 on Mklinux

Toru Mori
Hello all,
I am trying to compile octave 2.09 on Mklinux system, but I can't solve
following error.

--------------  
make[2]: Entering directory `/home/mori/octave/octave-2.0.9/liboctave'
c++ -c  -I. -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc  -DHAVE_CONFIG_H  -fno-implicit-templates  -g -O2 -Wall CollocWt.cc
In file included from /usr/lib/g++-include/std/bastring.h:35,
                 from /usr/lib/g++-include/std/string.h:6,
                 from /usr/lib/g++-include/string:5,
                 from mach-info.h:26,
                 from data-conv.h:28,
                 from dMatrix.h:35,
                 from CollocWt.h:32,
                 from CollocWt.cc:33:
/usr/lib/g++-include/std/stddef.h:15: parse error before `::'
make[2]: *** [CollocWt.o] Error 1
make[2]: Leaving directory `/home/mori/octave/octave-2.0.9/liboctave'
make[1]: *** [liboctave] Error 2
make[1]: Leaving directory `/home/mori/octave/octave-2.0.9'
make: *** [all] Error 2
-------------

 "/usr/lib/g++-include/std/stddef.h"  is following.

-------------
    // The -*- C++ -*- standard definitions header.
    // This file is part of the GNU ANSI C++ Library.

    #ifndef __STDDEF__
    #define __STDDEF__

    #ifdef __GNUG__
    #pragma interface "std/stddef.h"
    #endif

    #include <_G_config.h>
    #include <std/cstddef.h>

    extern "C++" {
    const size_t NPOS = (size_t)(-1);
    typedef void fvoid_t();

    #ifndef _WINT_T
    #define _WINT_T
    typedef _G_wint_t wint_t;
    #endif

    } // extern "C++"
    #endif
-------------

line 15 is    "const size_t NPOS = (size_t)(-1);"
I don't understand the meaning of "parse error before `::'".

I use following system

  Mklinux DR2.1 on PowerPC601
  C++ versin : GNU C++ version 2.7.2.f.1

If system or other information is too few, please inform.

---
_/              Toru Mori                 _/
_/  Isuzu Advanced Engneering Center.Ltd. _/
_/  Sound & Vibration Research Dept.      _/
_/Tel:+81-466-45-2696 Fax:+81-466-45-2405 _/
_/    E-mail: [hidden email]       _/




Reply | Threaded
Open this post in threaded view
|

Compile trouble octave2.09 on Mklinux

John W. Eaton-6
On 18-Sep-1997, Toru Mori <[hidden email]> wrote:

| Hello all,
| I am trying to compile octave 2.09 on Mklinux system, but I can't solve
| following error.
|
| --------------  
| make[2]: Entering directory `/home/mori/octave/octave-2.0.9/liboctave'
| c++ -c  -I. -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc  -DHAVE_CONFIG_H  -fno-implicit-templates  -g -O2 -Wall CollocWt.cc
| In file included from /usr/lib/g++-include/std/bastring.h:35,
|                  from /usr/lib/g++-include/std/string.h:6,
|                  from /usr/lib/g++-include/string:5,
|                  from mach-info.h:26,
|                  from data-conv.h:28,
|                  from dMatrix.h:35,
|                  from CollocWt.h:32,
|                  from CollocWt.cc:33:
| /usr/lib/g++-include/std/stddef.h:15: parse error before `::'
| make[2]: *** [CollocWt.o] Error 1
| make[2]: Leaving directory `/home/mori/octave/octave-2.0.9/liboctave'
| make[1]: *** [liboctave] Error 2
| make[1]: Leaving directory `/home/mori/octave/octave-2.0.9'
| make: *** [all] Error 2
| -------------
|
|  "/usr/lib/g++-include/std/stddef.h"  is following.
|
| -------------
|     // The -*- C++ -*- standard definitions header.
|     // This file is part of the GNU ANSI C++ Library.
|
|     #ifndef __STDDEF__
|     #define __STDDEF__
|
|     #ifdef __GNUG__
|     #pragma interface "std/stddef.h"
|     #endif
|
|     #include <_G_config.h>
|     #include <std/cstddef.h>
|
|     extern "C++" {
|     const size_t NPOS = (size_t)(-1);
|     typedef void fvoid_t();
|
|     #ifndef _WINT_T
|     #define _WINT_T
|     typedef _G_wint_t wint_t;
|     #endif
|
|     } // extern "C++"
|     #endif
| -------------
|
| line 15 is    "const size_t NPOS = (size_t)(-1);"
| I don't understand the meaning of "parse error before `::'".
|
| I use following system
|
|   Mklinux DR2.1 on PowerPC601
|   C++ versin : GNU C++ version 2.7.2.f.1
|
| If system or other information is too few, please inform.

When you ran configure, was g++ correctly configured to find the
include files in /usr/lib/g++-include?  If so, Octave's configure
script should have found the definition for NPOS in <string>, or it
should have found that the C++ string class has npos as a data
member.  I'm not sure whether the above declaration is correct, but
you can probably work around it by removing the definition of NPOS
from Octave's config.h file and running make again.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: Compile trouble octave2.09 on Mklinux

Toru Mori
Thank you for reply.

From: "John W. Eaton" <[hidden email]>
Subject: Compile trouble octave2.09 on Mklinux
Date: Thu, 18 Sep 1997 13:55:48 -0500

>
> When you ran configure, was g++ correctly configured to find the
> include files in /usr/lib/g++-include?  If so, Octave's configure
> script should have found the definition for NPOS in <string>, or it
> should have found that the C++ string class has npos as a data
> member.  I'm not sure whether the above declaration is correct, but
> you can probably work around it by removing the definition of NPOS
> from Octave's config.h file and running make again.
>
> jwe
>

I can solve compile error of my previous post.  After deleting all
sources of octave and compile again, "parse error" is vanished.
Probably, I missedited "CollocWt.cc".

But I faced other compile error as follows.

--------
c++  -I. -I/home/mori/octave/octave-2.0.9/src -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc -I/home/mori/octave/octave-2.0.9 -I/home/mori/octave/octave-2.0.9/liboctave -I/home/mori/octave/octave-2.0.9/src -I/home/mori/octave/octave-2.0.9/glob -I/home/mori/octave/octave-2.0.9/libcruft/misc  -DHAVE_CONFIG_H  -fno-implicit-templates  -g -O2 -Wall -L.. -u MAIN__   -fPIC -g -o octave \
octave.o builtins.o  balance.o  chol.o  colloc.o  dassl.o  det.o  eig.o  expm.o  fft.o  fft2.o  filter.o  find.o  fsolve.o  getgrent.o  getpwent.o  getrusage.o  givens.o  hess.o  ifft.o  ifft2.o  inv.o  log.o  lpsolve.o  lsode.o  lu.o  minmax.o  pinv.o  qr.o  quad.o  qzval.o  rand.o  schur.o  sort.o  svd.o  syl.o  time.o \
-L../liboctave -L../libcruft -L../readline -L../kpathsea -L../glob -L../dlfcn -L.  \
-loctinterp -loctave -ltinst -lcruft  -lreadline -lkpathsea -lglob  \
-lf2c -lm -L/usr/lib/gcc-lib/ppc-unknown-linuxaout/2.7.2.f.1 -lm -lgcc -lc  -lncurses -lm
/usr/lib/libm.a(cabs.o): In function `z_abs':
cabs.o(.text+0x268): multiple definition of `z_abs'
/usr/lib/gcc-lib/ppc-unknown-linuxaout/2.7.2.f.1/libf2c.a(z_abs.o)(.text+0x4): first defined here
make[2]: *** [octave] Error 1
make[2]: Leaving directory `/home/mori/octave/octave-2.0.9/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory `/home/mori/octave/octave-2.0.9'
make: *** [all] Error 2
-------

Result of configure on my system is following.

-------
Octave is now configured for powerpc-unknown-linux-gnu

  Source directory:     /home/mori/octave/octave-2.0.9
  Installation prefix:  /usr/local
  C compiler:           gcc  -g -O2 -Wall
  C++ compiler:         c++  -fno-implicit-templates  -g -O2 -Wall
  Fortran compiler:     g77 -O
  Fortran libraries:     -lf2c -lm -L/usr/lib/gcc-lib/ppc-unknown-linuxaout/2.7.2.f.1 -lm -lgcc -lc
  Use GNU readline:     true
  Use GNU info reader:  true
  Default pager:        less
  gnuplot:              gnuplot

  Do internal array bounds checking:       false
  Build shared libraries:                  false
  Minimal kernel option:                   false
  Dynamic Linking (dlopen/dlsym):          false
  Dynamic Linking (shl_load/shl_findsym):  false
------

Please advise me to solve this error.

---
_/              Toru Mori                 _/
_/  Isuzu Advanced Engneering Center.Ltd. _/
_/  Sound & Vibration Research Dept.      _/
_/   Tel:0466-45-2696 Fax:0466-45-2405    _/
_/    E-mail: [hidden email]       _/



Reply | Threaded
Open this post in threaded view
|

Re: Compile trouble octave2.09 on Mklinux

John W. Eaton-6
On 19-Sep-1997, Toru Mori <[hidden email]> wrote:

| But I faced other compile error as follows.
|
| --------
| c++  -I. -I/home/mori/octave/octave-2.0.9/src -I.. -I../liboctave -I../src -I../glob -I../libcruft/misc -I/home/mori/octave/octave-2.0.9 -I/home/mori/octave/octave-2.0.9/liboctave -I/home/mori/octave/octave-2.0.9/src -I/home/mori/octave/octave-2.0.9/glob -I/home/mori/octave/octave-2.0.9/libcruft/misc  -DHAVE_CONFIG_H  -fno-implicit-templates  -g -O2 -Wall -L.. -u MAIN__   -fPIC -g -o octave \
| octave.o builtins.o  balance.o  chol.o  colloc.o  dassl.o  det.o  eig.o  expm.o  fft.o  fft2.o  filter.o  find.o  fsolve.o  getgrent.o  getpwent.o  getrusage.o  givens.o  hess.o  ifft.o  ifft2.o  inv.o  log.o  lpsolve.o  lsode.o  lu.o  minmax.o  pinv.o  qr.o  quad.o  qzval.o  rand.o  schur.o  sort.o  svd.o  syl.o  time.o \
| -L../liboctave -L../libcruft -L../readline -L../kpathsea -L../glob -L../dlfcn -L.  \
| -loctinterp -loctave -ltinst -lcruft  -lreadline -lkpathsea -lglob  \
| -lf2c -lm -L/usr/lib/gcc-lib/ppc-unknown-linuxaout/2.7.2.f.1 -lm -lgcc -lc  -lncurses -lm
| /usr/lib/libm.a(cabs.o): In function `z_abs':
| cabs.o(.text+0x268): multiple definition of `z_abs'
| /usr/lib/gcc-lib/ppc-unknown-linuxaout/2.7.2.f.1/libf2c.a(z_abs.o)(.text+0x4): first defined here

I think this happens because z_abs is defined in libf2c and libm (or
libc?) on your system.  Removing the object from one or the other of
the libraries will probably solve your problem, though you should
probably check to make sure that they really are the same (i.e., find
the source for both libraries and see if both functions are supposed
to do the same thing).  This problem should probably be reported to
the Mklinux maintainers.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: Compile trouble octave2.09 on Mklinux

Toru Mori
Hello,

From: "John W. Eaton" <[hidden email]>
Subject: Re: Compile trouble octave2.09 on Mklinux
Date: Fri, 19 Sep 1997 12:30:47 -0500

> I think this happens because z_abs is defined in libf2c and libm (or
> libc?) on your system.  Removing the object from one or the other of
> the libraries will probably solve your problem, though you should
> probably check to make sure that they really are the same (i.e., find
> the source for both libraries and see if both functions are supposed
> to do the same thing).  This problem should probably be reported to
> the Mklinux maintainers.
>
> jwe

Thank you very much for response. I can compile octave after deleting
z_abs.o from libf2c.a using 'ar'command as follows.

        $ ar -d libf2c.a z_abs.o

Tihs problem seems to be fixed on latest shared library version of
Mklinux.

---
_/              Toru Mori                 _/
_/  Isuzu Advanced Engneering Center.Ltd. _/
_/  Sound & Vibration Research Dept.      _/
_/  Tel:81-466-45-2696 Fax:81-466-45-2405 _/
_/    E-mail: [hidden email]       _/