maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Octave? (https://talk.maemo.org/showthread.php?t=12546)

baksiidaa 2007-11-30 17:29

Octave?
 
I've found a few links to a repository that has Octave and GNUplot, but the hosting server seems to no longer exist. Does anyone happen to have the deb files for these? I'd really like to be able to run Octave on my N800 (it ought to impress my fellow physics grad students).

armin 2007-11-30 19:48

Re: Octave?
 
here are some very old, old deb packages for OS2006, build by Arno Onken (whyly AT gmx DOT net), hosted on my web server:

http://armin-warda.de/arno/

for more info, or to find out how to contact Arno, please google for Arno Onken Maemo.

lardman 2007-11-30 20:36

Re: Octave?
 
I have some packages somewhere. OS2007 version here: http://people.bath.ac.uk/enpsgp/noki...9-r1_armel.deb

baksiidaa 2007-11-30 23:20

Re: Octave?
 
Thanks to both of you. I had to go to red pill mode to install one library, but I now have Octave 2.9 and gnuplot 4.0.0 running on my OS2008 N800. I've tried enabling mouse support in gnuplot, but it seems a bit buggy. If I try to rotate a plot with the stylus, the displayed plot stays the same until I close the plot window. Then the rotated plot is shown in a new window. Everything else I've tried works great though.

Thanks again.

Fadsjeik 2007-12-28 17:21

Re: Octave?
 
Hi, I just installed the .deb and tried to run octave from the command line, but it just gave me a command not found. I checked the application manager and it tells me octave is installed, but its size is 0kb, which is quite strange. Did I do something wrong?

baksiidaa 2007-12-28 22:07

Re: Octave?
 
Quote:

Originally Posted by Fadsjeik (Post 116809)
Hi, I just installed the .deb and tried to run octave from the command line, but it just gave me a command not found. I checked the application manager and it tells me octave is installed, but its size is 0kb, which is quite strange. Did I do something wrong?

The program is located at /usr/local/bin/octave.

lardman 2007-12-29 10:44

Re: Octave?
 
Sorry, I didn't fill in all the description fields in the deb, hence the apparent 0kb size.

Fadsjeik 2007-12-29 13:08

Re: Octave?
 
Ah, managed to get it working now. For future reference: the missing library that has to be installed in red pill mode is libg2c. Then you can run octave with ./octave. Works like a charm.

Would it be possible to get octave 3.0 running (was released this December)? Would be awesome!

macr0t0r 2008-06-17 04:52

Re: Octave?
 
Okay, I give up. What repository has libg2c? I can't seem to find a reference to a Maemo-version anywhere!

- Jim

lardman 2008-06-17 14:09

Re: Octave?
 
Should be in my repo as given above?

lardman 2008-06-17 14:15

Re: Octave?
 
Ah sorry, here: http://people.bath.ac.uk/enpsgp/nokia770/OE_feed/vfp/

May be old now though.

Also note that the deps are wrong and may screw up your installing/uninstalling other things. Sorry.

macr0t0r 2008-06-17 18:05

Re: Octave?
 
Ah, bleeding edge stuff, eh? Yah, I think I'll hold back on trying out your Octave 3.0 builds unless you actually have a decently running build with real advantages over 2.9. Right now I just want to get 2.9 up and running to allow me to convert some basic Matlab scripts to run on my N800 (OS2008).

You say that your dep of libg2c may be old. Are you not playing with Octave anymore, or have you compiled a new version of libg2c for yourself? I'm curious as to what patching you had to do.

- Jim

lardman 2008-06-17 19:30

Re: Octave?
 
Quote:

Ah, bleeding edge stuff, eh?
Sort of, I don't think there's anything wrong with Octave 3.0, it's been released iirc. It should certainly run as well as 2.9 (afaik).

Quote:

You say that your dep of libg2c may be old.
It ought to all be compatible with Chinook, but it's a bit old as I built it a while back (but as the GCC version hasn't changed that should be fine).

Quote:

Are you not playing with Octave anymore, or have you compiled a new version of libg2c for yourself? I'm curious as to what patching you had to do.
No, I've been busy DSP hacking, so haven't been using it. The same version of g2c should work for 2.9 I think. The feed I gave the url to was built using OpenEmbedded + Bitbake, it has some minor dep problems (naming differences) which might cause issues, otherwise it's fine.

