Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Octave extension bug, Some octave functions not found...< Next Oldest | Next Newest >
aesenadorjr Offline





Group: Members
Posts: 11
Joined: Feb. 2005
Posted: Feb. 11 2005,03:38 QUOTE

Thanks to clacker, I am using octave in DSL.

One thing I have to report, since I did not find any post describing this problem yet.  If you try using the non-built-in functions like rand() or fft(), octave (as installed through myDSL menu) will say that these are not defined.  I browsed the /opt/octave tree and found them deep in there, so I looked at the DEFAULT_LOADPATH and LOADPATH built-in variables.  This is what I found:

DEFAULT_LOADPATH = .:/usr/lib/octave/2.0.16.92/site/oct/i386-pc-linux-gnu//:
/usr/lib/octave/site/oct/i386-pc-linux-gnu//:/usr/share/octave/2.0.16.92/site/m//:
/usr/share/octave/site/m//:/usr/lib/octave/2.0.16.92/oct/i386-pc-linux-gnu//:
/usr/share/octave/2.0.16.92/m//

LOADPATH = :

Octave does not allow these variables to be changed inside octave.  I had to modify the /opt/octave/bin/octave.sh script to add the options as follows:

/opt/octave/bin/octave --exec-path /opt/octave/bin/octave/ -p /opt/octave/lib/octave/2.0.16.92/oct/i386-pc-linux-gnu/

Afterwards, clicking on octave from the myDSL menu produced the application window, where I confirmed that the non-built-in functions I need are working.

I was trying to replace the octave.sh file inside the octave.tar.gz, but I keep on hitting that wall that clacker described in his really old post.  So for the moment, I am sticking to my solution with the hope that someone more competent than I am can dumb down that thread a bit to my level.
Back to top
Profile PM 
aesenadorjr Offline





Group: Members
Posts: 11
Joined: Feb. 2005
Posted: Feb. 11 2005,21:55 QUOTE

Additional bug on Octave extension:

The function files (called m-files) cannot be found by Octave, but they are actually present in /opt/octave/share/octave/2.0.16.92/m/.  For example, the statistical functions will not be available unless you edit the /opt/octave/bin/octave.sh script and include the necessary path using the option "-p".

I am still learning how to repackage the octave extension, and thus far I think I got it to work.  Right now I am sampling the documented functions to check for other missing links to the function library.  If you don't know how to repackage (or scared to try)  you can solve the issues I reported here and in my previous post by opening the script /opt/octave/bin/octave.sh using Beaver (or any text editor), then make sure the contents are as follows:


#!/bin/bash

export LD_LIBRARY_PATH="/opt/octave/lib/octave-2.0.16.92/"
/opt/octave/bin/octave --exec-path /opt/octave/bin:/usr/bin -p /opt/octave/lib/octave/2.0.16.92/oct/i386-pc-linux-gnu//:/opt/octave/share/octave/2.0.16.92/m//[

Note that there are *two* paths specified for the -p option, and they are separated by a colon.  Also, the "//" at the end of the paths are important since these indicate that directories under the paths will be searched recursively.

So why not just use "-p /opt/octave//"?  Because according to the octave manual, recursive searching of the directories will slow down the execution of the commands.

Note the option "--exec-path" also contain "/usr/bin" because otherwise the "less" pager will not be found by octave and, consequently, you will not be able to display the output of the commands if these are larger than one screenfull.

That's all for now...
Back to top
Profile PM 
aesenadorjr Offline





Group: Members
Posts: 11
Joined: Feb. 2005
Posted: Feb. 11 2005,22:00 QUOTE

There should be no "[" at the end of "...octave/2.0.16.92/m//".  My fingers hit the key when I pressed Enter, and it was at the edge of the text box so I did not notice it.  Sorry for that.
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: Feb. 11 2005,23:46 QUOTE

thanks, sorry I missed that.  I hope it works for you now.
Back to top
Profile PM 
aesenadorjr Offline





Group: Members
Posts: 11
Joined: Feb. 2005
Posted: Feb. 17 2005,00:59 QUOTE

Update on this octave extension "bug".

The extension worked fine in 0.8.3, so I looked some more through the octave.tar.gz file.  Apparently, the home directory where the .octaverc file will be placed is still /home/damnsmall/.  My guess is on the newer versions of DSL (e.g. 0.9.3), where the home directory was renamed to the child-safe /home/dsl and the symlink /home/damnsmall was ditched, the .octaverc file just did not find its way to the home directory.

To confirm this, I did my *first* no-error-messages-generated repackaging of the octave.tar.gz this way, following the steps written by ke4nt1 in a previous post:

1. Fluxbox Menu -> XShells -> Root Access
2. mkdir work
3. cd work
4. cp /cdrom/optional/octave.tar.gz .
5. tar -tzf octave.tar.gz > w.txt
6. tar -xzf octave.tar.gz
7. vi w.txt
    ... then change the entry home/damnsmall/.octaverc to home/dsl/.octaverc and then save/quit ...
8. mv home/damnsmall home/dsl
9. tar -T w.txt --no-recursion --numeric-owner -cf - | gzip > octave.tar.gz
10. chown dsl:staff octave.tar.gz
11. mv octave.tar.gz ../
12. Fluxbox Menu -> XShells -> Rxvt Dark
13. mydsl-load octave.tar.gz
14. Fluxbox Menu -> myDSL -> octave

The problems listed on my posts above disappeared.  Whether I made any mistakes, I know not ...
Back to top
Profile PM 
4 replies since Feb. 11 2005,03:38 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Octave extension bug

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code