bugGNU Octave - Bugs: bug #56416, Incorrect octave.bat - missing...


bug #56416: Incorrect octave.bat - missing MSYSTEM, usr\bin, qt graphics

Submitted by:  None
Submitted on:  Thu 30 May 2019 12:06:07 AM UTC  
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Benjamin Szőke Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.1.0
Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Thu 18 Jul 2019 11:59:16 AM UTC, comment #12: 

For example, running from command line:


octave-cli --no-gui --norc --eval "pause(10); a=1"

runs the command and then returns, so something like X=`octave-cli --no-gui --norc --eval "pause(10); a=1"` would work.


octave-gui --no-gui --norc --eval "pause(10); a=1"

Returns straight away, so something like X=`octave-gui --no-gui --norc --eval "pause(10); a=1"` would NOT work.

John Donoghue <lostbard>
Project Member
Wed 17 Jul 2019 11:20:33 PM UTC, comment #11: 

The gui does not wait and commands running to get out fail.

The .vbs file is designed to run from the shortcut where it doesnt matter that the script exits.

The bat file is expected to allow piping of data and only exits when octave exits.

John Donoghue <lostbard>
Project Member
Wed 17 Jul 2019 08:01:43 PM UTC, comment #10: 

What do you mean in pkg isntall in windows version of Octave?
Octave.vbs start script uses tha octave-gui.exe in no-gui mode well, too. I do not understand that it is why different in ocatve.bat despite of it is doing the same start-scripting.

Benjamin Szőke <livius>
Wed 17 Jul 2019 12:02:55 AM UTC, comment #9: 

It may have worked in your use, but it does not work currently when being called during pkg install, on packages that use it in thier configure

See Bug #53938

John Donoghue <lostbard>
Project Member
Tue 16 Jul 2019 10:28:35 PM UTC, comment #8: 

Pls, replace octave-cli.exe with octave-gui.exe in -no-gui mode, too! I replaced it in my own .bat file, and it is works well. I can use QT graphics nicely in no-gui mode also in this way.

Benjamin Szőke <livius>
Mon 03 Jun 2019 01:29:09 PM UTC, comment #7: 
John Donoghue <lostbard>
Project Member
Fri 31 May 2019 11:35:56 AM UTC, comment #6: 

For now, I'll add the msys2 path and the msystem var to the bat file

John Donoghue <lostbard>
Project Member
Thu 30 May 2019 10:02:57 PM UTC, comment #5: 

Octave.vbs use the "octave-gui.exe --no-gui" and it is working well thanks to that correct path and any other declared variables.

But, i can not use octave.vbs when i want to execute it from an own C program as a childprocess with pipe interface. Octave.vbs will start octave-gui.exe as a background process in a new cmd window (then exit), so that my own C program does not have any pipe connection to the octave-gui.exe.

If i use the "octave.bat --no-gui" it is better because the bat file will run octave-gui.exe in the same cmd and it will be the same childprocess. In this case the pipe connection is fine and works well.

In the past i never used any plots and figure printing and the octave-cli.exe was enough for my tasks. But now i need a correct qt graphics for plots in command-line octave, too.

I think in the future a fixed octave.bat (with using octave-gui.exe --no-gui) should be better to a general executing method in MS Windows than the octave.vbs script.

Benjamin Szőke <livius>
Thu 30 May 2019 12:26:24 PM UTC, comment #4: 

One of the reasons for using octave-cli was that in windows, octave-gui detaches itself when run, so any scripts - ie: configure of a package calling octave, will fail as it tehn doesnt get anything from any commands tnat may run via eval etc

John Donoghue <lostbard>
Project Member
Thu 30 May 2019 11:52:41 AM UTC, comment #3: 

I dont believe vbs will run via command line in msys2, and mkoctfile etc doesnt look for it

I beleieve the changes for the bat file etc where done on https://savannah.gnu.org/bugs/?53938

John Donoghue <lostbard>
Project Member
Thu 30 May 2019 09:28:31 AM UTC, comment #2: 

Why do we need vbs and bat versions of the wrapper script?  Isn't one sufficient?

John W. Eaton <jwe>
Project Administrator
Thu 30 May 2019 12:31:41 AM UTC, comment #1: 

Thank you for the bug report. I do not personally have access to Windows to test any of this, but it was my understanding that 'octave-gui --no-gui' did not work reliably on Windows. If it does work reliably now, that is news to me, and possibly to others who do use Octave on Windows all the time.

If this is reliable, then maybe the defaults should be changed so that 'octave' does run the 'octave-gui' executable with either of the '--gui' or '--no-gui' options. And maybe a new 'octave-cli.bat' script should be added to call 'octave-cli' with the necessary environment variables.

This probably needs confirmation and investigation by those who care about Octave on Windows.

Mike Miller <mtmiller>
Project Administrator
Thu 30 May 2019 12:06:07 AM UTC, original submission:  

In a first look, it seems to me that octave.bat and octave.vbs script is different. Pls compare it and fix octave.bat!

When i want to use octave.vbs --no-gui, everything is fine, qt graphics is working well, and all of executable files from usr/bin example: cat, ssh ... are working in octave.

But when i want to use the octave.bat --no-gui, qt graphics is missing and all contents from usr/bin are missing, too.

Pls fix it as soon as possible. I fixed that bugs in the octave.bat for my own usage, but it is in the attached files feel free to use it. I have been set usr/bin into path, i declared the correct MSYSTEM variable (MINGW64 or MINGW32) and i am using now octave-gui.exe --no-gui instead of ocatve-cli.exe and now it works well.

It is important to me that i could use qt graphics in command-line mode also. (Octave.vbs use the same way with usage of octave-gui.exe --no-gui)



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #47002:  octave_fixed.bat added by None (2KiB - application/octet-stream - Fixed octave.bat)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by livius (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-30 mtmiller CategoryLibraries => Configuration and Build System
        Item GroupSegfault, Bus Error, etc. => Incorrect Result
    2019-05-30 None Attached File- => Added octave_fixed.bat, #47002

    Back to the top

    Powered by Savane 3.5