bugGNU Octave - Bugs: bug #41140, print fails to find ghostscript if...

 
 

bug #41140: print fails to find ghostscript if it is located in a directory with spaces in the name

Submitted by:  Rik <rik5>
Submitted on:  Tue 07 Jan 2014 07:31:16 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 3.8.0Operating System: Microsoft Windows

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 03 Jul 2014 11:31:25 PM UTC, comment #7:

I checked in the following changeset for mxe-octave to cross compile ghostscript on i686-mingw systems and also allow it to be built for native builds.

http://hg.octave.org/mxe-octave/rev/f2503a486cce

Building seems to work for me. I'm building and testing an nsis installer now.

John W. Eaton <jwe>
Project Administrator
Mon 23 Jun 2014 05:01:23 PM UTC, comment #6:

It would certainly be easier if ghostscript can be cross compiled. But if not, then we could also have Octave's installer run the ghostscript installer or arrange for the some other way to include ghostscript in the installer we distribute.

There are some instructions about cross compiling on the ghostscript web pages, so perhaps it's possible. I'll see whether I can make that work. If I can do it by hand, I'm fairly sure we can embed that knowledge in some Make rules.

John W. Eaton <jwe>
Project Administrator
Sat 21 Jun 2014 03:10:22 PM UTC, comment #5:

I think the first question is whether ghostscript can be cross-compiled using the MXE framework. Philip alluded to jwe saying this was difficult. Only if we can clear this first hurdle do we get to start thinking about how it might be installed in a directory without spaces.

The ghostscript command, which looks fine in the m-file, disappears into the C++ drawnow command and eventually into gl2ps. It might be that someone is stripping the double quote character. In this case we could try replacing spaces with escaped spaces

I find coding for Windows annoying so, unless compensated, I won't be working on this issue.

Rik <rik5>
Project Administrator
Sat 21 Jun 2014 08:04:32 AM UTC, comment #4:

Keep in mind that Octave isn't ready for ghostscript >=9.09 yet: Bug #41141. Just a reminder because gs914w64.exe was linked.

Anonymous
Fri 20 Jun 2014 07:15:10 PM UTC, comment #3:

How should we fix this problem for the builds we will be distributing?

I would prefer to cross compile ghostscript from sources just like all the other packages we are distributing, but if that's not possible, should we include a file like http://downloads.ghostscript.com/public/gs914w64.exe in the installer and have the Octave installer launch the ghostscript installer? Or should we do that step in advance so that the files are already unpacked and installed in the proper locations inside the Octave installer package?

John W. Eaton <jwe>
Project Administrator
Tue 07 Jan 2014 11:08:31 PM UTC, comment #2:

<quote>
I think I could even system("gs") with no problem
</quote>

That is true as long as C:\Program Files\gs\gs9.07\bin is in Window's search PATH. After all, system(<COMMAND>) simply invokes Window's own program launcher that can very well cope with spaces in path names.

IIRC JWE pointed out that building ghostscript in MXE isn't quite straightforward. So we'll have to live with this for Windows systems until a fix comes along.
(AFAIR there were also other programs that were troublesome in MXE - fig2dev or pstoedit?)

Philip Nienhuis <philipnienhuis>
Project Member
Tue 07 Jan 2014 07:48:34 PM UTC, comment #1:

I ran into this exact problem when testing on Win XP for the first time this weekend. Ghostscript is required for certain output formats, is not included with the mxe build, and is not particularly clear how to install it or set it up so that Octave can find it. And as Rik stated, the default installation path is under C:/Program Files/gs.

I think I observed that Octave could call other commands on PATH even when a "Program Files" directory was in PATH, and I think I could even system("gs") with no problem.

Mike Miller <mtmiller>
Project Member
Tue 07 Jan 2014 07:31:16 PM UTC, original submission:

This is only a problem for me on Windows XP, not Linux. I did a default install of ghostscript which, of course, puts installation in 'c:\\program files' which has a space in the name. When I try to print something it can't find the ghostcript program. The error message indicates that it didn't process the name correctly.

Octave appears to correctly wrap the print pipeline command in _fltk_print_.m with double quotes, but for some reason they aren't respected on Windows platforms. I used a keyboard statement in _fltk_print_.m to see the command that is generated before it is passed to drawnow() C++ code. The command looks correct.

As a quick work around, I just installed to a path without spaces in the name.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 07 Jan 2014 07:48:34 PM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup