Help with Octave standalone

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with Octave standalone

ashwin damle
Hello,

I am unable to run the interpreter from within a C++ program. I am using Windows 10 64 bit; GNU Octave version 5.2.0. Attached is the script I am using.

The script is actually the same as the standalone program at https://octave.org/doc/v5.2.0/Standalone-Programs.html except that there is a function call to load a package - 
 octave::feval ("pkg", ovl ("load", "control"), 0); 

The error I am getting is 

"
error: 'fullfile' undefined near line 5 column 21
error: called from
    C:\Octave\Octave-5.2.0\mingw64\share\octave\site\m\startup/octaverc at line 5 column 1
error: feval: function 'pkg' not found
error encountered in Octave evaluator!
"
I had a similar problem before which was solved by exporting the OCTAVE_HOME environment. Please see https://octave.1599824.n4.nabble.com/error-feval-function-pkg-m-not-found-td4688911.html 

However, this time it is a new error. I am using GNU Octave Version 5.2.0 64 bit configured for "x86_64-w64-mingw32" on Windows 10. Works on Linux not on windows 10.

Please help me with solving this issue.

Thank you.

Ashwin Damle



embedded.cc (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Mike Miller-4
On Wed, Feb 19, 2020 at 17:25:29 +0530, ashwin damle wrote:
> I am unable to run the interpreter from within a C++ program. I am using
> Windows 10 64 bit; GNU Octave version 5.2.0. Attached is the script I am
> using.

The attached program looks fine and works for me.

> error: 'fullfile' undefined near line 5 column 21
> error: called from
>     C:\Octave\Octave-5.2.0\mingw64\share\octave\site\m\startup/octaverc at
> line 5 column 1
> error: feval: function 'pkg' not found
> error encountered in Octave evaluator!

These errors clearly indicate that the default load path hasn't been
initialized properly, since all m-file functions are missing.

> I had a similar problem before which was solved by exporting the
> OCTAVE_HOME environment.

My guess remains the same as before, OCTAVE_HOME needs to be set to the
directory containing Octave to set up the load path correctly.

When I run your program with OCTAVE_HOME set correctly, it works for me
on both Debian and Windows 10.

Cheers,

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

ashwin damle


On Wed, 19 Feb 2020, 23:20 Mike Miller, <[hidden email]> wrote:
On Wed, Feb 19, 2020 at 17:25:29 +0530, ashwin damle wrote:
> I am unable to run the interpreter from within a C++ program. I am using
> Windows 10 64 bit; GNU Octave version 5.2.0. Attached is the script I am
> using.

The attached program looks fine and works for me.

> error: 'fullfile' undefined near line 5 column 21
> error: called from
>     C:\Octave\Octave-5.2.0\mingw64\share\octave\site\m\startup/octaverc at
> line 5 column 1
> error: feval: function 'pkg' not found
> error encountered in Octave evaluator!

These errors clearly indicate that the default load path hasn't been
initialized properly, since all m-file functions are missing.

> I had a similar problem before which was solved by exporting the
> OCTAVE_HOME environment.

My guess remains the same as before, OCTAVE_HOME needs to be set to the
directory containing Octave to set up the load path correctly.

When I run your program with OCTAVE_HOME set correctly, it works for me
on both Debian and Windows 10.

Cheers,

--
mike

Hi Mike,
What is your OCTAVE_HOME set to?
Thanks,
Ashwin 


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

ashwin damle


On Thu, 20 Feb 2020 at 09:32, ashwin damle <[hidden email]> wrote:


On Wed, 19 Feb 2020, 23:20 Mike Miller, <[hidden email]> wrote:
On Wed, Feb 19, 2020 at 17:25:29 +0530, ashwin damle wrote:
> I am unable to run the interpreter from within a C++ program. I am using
> Windows 10 64 bit; GNU Octave version 5.2.0. Attached is the script I am
> using.

The attached program looks fine and works for me.

> error: 'fullfile' undefined near line 5 column 21
> error: called from
>     C:\Octave\Octave-5.2.0\mingw64\share\octave\site\m\startup/octaverc at
> line 5 column 1
> error: feval: function 'pkg' not found
> error encountered in Octave evaluator!

These errors clearly indicate that the default load path hasn't been
initialized properly, since all m-file functions are missing.

> I had a similar problem before which was solved by exporting the
> OCTAVE_HOME environment.

My guess remains the same as before, OCTAVE_HOME needs to be set to the
directory containing Octave to set up the load path correctly.

When I run your program with OCTAVE_HOME set correctly, it works for me
on both Debian and Windows 10.

Cheers,

--
mike

Hi Mike,
What is your OCTAVE_HOME set to?
Thanks,
Ashwin 

Hello,

Could you please let me know how you set the OCTAVE_HOME in your windows 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64. It does not work. Please guide.
--
Ashwin Damle


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Mike Miller-4
On Fri, Mar 13, 2020 at 05:08:50 +0530, ashwin damle wrote:
> Could you please let me know how you set the OCTAVE_HOME in your windows
> 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64.

I'm not sure how it helps, since Octave can install in any directory,
but I set OCTAVE_HOME to C:\Program Files\Octave\5.2.0\mingw64.

> It does not work. Please guide.

It works for me.

Good luck,

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

ashwin damle


On Fri, 13 Mar 2020 at 06:43, Mike Miller <[hidden email]> wrote:
On Fri, Mar 13, 2020 at 05:08:50 +0530, ashwin damle wrote:
> Could you please let me know how you set the OCTAVE_HOME in your windows
> 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64.

I'm not sure how it helps, since Octave can install in any directory,
but I set OCTAVE_HOME to C:\Program Files\Octave\5.2.0\mingw64.

> It does not work. Please guide.

It works for me.

Good luck,

--
mike

Hello,

I will try and update you on this. I have no idea why it is not working. I have done this before and it worked with older version of GNU Octave. I will check.

At least I know that I am not doing anything incorrect.

Thank you.
Ashwin
--
Ashwin Damle


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

ashwin damle


On Fri, 13 Mar 2020 at 09:21, ashwin damle <[hidden email]> wrote:


On Fri, 13 Mar 2020 at 06:43, Mike Miller <[hidden email]> wrote:
On Fri, Mar 13, 2020 at 05:08:50 +0530, ashwin damle wrote:
> Could you please let me know how you set the OCTAVE_HOME in your windows
> 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64.

I'm not sure how it helps, since Octave can install in any directory,
but I set OCTAVE_HOME to C:\Program Files\Octave\5.2.0\mingw64.

> It does not work. Please guide.

It works for me.

Good luck,

--
mike

Hello,

I will try and update you on this. I have no idea why it is not working. I have done this before and it worked with older version of GNU Octave. I will check.

At least I know that I am not doing anything incorrect.

Thank you.
Ashwin
--
Ashwin Damle

Hello Support,

FYI, v4.4.1 does not show the above problem.

I cannot fathom why I am not able to use v 5.2. I used version 4.4.1 for now.

Thanks,
--
Ashwin Damle


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Ian McCallion
On Fri, 13 Mar 2020 at 15:21, ashwin damle <[hidden email]> wrote:

>
>
>
> On Fri, 13 Mar 2020 at 09:21, ashwin damle <[hidden email]> wrote:
>>
>>
>>
>> On Fri, 13 Mar 2020 at 06:43, Mike Miller <[hidden email]> wrote:
>>>
>>> On Fri, Mar 13, 2020 at 05:08:50 +0530, ashwin damle wrote:
>>> > Could you please let me know how you set the OCTAVE_HOME in your windows
>>> > 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64.
>>>
>>> I'm not sure how it helps, since Octave can install in any directory,
>>> but I set OCTAVE_HOME to C:\Program Files\Octave\5.2.0\mingw64.
>>>
>>> > It does not work. Please guide.
>>>
>>> It works for me.
>>>
>>> Good luck,
>>>
>>> --
>>> mike
>>
>>
>> Hello,
>>
>> I will try and update you on this. I have no idea why it is not working. I have done this before and it worked with older version of GNU Octave. I will check.
>>
>> At least I know that I am not doing anything incorrect.
>>
>> Thank you.
>> Ashwin
>> --
>> Ashwin Damle
>
>
> Hello Support,
>
> FYI, v4.4.1 does not show the above problem.
>
> I cannot fathom why I am not able to use v 5.2. I used version 4.4.1 for now.
>
> Thanks,
> --
> Ashwin Damle

I am having a related problem. I'm not invoking the interpreter from
C++ but from a commandline, but I need to call octave-cli.exe directly
rather than via octave.vbs because the latter creates a new
commandline window. Prior to Octave 5 there was no problem, but with
Octave 5.2 suddenly graphics_toolkit('qt'), at least, does not work.
The octave.vbs sets up several environment variables before calling
octave.exe and clearly these need to be duplicated. I will report back
when I've decoded octave.vbs.

Cheers... Ian


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Ian McCallion
On Fri, 13 Mar 2020 at 16:37, Ian McCallion <[hidden email]> wrote:

>
> On Fri, 13 Mar 2020 at 15:21, ashwin damle <[hidden email]> wrote:
> >
> >
> >
> > On Fri, 13 Mar 2020 at 09:21, ashwin damle <[hidden email]> wrote:
> >>
> >>
> >>
> >> On Fri, 13 Mar 2020 at 06:43, Mike Miller <[hidden email]> wrote:
> >>>
> >>> On Fri, Mar 13, 2020 at 05:08:50 +0530, ashwin damle wrote:
> >>> > Could you please let me know how you set the OCTAVE_HOME in your windows
> >>> > 10? I added a variable called OCTAVE_HOME->C:\Octave\Octave-5.2.0\mingw64.
> >>>
> >>> I'm not sure how it helps, since Octave can install in any directory,
> >>> but I set OCTAVE_HOME to C:\Program Files\Octave\5.2.0\mingw64.
> >>>
> >>> > It does not work. Please guide.
> >>>
> >>> It works for me.
> >>>
> >>> Good luck,
> >>>
> >>> --
> >>> mike
> >>
> >>
> >> Hello,
> >>
> >> I will try and update you on this. I have no idea why it is not working. I have done this before and it worked with older version of GNU Octave. I will check.
> >>
> >> At least I know that I am not doing anything incorrect.
> >>
> >> Thank you.
> >> Ashwin
> >> --
> >> Ashwin Damle
> >
> >
> > Hello Support,
> >
> > FYI, v4.4.1 does not show the above problem.
> >
> > I cannot fathom why I am not able to use v 5.2. I used version 4.4.1 for now.
> >
> > Thanks,
> > --
> > Ashwin Damle
>
> I am having a related problem. I'm not invoking the interpreter from
> C++ but from a commandline, but I need to call octave-cli.exe directly
> rather than via octave.vbs because the latter creates a new
> commandline window. Prior to Octave 5 there was no problem, but with
> Octave 5.2 suddenly graphics_toolkit('qt'), at least, does not work.
> The octave.vbs sets up several environment variables before calling
> octave.exe and clearly these need to be duplicated. I will report back
> when I've decoded octave.vbs.

I am having great difficulty with this and I think there is a bug in
Octave 5.2 although I'd be happy to be proved wrong.

The script below demonstrates the problem:
----------------------------
 graphics_toolkit('qt');
myfont={'fontsize',25,'fontweight','bold'};
mygraphs={'-dpng','-S800,800'};
mywidegraphs={'-dpng','-S1800,800'};
set(0, 'defaulttextfontsize', 15)
figure(1, 'visible', 'off')
        xrange = 1:10;
ssd=xrange.+rand(1,10);
plot(xrange, [ssd; mean(ssd)*ones(1,10)], 'Linewidth',2);
legend('Actual','Average over touch')
axis([0, xrange(end)+2, min(ssd)-5, 5+max(10,max(ssd))])
xlabel('Row number', myfont{:})
ylabel('Milliseconds', myfont{:})
title('Standard Deviation (Touch only)', myfont{:})
grid ('on')
print (1, [graphics_toolkit, '1.png'], mywidegraphs{:})
------------------------
It runs fine when launching Octave from a commandline using the command
- c:\octave\octave-5.2.0\octave.vbs
- C:\octave\octave-5.2.0\octave.vbs --no-gui
- C:\octave\octave-5.2.0\mingw64\bin\octave.bat --gui
It fails when when launching Octave from a commandline using the command
- C:\octave\octave-5.2.0\mingw64\bin\octave.bat --no-gui
and the resulting output is given below.
--------------------------
octave:6> plottest
   *** Building graphs
error: graphics_toolkit: qt toolkit is not available
error: called from
    graphics_toolkit at line 81 column 5
    plottest at line 2 column 3
octave:6>
--------------------------------

The common property of the situations in which it works is that a new
window is launched for all of them, and in the case where it does not
work Octave "borrows" the commandline window it was launched from.

Unfortunately for me this is a show-stopper for use of 5.2.0 so I will
be happy to run other tests as needed to help track down the problem.

Cheers... Ian


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

mmuetzel
Am 15. März 2020 um 13:00 Uhr schrieb "Ian McCallion":

> On Fri, 13 Mar 2020 at 16:37, Ian McCallion <[hidden email]> wrote:
>
> I am having great difficulty with this and I think there is a bug in
> Octave 5.2 although I'd be happy to be proved wrong.
>
> The script below demonstrates the problem:
> ----------------------------
>  graphics_toolkit('qt');
> myfont={'fontsize',25,'fontweight','bold'};
> mygraphs={'-dpng','-S800,800'};
> mywidegraphs={'-dpng','-S1800,800'};
> set(0, 'defaulttextfontsize', 15)
> figure(1, 'visible', 'off')
>         xrange = 1:10;
> ssd=xrange.+rand(1,10);
> plot(xrange, [ssd; mean(ssd)*ones(1,10)], 'Linewidth',2);
> legend('Actual','Average over touch')
> axis([0, xrange(end)+2, min(ssd)-5, 5+max(10,max(ssd))])
> xlabel('Row number', myfont{:})
> ylabel('Milliseconds', myfont{:})
> title('Standard Deviation (Touch only)', myfont{:})
> grid ('on')
> print (1, [graphics_toolkit, '1.png'], mywidegraphs{:})
> ------------------------
> It runs fine when launching Octave from a commandline using the command
> - c:\octave\octave-5.2.0\octave.vbs
> - C:\octave\octave-5.2.0\octave.vbs --no-gui
> - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --gui
> It fails when when launching Octave from a commandline using the command
> - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --no-gui
> and the resulting output is given below.
> --------------------------
> octave:6> plottest
>    *** Building graphs
> error: graphics_toolkit: qt toolkit is not available
> error: called from
>     graphics_toolkit at line 81 column 5
>     plottest at line 2 column 3
> octave:6>
> --------------------------------
>
> The common property of the situations in which it works is that a new
> window is launched for all of them, and in the case where it does not
> work Octave "borrows" the commandline window it was launched from.
>
> Unfortunately for me this is a show-stopper for use of 5.2.0 so I will
> be happy to run other tests as needed to help track down the problem.
>
> Cheers... Ian

"octave.bat --no-gui" runs octave-cli.exe which isn't linked against Qt. So you won't be able to use "graphics_toolkit ('qt')" with it.
Use one of the other ways you've shown to start Octave to use "graphics_toolkit ('qt')".

HTH,
Markus


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Ian McCallion
On Sun, 15 Mar 2020 at 12:36, "Markus Mützel" <[hidden email]> wrote:

>
> Am 15. März 2020 um 13:00 Uhr schrieb "Ian McCallion":
> > On Fri, 13 Mar 2020 at 16:37, Ian McCallion <[hidden email]> wrote:
> >
> > I am having great difficulty with this and I think there is a bug in
> > Octave 5.2 although I'd be happy to be proved wrong.
> >
> > The script below demonstrates the problem:
> > ----------------------------
> >  graphics_toolkit('qt');
> > myfont={'fontsize',25,'fontweight','bold'};
> > mygraphs={'-dpng','-S800,800'};
> > mywidegraphs={'-dpng','-S1800,800'};
> > set(0, 'defaulttextfontsize', 15)
> > figure(1, 'visible', 'off')
> >         xrange = 1:10;
> > ssd=xrange.+rand(1,10);
> > plot(xrange, [ssd; mean(ssd)*ones(1,10)], 'Linewidth',2);
> > legend('Actual','Average over touch')
> > axis([0, xrange(end)+2, min(ssd)-5, 5+max(10,max(ssd))])
> > xlabel('Row number', myfont{:})
> > ylabel('Milliseconds', myfont{:})
> > title('Standard Deviation (Touch only)', myfont{:})
> > grid ('on')
> > print (1, [graphics_toolkit, '1.png'], mywidegraphs{:})
> > ------------------------
> > It runs fine when launching Octave from a commandline using the command
> > - c:\octave\octave-5.2.0\octave.vbs
> > - C:\octave\octave-5.2.0\octave.vbs --no-gui
> > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --gui
> > It fails when when launching Octave from a commandline using the command
> > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --no-gui
> > and the resulting output is given below.
> > --------------------------
> > octave:6> plottest
> >    *** Building graphs
> > error: graphics_toolkit: qt toolkit is not available
> > error: called from
> >     graphics_toolkit at line 81 column 5
> >     plottest at line 2 column 3
> > octave:6>
> > --------------------------------
> >
> > The common property of the situations in which it works is that a new
> > window is launched for all of them, and in the case where it does not
> > work Octave "borrows" the commandline window it was launched from.
> >
> > Unfortunately for me this is a show-stopper for use of 5.2.0 so I will
> > be happy to run other tests as needed to help track down the problem.
> >
> > Cheers... Ian
>
> "octave.bat --no-gui" runs octave-cli.exe which isn't linked against Qt. So you won't be able to use "graphics_toolkit ('qt')" with it.

Hi Markus, Thanks for the clear definitive answer.

> Use one of the other ways you've shown to start Octave to use "graphics_toolkit ('qt')".

Unfortunately, as the other ways produce a second window when launched
from and existing commandline window they are not a solution for me
because my user workflow runs in a windows commandline window, and the
user needs to see the output of his commands (some of which use
Octave) in the window.

I switched to qt from gnuplot as recommended a few months ago on this
list because in 5.2.0, gnuplot and fltk both produce warning messages
as shown in the following output:
--------------------------
octave:4> plottest
Plot a graph using gnuplot
DEBUG: FC_WEIGHT didn't match
Elapsed time is 1.02322 seconds.
Graph plotted
octave:5> plottest
Plot a graph using fltk
DEBUG: FC_WEIGHT didn't match
Elapsed time is 1.0631 seconds.
Graph plotted
--------------------------

Given the choice between staying on 4.4.1 and using Qt vs moving to
5.2.0 and getting spurious DEBUG: messages I will go with the second
choice and tell users to ignore the messages.

Will octave-cli.exe at some point be linked against Qt?

Cheers... Ian


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

mmuetzel
Am 15. März 2020 um 15:28 Uhr schrieb "Ian McCallion":

> On Sun, 15 Mar 2020 at 12:36, "Markus Mützel" <[hidden email]> wrote:
> >
> > Am 15. März 2020 um 13:00 Uhr schrieb "Ian McCallion":
> > > On Fri, 13 Mar 2020 at 16:37, Ian McCallion <[hidden email]> wrote:
> > >
> > > I am having great difficulty with this and I think there is a bug in
> > > Octave 5.2 although I'd be happy to be proved wrong.
> > >
> > > The script below demonstrates the problem:
> > > ----------------------------
> > >  graphics_toolkit('qt');
> > > myfont={'fontsize',25,'fontweight','bold'};
> > > mygraphs={'-dpng','-S800,800'};
> > > mywidegraphs={'-dpng','-S1800,800'};
> > > set(0, 'defaulttextfontsize', 15)
> > > figure(1, 'visible', 'off')
> > >         xrange = 1:10;
> > > ssd=xrange.+rand(1,10);
> > > plot(xrange, [ssd; mean(ssd)*ones(1,10)], 'Linewidth',2);
> > > legend('Actual','Average over touch')
> > > axis([0, xrange(end)+2, min(ssd)-5, 5+max(10,max(ssd))])
> > > xlabel('Row number', myfont{:})
> > > ylabel('Milliseconds', myfont{:})
> > > title('Standard Deviation (Touch only)', myfont{:})
> > > grid ('on')
> > > print (1, [graphics_toolkit, '1.png'], mywidegraphs{:})
> > > ------------------------
> > > It runs fine when launching Octave from a commandline using the command
> > > - c:\octave\octave-5.2.0\octave.vbs
> > > - C:\octave\octave-5.2.0\octave.vbs --no-gui
> > > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --gui
> > > It fails when when launching Octave from a commandline using the command
> > > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --no-gui
> > > and the resulting output is given below.
> > > --------------------------
> > > octave:6> plottest
> > >    *** Building graphs
> > > error: graphics_toolkit: qt toolkit is not available
> > > error: called from
> > >     graphics_toolkit at line 81 column 5
> > >     plottest at line 2 column 3
> > > octave:6>
> > > --------------------------------
> > >
> > > The common property of the situations in which it works is that a new
> > > window is launched for all of them, and in the case where it does not
> > > work Octave "borrows" the commandline window it was launched from.
> > >
> > > Unfortunately for me this is a show-stopper for use of 5.2.0 so I will
> > > be happy to run other tests as needed to help track down the problem.
> > >
> > > Cheers... Ian
> >
> > "octave.bat --no-gui" runs octave-cli.exe which isn't linked against Qt. So you won't be able to use "graphics_toolkit ('qt')" with it.
>
> Hi Markus, Thanks for the clear definitive answer.
>
> > Use one of the other ways you've shown to start Octave to use "graphics_toolkit ('qt')".
>
> Unfortunately, as the other ways produce a second window when launched
> from and existing commandline window they are not a solution for me
> because my user workflow runs in a windows commandline window, and the
> user needs to see the output of his commands (some of which use
> Octave) in the window.
>
> I switched to qt from gnuplot as recommended a few months ago on this
> list because in 5.2.0, gnuplot and fltk both produce warning messages
> as shown in the following output:
> --------------------------
> octave:4> plottest
> Plot a graph using gnuplot
> DEBUG: FC_WEIGHT didn't match
> Elapsed time is 1.02322 seconds.
> Graph plotted
> octave:5> plottest
> Plot a graph using fltk
> DEBUG: FC_WEIGHT didn't match
> Elapsed time is 1.0631 seconds.
> Graph plotted
> --------------------------
>
> Given the choice between staying on 4.4.1 and using Qt vs moving to
> 5.2.0 and getting spurious DEBUG: messages I will go with the second
> choice and tell users to ignore the messages.
>
> Will octave-cli.exe at some point be linked against Qt?

I don't think this will happen because it is basically the main difference between octave-cli and octave-gui.

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

Ian McCallion
On Sun, 15 Mar 2020 at 14:53, "Markus Mützel" <[hidden email]> wrote:

>
> Am 15. März 2020 um 15:28 Uhr schrieb "Ian McCallion":
> > On Sun, 15 Mar 2020 at 12:36, "Markus Mützel" <[hidden email]> wrote:
> > >
> > > Am 15. März 2020 um 13:00 Uhr schrieb "Ian McCallion":
> > > > On Fri, 13 Mar 2020 at 16:37, Ian McCallion <[hidden email]> wrote:
> > > >
> > > > I am having great difficulty with this and I think there is a bug in
> > > > Octave 5.2 although I'd be happy to be proved wrong.
> > > >
> > > > The script below demonstrates the problem:
> > > > ----------------------------
> > > >  graphics_toolkit('qt');
> > > > myfont={'fontsize',25,'fontweight','bold'};
> > > > mygraphs={'-dpng','-S800,800'};
> > > > mywidegraphs={'-dpng','-S1800,800'};
> > > > set(0, 'defaulttextfontsize', 15)
> > > > figure(1, 'visible', 'off')
> > > >         xrange = 1:10;
> > > > ssd=xrange.+rand(1,10);
> > > > plot(xrange, [ssd; mean(ssd)*ones(1,10)], 'Linewidth',2);
> > > > legend('Actual','Average over touch')
> > > > axis([0, xrange(end)+2, min(ssd)-5, 5+max(10,max(ssd))])
> > > > xlabel('Row number', myfont{:})
> > > > ylabel('Milliseconds', myfont{:})
> > > > title('Standard Deviation (Touch only)', myfont{:})
> > > > grid ('on')
> > > > print (1, [graphics_toolkit, '1.png'], mywidegraphs{:})
> > > > ------------------------
> > > > It runs fine when launching Octave from a commandline using the command
> > > > - c:\octave\octave-5.2.0\octave.vbs
> > > > - C:\octave\octave-5.2.0\octave.vbs --no-gui
> > > > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --gui
> > > > It fails when when launching Octave from a commandline using the command
> > > > - C:\octave\octave-5.2.0\mingw64\bin\octave.bat --no-gui
> > > > and the resulting output is given below.
> > > > --------------------------
> > > > octave:6> plottest
> > > >    *** Building graphs
> > > > error: graphics_toolkit: qt toolkit is not available
> > > > error: called from
> > > >     graphics_toolkit at line 81 column 5
> > > >     plottest at line 2 column 3
> > > > octave:6>
> > > > --------------------------------
> > > >
> > > > The common property of the situations in which it works is that a new
> > > > window is launched for all of them, and in the case where it does not
> > > > work Octave "borrows" the commandline window it was launched from.
> > > >
> > > > Unfortunately for me this is a show-stopper for use of 5.2.0 so I will
> > > > be happy to run other tests as needed to help track down the problem.
> > > >
> > > > Cheers... Ian
> > >
> > > "octave.bat --no-gui" runs octave-cli.exe which isn't linked against Qt. So you won't be able to use "graphics_toolkit ('qt')" with it.
> >
> > Hi Markus, Thanks for the clear definitive answer.
> >
> > > Use one of the other ways you've shown to start Octave to use "graphics_toolkit ('qt')".
> >
> > Unfortunately, as the other ways produce a second window when launched
> > from and existing commandline window they are not a solution for me
> > because my user workflow runs in a windows commandline window, and the
> > user needs to see the output of his commands (some of which use
> > Octave) in the window.
> >
> > I switched to qt from gnuplot as recommended a few months ago on this
> > list because in 5.2.0, gnuplot and fltk both produce warning messages
> > as shown in the following output:
> > --------------------------
> > octave:4> plottest
> > Plot a graph using gnuplot
> > DEBUG: FC_WEIGHT didn't match
> > Elapsed time is 1.02322 seconds.
> > Graph plotted
> > octave:5> plottest
> > Plot a graph using fltk
> > DEBUG: FC_WEIGHT didn't match
> > Elapsed time is 1.0631 seconds.
> > Graph plotted
> > --------------------------
> >
> > Given the choice between staying on 4.4.1 and using Qt vs moving to
> > 5.2.0 and getting spurious DEBUG: messages I will go with the second
> > choice and tell users to ignore the messages.
> >
> > Will octave-cli.exe at some point be linked against Qt?
>
> I don't think this will happen because it is basically the main difference between octave-cli and octave-gui.
>
> Markus

OK. Thanks again. So the final follow-up question is, is there work
going on to avoid emitting the spurious DEBUG message?

Cheers... Ian


Reply | Threaded
Open this post in threaded view
|

Re: Help with Octave standalone

mmuetzel
Am 15. März 2020 um 16:47 Uhr schrieb "Ian McCallion":
> OK. Thanks again. So the final follow-up question is, is there work
> going on to avoid emitting the spurious DEBUG message?

I also see this when I print using the gnuplot graphics toolkit on Windows.
I think I remember having read about it before. But I can't find a bug report about it right now.
Please, feel free to open a bug report about the spurious warning on Savannah [1]. Maybe someone will take it up.

Markus

[1): https://savannah.gnu.org/bugs/?func=additem&group=octave