Octave requires no tweaks/patches to build, the only thing that was done for the build in the feed was to add the -mcpu and -mfpu flags to enable hw floating point and any cpu optimisations that GCC might know of.

Someone should really submit a debian source package to Extras (I may do when I have some spare time)

macr0t0r 2008-06-18 06:22

Re: Octave?
 
Well, I took a stab at 3.0, but it was a mess and I still didn't have the shared libraries recognized in the end. I had to use dpkg -i --force-depend-version to get around the change in the version name for libstdc++ on most packages. Anyhow, I finally ended up clearing the mess and installing octave 2.9. Works great! Thanks!

- Jim

macr0t0r 2008-10-28 06:14

Re: Octave?
 
Bah...I must be missing something really simple. I've compiled and installed octave a couple times, but I'm still getting the dreaded floating point error on load. I configured with the following flags in scratchbox:
./configure CFLAGS="-O3 -mcpu=arm1136j-s -mtune=arm1136j-s -fomit-frame-pointer -mfpu=vfp" OPT_FLAGS = "-O3 -fomit-frame-pointer -mcpu=arm1136j-s -mfpu=vfp"

While compiling, I see that the "-mfpu" is getting used by gcc. This is compiling octave 3.0.1. What exactly where your flags when you configured?

- jim

qwerty12 2008-10-28 07:51

Re: Octave?
 
Quote:

Originally Posted by macr0t0r (Post 237188)
Bah...I must be missing something really simple. I've compiled and installed octave a couple times, but I'm still getting the dreaded floating point error on load. I configured with the following flags in scratchbox:
./configure CFLAGS="-O3 -mcpu=arm1136j-s -mtune=arm1136j-s -fomit-frame-pointer -mfpu=vfp" OPT_FLAGS = "-O3 -fomit-frame-pointer -mcpu=arm1136j-s -mfpu=vfp"

While compiling, I see that the "-mfpu" is getting used by gcc. This is compiling octave 3.0.1. What exactly where your flags when you configured?

- jim

Have you tried replacing:
-mcpu=arm1136j-s -mtune=arm1136j-s

with:
-mcpu=arm1136jf-s -mtune=arm1136jf-s

IIRC, the f specifies that the processor has a floating point. I also specify -mfloat-abi=softfp too.

Actually, try this:
CFLAGS="-O3 -fomit-frame-pointer -mcpu=arm1136jf-s -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" OPT_FLAGS = "-O3 -fomit-frame-pointer -mcpu=arm1136jf-s -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" ./configure

lardman 2008-10-28 11:28

Re: Octave?
 
Quote:

-mfloat-abi=softfp
The lack of this may be the problem, the floating point error is caused as Octave looks at the floating point format to check the endianness of the processor, it may fall back to some strange format without this flag (e.g. the fpa one).

macr0t0r 2008-10-28 20:08

Re: Octave?
 
Crimony, how many flags does it take for this thing to figure out how to arrange the bytes? Anyhow, I'll give those flags a try tonight. I'm trying to nail this down so that gnuplot integration works (messed up endians means messed up stream-data to gnuplot).

Thanks!

- Jim

yerga 2008-10-28 21:38

Re: Octave?
 
Please, who is going to upload octave/gnuplot to the extras repository? :P

macr0t0r 2008-10-29 06:28

Re: Octave?
 
I don't have the debian experience to upload to Extras. I'm just a simple Matlab programmer who does some basic C and Fortran code for numerical analysis. I don't know how to package this as a debian and I don't know how to bundle it to pass the "compile from source" requirement in the Extras repository. I'm cheating by using one of the VMWare Fusion disk images of Scratchbox, compiling within the Armel environment, and then copying all of the resulting files to their respective location on the N800. Yah...an ugly way to do things.

- Jim

macr0t0r 2008-10-29 08:33

Re: Octave?
 
Hot dang, it works! I followed the instructions from this site to download the dependencies and prep Octave:
http://www.courville.org/mediawiki/i...10#octave_port

However, I added the following flags to .configure:
./configure CFLAGS="-O3 -fomit-frame-pointer -mcpu=arm1136jf-s -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" CXXFLAGS="-O3 -fomit-frame-pointer -mcpu=arm1136jf-s -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" F77="/usr/bin/f77_f2c" --prefix="/usr" --exec-prefix="/usr"

