help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building octave 2.9.5 on Tiger


From: Daniel Oberhoff
Subject: Re: building octave 2.9.5 on Tiger
Date: Sat, 24 Jun 2006 20:56:14 +0200

Hi, ok, getting there :).

No, the PKG_ADD file is from 2.9, it's the same as in src/. But I spilled some debug info out of mk-pkg-add and it seems that this line:

fcns=`$SED -n -e 's/XDEFUN\(X\|\)_DLD_INTERNAL *( *\("\|\)\ ([^", ]*\)[", ].*$/\3/p' $f | sort -u`

is broken on my system. It does not ever report a match. $fcns is then used to construct the autoload directives, so that produces my problem.

After some playing around I found that \(X\|\) and \("\|\) break it. Also subsituting with X\? and "\? does not work, following man re_format:

[...]
Obsolete (``basic'') regular expressions differ in several respects. `|' is an ordinary character and there is no equivalent for its functional- ity. `+' and `?' are ordinary characters, and their functionality can be
     expressed using bounds (`{1,}' or `{0,1}' respectively).
[...]


on my system I found that \? could be substituted by \{0,1\} so now I have

fcns=`$SED -n -e 's/XDEFUNX\{0,1\}_DLD_INTERNAL *( *"\{0,1\}\ ([^", ]*\)[", ].*$/\1/p' $f | sort -u`

and it works and should have the same behaviour. Must be Apple (or BSD) behaving different again (as with readline).

Anyhow, problem solved :). Thanks for the pointer!

Daniel

Am Jun 24, 2006 um 7:18 PM schrieb John W. Eaton:

On 24-Jun-2006, Daniel Oberhoff wrote:

| Ok, I checked, and all the symlinks are to octave 2.9.6. I had some
| parts of the older installation lying around which i now deleted (in /
| usr/local/share/octave and /usr/local/libexec/octave) and also
| modified the ls-R files accordingly. I found a startup script in / usr/
| local/share/octave/site/m/startup/octaverc but it's empty. Also I do
| not currently have a user octaverc (and before it only had references
| to load in octave forge and other packages which are not there
| currently). The only file I found that mentions min, max and
| __gnuplot_plot__ (besides just calling them) if PKG_ADD in /usr/ local/
| libexec/oct/, but there is no reference to the actual oct file:
|
| mark_as_rawcommand ("__gnuplot_plot__");
| dispatch ("min", "spmin", "sparse matrix");
| dispatch ("min", "spmin", "sparse complex matrix");
| dispatch ("min", "spmin", "sparse bool matrix");
| dispatch ("max", "spmax", "sparse matrix");
| dispatch ("max", "spmax", "sparse complex matrix");
| dispatch ("max", "spmax", "sparse bool matrix");
|
|   I suppose the latter ones are just type morphic redispatchers to
| call spmin instead of min for sparse matrices.
|
| What's the canonical way of pointing octave to functions inside oct
| files? Coz I also couldn't find any manual on how this works (how do
| extension developers do it?).

In 2.9.6, you should also have some lines like this:

autoload ("__gnuplot_plot__", fullfile (fileparts (mfilename ("fullpath")), "__gnuplot_raw__.oct")); autoload ("__gnuplot_replot__", fullfile (fileparts (mfilename ("fullpath")), "__gnuplot_raw__.oct"));

in the PKG_ADD file that is in the directory with the .oct files.

Sorry that this is not well-documented, but you are using a
development version...

If you don't have any autoload commands in the PKG_ADD file, then
multiple functions in a .oct file will not work properly.  If the
autoload commands are missing, then something went wrong when the
PKG_ADD file was constructed.  Are you sure the PKG_ADD file you have
installed is actually from 2.9.6?

Also, Octave no longer uses the ls-R file, so it seems you still have
some files left over from an earlier installation.  I'd recommend
removing all that you can find and doing a fresh install.

| what I also found is df files in the src directory of the
| distribution, which seem to contain definitions of all the function,
| but do not get installed anywhere...

Those files are just used during the build process to keep track of
some information extracted from the source files.  They are not
intended to be installed.

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]