Thursday, November 05, 2009

Install Octave 3.2 with Image Processing package on Arch Linux


Octave is a great tool for programming mathematics. However, when I wanted to install it and its Image processing package on Arch Linux I got a problem: missing lgfortranbegin library.

To begin with I installed Octave using pacman as a root or sudo user (I prefer sudo)sudo pacman -Sy; pacman -S octave There was no problems with this.
Now, to install Image processing package it is necessary to do as follows:
To install a package, download the package file, and install it from the Octave prompt by typing pkg install package_file_name.tar.gz
where package_file_name.tar.gz is the name of the file you downloaded.
In my case the package_file_name.tar.gz was image-1.0.10.tar.gz and it can be downloaded form here

So, when I tried to install it I got the following erroroctave:1> pkg install image-1.0.10.tar.gz
warning: creating installation directory /usr/share/octave/packages
/usr/bin/ld: cannot find -lgfortranbegin
collect2: ld returned 1 exit status
make: *** [__spatial_filtering__.oct] Error 1
'make' returned the following error: make: Entering directory `/tmp/oct-9oWZxI/image-1.0.10/src'
mkoctfile __spatial_filtering__.cc
make: Leaving directory `/tmp/oct-9oWZxI/image-1.0.10/src'
error: called from `pkg>configure_make' in file /usr/share/octave/3.2.3/m/pkg/pkg.m near line 1253, column 2
error: called from:
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 714, column 5
error: /usr/share/octave/3.2.3/m/pkg/pkg.m at line 287, column 7
As it can be seen lgfortranbegin is missing. The library belongs to fortran compiler and in Arch Linux it can be installed simply by sudo pacman -S gcc-fortranTo make sure that the library was installed I performed a search and I found it[marcin@arch ~]$ sudo find / -name "*fortranbegin*"
/usr/lib/gcc/i686-pc-linux-gnu/4.4.2/libgfortranbegin.a
After this there was no problems. I installed Image package as previously described and I checked if I got functions that I needed (e.g. imrotate, imresize) by: octave:1> pkg install image-1.0.10.tar.gz
octave:2> imr<tabulator>
imread imresize imrotate_Fourier
imremap imrotate
octave:2>
The installation was almost finished. I needed one more package, i.e. gnuplot to be able to display figuressudo pacman -S gnuplotFinally, I did some simple test to create an image, make a rotated version of it and display both of themoctave:8> I=randn(256);
octave:9> I2=imrotate(I,30);
octave:10> figure,imshow(I);
octave:11> figure,imshow(I2);


Conclusion

So in conclusion, to install octave along with Image package I needed to have gcc-fortran and gnuplot installed first:sudo pacman -S gcc-fortran gnuplot octaveThen follow general instruction on how to install Octave packages from here.

12 comments:

  1. Anonymous2:57 AM

    I did not know Octave has Image processing toolbox! Its nice.

    ReplyDelete
  2. Anonymous6:41 AM

    Hi, I have a similar installation problem:

    octave:1> ls
    image-1.0.15.tar.gz octave-matlab-tut.pdf
    octave:2> pkg install image-1.0.15.tar.gz
    make: mkoctfile: No such file or directory
    make: *** [__spatial_filtering__.oct] Error 1
    'make' returned the following error: mkoctfile -Wall __spatial_filtering__.cc
    error: called from `pkg>configure_make' in file /sw/share/octave/3.6.3/m/pkg/pkg.m near line 1385, column 9
    error: called from:
    error: /sw/share/octave/3.6.3/m/pkg/pkg.m at line 827, column 5
    error: /sw/share/octave/3.6.3/m/pkg/pkg.m at line 383, column 9

    Do you have a idea what could be the problem here?
    Thanks a lot.
    Regards
    Marcus (marcus.hudritsch@bfh.ch)

    ReplyDelete
  3. Anonymous2:28 PM

    Wіth this consiԁеrablу of terгific praiseѕ for the ѕolutiοn, it
    is nо wonder thаt it has beеn on mајor
    from otheг bгandѕ οf stretсh mаrk сгeamѕ.


    Here is my blog ρost ... hyperlink

    ReplyDelete
  4. Anonymous3:04 PM

    No aԁditіοnаl tіmе еxpеnԁeԁ оn the fitneѕѕ centeг, no
    baсk pain ԁue to the fасt of to quite a few сгunches oг other stomасh ωοгkοut гoutines
    аnd no far more sweaty worκοuts meгеly
    to make certain that your abѕ appear supегb.


    Ηere iѕ my sitе - Www.Celebritybookzstar.Com

    ReplyDelete
  5. Anonymous12:51 AM

    Wonderful article! That is the type of info that should be shared around the net.
    Disgrace on the search engines for now not positioning this publish upper!

    Come on over and visit my web site . Thank you =)

    Look into my weblog ... pole pruner saw

    ReplyDelete
  6. Anonymous2:14 AM

    Wow that was unusual. I just wrote an incredibly long comment
    but after I clicked submit my comment didn't appear. Grrrr... well I'm not writing all that
    over again. Anyway, just wanted to say superb blog!



    Feel free to surf to my page; how to exercise

    ReplyDelete
  7. Anonymous7:44 AM

    I'm gone to say to my little brother, that he should also visit this web site on regular basis to take updated from most up-to-date news.

    Feel free to surf to my web blog :: stability ball exercises

    ReplyDelete
  8. Anonymous7:01 PM

    I think this is one of the most significant info for me.
    And i am glad reading your article. But should remark on few general things,
    The web site style is perfect, the articles is really excellent : D.

    Good job, cheers

    my blog ... garbage disposal

    ReplyDelete
  9. Anonymous8:10 PM

    I'm really enjoying the design and layout of your site. It's a very
    easy on the eyes which makes it much more pleasant for me
    to come here and visit more often. Did you hire out a designer to create
    your theme? Superb work!

    Here is my weblog: 2011 mazda rx 8

    ReplyDelete
  10. Anonymous8:16 PM

    Hi there colleagues, nice article and nice urging commented here, I am really enjoying by these.


    my webpage :: mazda rx 8 convertible

    ReplyDelete
  11. Anonymous5:28 AM

    If some one wishes to be updated with latest technologies
    after that he must be pay a visit this web site and be up to date daily.


    Also visit my blog post ... my snoring solution

    ReplyDelete
  12. Anonymous5:59 PM

    hello!,I really like your writing very a lot!
    share we keep in touch more approximately your post on AOL?

    I require a specialist in this space to solve my problem.
    Maybe that's you! Having a look forward to look you.

    My web site snore mouthpiece reviews

    ReplyDelete