[Top][All Lists]

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

Re: Newbie problem running *.m files on Octave 3.4.2 on Snow Leopard

From: Jordi Gutiérrez Hermoso
Subject: Re: Newbie problem running *.m files on Octave 3.4.2 on Snow Leopard
Date: Sat, 30 Jul 2011 21:24:22 -0500

2011/7/30 John Helly <address@hidden>:

> > On Jul 30, 2011, at 3:56 PM, Jordi Gutiérrez Hermoso wrote:
> >
> > On 30 July 2011 20:41, John Helly <address@hidden> wrote:

> >> I've put /Applications/ in my path and
> >> aliased octave='Octave' and I can start 'octave' from the
> >> Terminal command-line but whether I give it a *.m filename or not
> >> it always opens up an interactive session.
> >
> > What did you type, what was the exact output? I find it odd that
> > if you type "octave -q foo.m", you end up in an interactive
> > session, if this is indeed what you're doing.

> Thanks very much. I didn't know about the -q switch but it doesn't
> seem to have any effect.

That is precisely its effect, to suppress output ("[q]uiet"), i.e. to
not show the startup message about the license, etc.

> Here's a screen grab of what happens. The upper window is the
> command-line invocation and the lower window is the result.  Nothing
> else happens.

Why do you think the lower window is the result? Did that lower window
pop up when you type "octave -q bike_example.m"? Did you check that
this did not produce any output, e.g. an image or data file in the
current directory? Is bike_example.m perhaps supposed to display an
image on screen? If so, you may need to add "pause" at the end of the

If bike_example.m is only a function file, not a script file,
executing it this way accomplishes nothing but to define that function
and immediately exit, but not to execute the code in the function. If
this is the case, try

     octave -q --eval "bike_example(some, parameters, 1, 2, 3)"


> >> I've also tried building octave-3.4.2 but it fails with a flex
> >> problem in that seems to be an old problem and I
> >> can't figure that out.
> >
> > Can you say what the problem is? Just post the error messages you
> > see.

> error: #error lex.l requires flex version 2.5.4
> or later

Oh, yes. Apple ships ancient versions of GNU software because they
refuse to ship anything under the GPLv3 (which, btw, Octave uses). I
believe it's possible to still easily obtain newer versions through
3rd-party channels not restricted by Apple, but I am not sure how.

However, I'm confused. I thought you only needed flex if you needed to
rebuild a tarball or modify the parser. I hope someone else can
comment on why you're seeing this; it shouldn't happen from a tarball.

> >> I then tried building from the source gotten from
> >>
> >> hg clone
> >>
> >> but that doesn't seem to have configure bundled with it.
> >
> > These are developer sources and not recommended unless you want to
> > help with Octave's development itself. You have to build your own
> > configure script using GNU autotools if you want to work from the
> > hg sources. If you have installed autotools (and git, and probably
> > many many other things), do "./" to produce a configure
> > script.

> And I will run the autogen to see if that helps.

Unlikely. If you're having trouble building from a tarball, building
from the developers' sources is going to be even more trouble.

- Jordi G. H.

reply via email to

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