Then, apply this command just like in the website:
sed -i -e "s:rm -f INSTALL:cp ../../INSTALL.OCTAVE ./INSTALL:g" -e "s:rm -f BUGS:cp ../../BUGS ./BUGS:g" doc/interpreter/Makefile

Then type "make" and go eat a sandwhich. It'll still barf a little trying to make a couple of the documents (don't care).

Type "fakeroot make install" to make it put everything in the proper place.

Then you have to copy things to your Tablet. I have ssh installed, so I used secure copy (my local ip is 135.246.1.107):
scp -rp /usr/lib/octave-3.0.2 root@135.246.1.107:/usr/lib/
scp -rp /usr/bin/octav* root@135.246.1.107:/usr/bin/
scp -rp /usr/bin/mkoct* root@135.246.1.107:/usr/bin/
scp -rp /usr/bin/f77* root@135.246.1.107:/usr/bin/
scp -rp /usr/libexec/octave root@135.246.1.107:/usr/libexec/
scp -rp /usr/share/octave root@135.246.1.107:/usr/share/

I'm not sure, but I think you may have to copy the libstdc* files as well. A lot of the "compile yourself" executables seem to need it.

BUT... you need gnuplot! Anunakin has got you covered. It's a recent version, too!
http://www.internettablettalk.com/fo...ad.php?t=20425

You'll need to install the wxwidgets so that you can control the gnuplot window. Before running octave, you'll want to set this environment variable in your shell: "export GNUTERM=wxt"

Octave boots with no errors, and I have full plot support! Woo Hoo! I FINALLY have a solid Matlab clone on my tablet. Thanks so much for all your help ,lardman!

(Notice that the website I referenced has a debian of octave, but you can't plot with that one. No, I don't have time to learn how to create a debian package. I suppose I could try zipping up the associated files to let others copy them.)

- Jim

lardman 2008-10-29 09:12

Re: Octave?
 
Hmm, I'll look at creating a deb, painful having to create everything and then install inside scratchbox, then copy individual files (and remember which ones if you ever decide to uninstall)

macr0t0r 2008-10-29 16:48

Re: Octave?
 
Yah...but it works. I might look into MUD and see if it can really auto-create a debian. The VMWare disk image of the scratchbox environment didn't come with dh_make, and I can't seem to install it within the Armel shell. Just add debian packaging it to the long list of technologies that I'll "get around to learning." It seems to be a technology that one should really take time to understand properly before I start tossing files to unwitting users.

- Jim

macr0t0r 2008-11-03 06:06

Re: Octave?
 
Just letting you guys know that I haven't forgotten about ya! I've been studying the nuances of Scratchbox and Debian packaging. I have two things to say:
1. Debain packages are a God-send for end-users and will help get Linux into the "Average Joe's" home computer.
2. The act of creating Debian packages is slow, convoluted, picky, and it gets worse when you add in all the nuances and complexity of a cross-compiler and emulated environment!

Anyhow, I've managed to get Octave into a package using the existing Maemo/extras libraries. However, it seems the version number is getting messed up. I have homework to deal with, so I'll have to get back to this in two days before I post this. I shudder at what it's going to take to push this into Maemo extras, since we first have to compile a working copy of f2c before you can compile octave.

I found out two things with the failed document building:
1: You must have the texinfo package installed (apt-get install texinfo).
2: The munge-texi program that is created during building will NOT work in the Armel environment. It keeps tossing out null pointers and crashing the build. It's used to convert/combine the *.txi files into *.texi files. However, the *.texi files already exist, so it's just a matter of "touching" those files so that the Makefile considers them up-to-date and never runs munge-texi. I'll see if I can add such a command to the build statement in the debian rules file.

It's been a heck of a learning experience this week. Once I get my head wrapped around this, I hope to next tackle the Ted RTF text editor!

- Jim

lardman 2008-11-03 11:40

Re: Octave?
 
Quote:

since we first have to compile a working copy of f2c before you can compile octave.
Ask on maemo-developers, see if this is workable. Once we move to GCC 4.xx g77/g90 should be available.

lardman 2009-03-20 09:36

Re: Octave?
 
Ok, well I compiled octave2.1.73 from Debian stable (after removing pretty much all of the deps). It's compiled for vfp. No fancy package I'm afraid, just a tarball and even then you need to create a couple more symlinks (from the .so.X -> .so) sorry, I didn't realise Octave was so un-picky about its lib versions.

You'll also need to "apt-get install libg2c0"

