CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - Application & Software Support
  Octave in Centos5

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread Rated:  4 Votes
  •  yur1022
      yur1022
Octave in Centos5
#1
Jr Board Member
Joined: 2005/4/5
From
Posts: 30
Has anyone successfully compiled Octave stable (2.1.73)? I got the tarball (octave-2.1.73.tar.bz),
and ran "configure --prefix=/usr && make". But I got

undefined reference to `__cxa_get_exception_ptr'

I would appreciate for any help.
yur
Posted on: 2007/4/18 16:14
Create PDF from Post Print
Top
  •  Msquared
      Msquared
Re: Octave in Centos5
#2
Peeking in the Member Window
Joined: 2007/4/23
From
Posts: 19
If you're prepared to try the more recent developmental version, try downloading the octave package from Fedora 6 Extras and using that.

Your best bet for compatibility is to download the source RPM for FC6 and install and build that on your CentOS5 box:

  yum -i install rpm-build gcc
rpm -i http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/extras/6/SRPMS/octave-2.9.9-1.fc6.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/octave.spec


That last command will probably tell you a lot of things you'll need to install before it will build. Yum should get you out of trouble.

Once it's built, you may also find it needs other things installed before octave will install. Again, Yum should be able to help.
Posted on: 2007/4/23 17:51
Create PDF from Post Print
Top
  •  yur1022
      yur1022
Re: Octave in Centos5
#3
Jr Board Member
Joined: 2005/4/5
From
Posts: 30
Well, it complains about failed dependencies:

hdf5-devel is needed by octave-2.9.9-1.i386
fftw-devel is needed by octave-2.9.9-1.i386
ufsparse-devel is needed by octave-2.9.9-1.i386
glpk-devel is needed by octave-2.9.9-1.i386

Even after all the dependencies are satisfied (by getting some rpms from DAG and others compiled from Fedora 6 sources),
I still get

undefined reference to `__cxa_get_exception_ptr'

I am convinced now that there are some issues with gcc, libraries, or autoconfig. I hope they will be resolved in the near future.

yur
Posted on: 2007/4/24 17:48
Create PDF from Post Print
Top
  •  Msquared
      Msquared
Re: Octave in Centos5
#4
Peeking in the Member Window
Joined: 2007/4/23
From
Posts: 19
Hmmm. Googling "octave __cxa_get_exception_ptr" doesn't seem to help much, either.

Mind you, some of the output suggests C++ to me. Do you have the C++ libraries loaded?

yum install libstdc++

If that fails, perhaps

yum install compat-libstdc++

Note this thread on the Octave support forum: https://www.cae.wisc.edu/pipermail/octave-maintainers/2006-June/000309.html

If that doesn't work, perhaps fetch the 2.1.x version of Octave from Fedora Extras 4 (or perhaps 5)? You might be able to use the binary, and if not: try rebuilding that one from the source RPM.

Sorry, I'm out of suggestions after that.
Posted on: 2007/4/24 19:18
Create PDF from Post Print
Top
  •  yur1022
      yur1022
Re: Octave in Centos5
#5
Jr Board Member
Joined: 2005/4/5
From
Posts: 30
Thanks for your help, but I cannot deal with the error. Both stdlibc++ and compat-libstdc++ (2 versions) are already installed. Tried to remove 1 and both versions of compat-libstdc++, tried various other possibilities, ... but still I get "__cxa_get_exception_ptr" error. Well, I guess I will wait a while until further RHEL5/CentOS5 updates are released.

yur
Posted on: 2007/4/25 18:48
Create PDF from Post Print
Top
  •  davekw7x
      davekw7x
Re: Octave in Centos5
#6
Newbie
Joined: 2007/4/25
From Left Coast, USA
Posts: 3
I just found this thread after googling for help on octave centos5. I didn't see any simple "solutions", so here goes:

It turns out that GNU f77 (also known as g77) will not be updated beyond 3.4.6, and the 3.4.6 libraries are not quite compatible with 4.1.x. libraries that are installed as part of the current Centos gcc/g++ development tools. This is the cause of the "__cxa_get_exception_ptr" error as it tries to get the C/C++ and FORTRAN files to play nice together.

However, it turns out that GNU gfortran (with the same version libraries as g++) works very nicely with the octave source, so...

After poking around a little bit in the "configure" file in the octave base directory, I found that you can compile octave 2.1.73 and 2.9.13 if you first execute the following:
./configure --with-f77=gfortran

The following appeared near the end of the configure output:
Octave is now configured for i686-pc-linux-gnu

  Source directory:     .
  Installation prefix:  /usr/local
  C compiler:           gcc  -mieee-fp  -Wall -W -Wshadow -g -O2
  C++ compiler:         g++  -mieee-fp  -Wall -W -Wshadow -g -O2
  Fortran compiler:     gfortran -O -mieee-fp
  Fortran libraries:     -L/usr/lib/gcc/i386-redhat-linux/4.1.1 -L/usr/lib/gcc/i386-redhat-linux/4.1.1/../../.. -lgfortranbegin -lgfortran -lm -lgcc_s



That's the biggie: the Fortran libraries.

Then just
make

...wait for a while...

How sweet it is to see the following (with octave-2.9.13)
Octave successfully built.  Now choose from the following:

   ./run-octave    - to run in place
   make check      - to run the tests
   make install    - to install


(With 2.1.73, it just quietly quits, saying "make[1]: Leaving directory `/...yourpathhere.../octave-2.1.73'" with no error messages.)

See footnote.

Assuming that your "make" concluded satisfactorily
make check


(Of course you can also put in any other config or make options that you usually use.)

Regards,

Dave

Footnote:
My systems: Centos 5 (32-bit version) installed on several AMD 64 platforms.
Actually, I execute the following to have a record of the "make" process that I can look at later with a text editor:
make >make.log 2>&1



Then, in another window I follow the progress by

tail -f make.log


IWFM-YMMV ( It Works For Me---Your Mileage May Vary)
Posted on: 2007/9/10 16:19
Create PDF from Post Print
Top
  •  yur1022
      yur1022
Re: Octave in Centos5
#7
Jr Board Member
Joined: 2005/4/5
From
Posts: 30
I successfully compiled 2.9.14 with gfortran (instead of g77) following your instruction.

Thank you.

yur
Posted on: 2007/10/4 23:07
Create PDF from Post Print
Top
  •  mfuhrer
      mfuhrer
Re: Octave in Centos5
#8
Newbie
Joined: 2010/2/3
From
Posts: 1
Just encountered the same link problem with octave 3.2.3. The configure script doesn't appear to have a --with-f77 flag, but the following worked fine for me:

./configure F77="gfortran" FFLAGS="-O -mieee-fp"
Posted on: 2010/2/3 0:56
Create PDF from Post Print
Top
  •  adebened
      adebened
Re: Octave in Centos5
#9
Professional Board Member
Joined: 2007/4/16
From
Posts: 279
This is a slightly different version but the epel repository has octave-3.0.5-1.el5 (as well as the package octave-forge). It runs fine on my machines. There's a gui called qt-octave, which provides a nice front-end if you want one. The qt-octave binaries available here work well.
Cheers,
Posted on: 2010/2/4 22:07
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com