I've compiled a reasonably up-to-date gnuplot and stuck it in there too (in .deb format this time). The reason for not having octave in a deb, is that I can't get slice to work in scratchbox, and it's required by the Debian build process for this file. Grrr.

http://people.bath.ac.uk/enpsgp/nokia770/software/

Alternatives (in the same dir), which I obviously produced at some point in the past are octave2.9.x (yacas is also in there, and looks like I made it at the same time), no idea if this works (though it probably does). Most likely the deb file is not correctly made, so it may screw up your deps (easily fixed by removing octave or so I remember as and when it happens). Please let me know if it works, if you see why it's breaking things, if it is indeed.

Last option, which suffers from the same dep issues as above, is octave3.0.0 built using OE: http://people.bath.ac.uk/enpsgp/nokia770/OE_feed/vfp/

As above, please let me know if it works, if it breaks, how to fix it, etc.

Happy programming :)

yerga 2009-03-20 19:48

Re: Octave?
 
Thanks lardman.

I installed the octave tarball and it works with the said symlinks.

The steps I have done are the following:
1) Get the tarball and uncompress it (of course).
2) Do the following symlinks:
ln -s /usr/lib/liboctinterp.so.2.1.73 /usr/lib/liboctinterp.so
ln -s /usr/lib/liboctave.so.2.1.73 /usr/lib/liboctave.so
ln -s /usr/lib/libcruft.so.2.1.73 /usr/lib/libcruft.so
3) apt-get install libreadline5
4) wget http://repository.maemo.org/pool/dia...sso8_armel.deb and dpkg -i it
5) Run octave ;)

I'll be installing gnuplot now.

lardman 2009-03-20 22:22

Re: Octave?
 
Thanks for the full instructions run-down :)

You can also do "apt-get install libg2c0" to save typing.

qwerty12 2009-03-21 06:40

Re: Octave?
 
Quote:

Originally Posted by lardman (Post 273372)
Thanks for the full instructions run-down :)



You can also do "apt-get install libg2c0" to save typing.

Only if you have the SDK repo added and enabled, and people who do not know what they are doing with the repo should not.

But for those w/out wget ;):
Code:

maemo-mini-curl -o libg2c0_3.4.4cs2005q3.2-5.osso8_armel.deb http://repository.maemo.org/pool/diablo/free/g/gcc-3.4/libg2c0_3.4.4cs2005q3.2-5.osso8_armel.deb

lardman 2009-03-21 10:41

Re: Octave?
 
I used f2c and fort95 (f2c converts from FORTRAN to C code, and fort95 wraps this so it can be called the same way as the GCC FORTRAN compiler, g77), and I can post the recipes if anyone fancies having a go themselves.

The Debian builds are a real PITA due to slice, which is a perl utility which requires the addition of some binary perl libraries to the scratchbox environment (Do a search for "Debian slice" and grab the .dsc, .diff, .tar.gz and look at the deps).

If anyone can work out how to get this working, it would be very useful. We still won't be able to compile the most up-to-date versions of Octave (at least not without lots of effort) as there are compiler errors (it demands GCC 4.x.x, as do the earlier versions, but now it just won't build with our old GCC 3.x.x)

qwerty12 2009-03-21 12:12

Re: Octave?
 
Quote:

Originally Posted by lardman (Post 273478)
I used f2c and fort95 (f2c converts from FORTRAN to C code, and fort95 wraps this so it can be called the same way as the GCC FORTRAN compiler, g77), and I can post the recipes if anyone fancies having a go themselves.

The Debian builds are a real PITA due to slice, which is a perl utility which requires the addition of some binary perl libraries to the scratchbox environment (Do a search for "Debian slice" and grab the .dsc, .diff, .tar.gz and look at the deps).

Here's fixed packages of slice (ran the first part of octave building to see if slice ran and it did):

http://qwerty12.maemobox.org/slice/

If it wont work for you, do:
Code:

export SBOX_REDIRECT_IGNORE=/usr/bin/perl ; export PATH=/usr/bin:$PATH
and then do your dpkg-buildpackage in octave folder.

DojwqIO 2010-01-12 20:25

Re: Octave?
 
Any information about ports of octave and gnuplot for the N900? I searched but the only threads with anything on octave seem to be inactive and very old.

Thanks,


All times are GMT. The time now is 01:54.

vBulletin® Version 3.8.8