bugGNU Octave - Bugs: bug #54174, copyobj/hgsave errors in test...

 
 

bug #54174: copyobj/hgsave errors in test suite, and Ghostscript initialization errors

Submitter:  Andrew Janke <apjanke>
Submitted:  Sun 24 Jun 2018 07:13:09 AM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Jun 2018 08:26:49 PM UTC, comment #3: 

Well, it looks like this was my fault all along. I'm using a wrapper script to launch octave, and in my wrapper script I set up a GS_OPTIONS env variable. It was using the wrong paths to some configuration files.

I fixed the paths in my GS_OPTIONS, and this whole problem went away. The copyobj and hgsave tests are now passing.


>> test copyobj
PASSES 2 out of 2 tests
>> test hgsave
PASSES 4 out of 4 tests


It is still a mystery to me why the error messages were referencing the wrong Ghostscript version, but it may be a moot point now that the underlying error is fixed.

You can probably close this issue.

Andrew Janke <apjanke>
Sun 24 Jun 2018 08:19:06 PM UTC, comment #2: 


> I see that /Applications/Octave-4.4.0.app/Contents/Resources/usr/opt/ghostscript_9.23/bin is in your PATH. Is Ghostscript 9.21 found in a directory that is earlier on the PATH list?


No, my Ghostscript 9.21 is in /usr/local/bin, which is not in that PATH. But this PATH from the build logs  is only in effect at build time. My run-time PATH for Octave is the following:


>> regexp(getenv('PATH'), ':', 'split')
ans =
{
  [1,1] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/
  [1,2] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/
  [1,3] = /Users/janke/perl5/bin
  [1,4] = /usr/local/sbin
  [1,5] = /Users/janke/bin
  [1,6] = /usr/local/bin
  [1,7] = /usr/local/bin
  [1,8] = /usr/bin
  [1,9] = /bin
  [1,10] = /usr/sbin
  [1,11] = /sbin
  [1,12] = /Applications/VMware Fusion.app/Contents/Public
  [1,13] = /Library/TeX/texbin
  [1,14] = /usr/local/MacGPG2/bin
  [1,15] = /opt/X11/bin
  [1,16] = /Users/janke/.rvm/bin
  [1,17] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.0/4.4.0/libexec/octave/4.4.0/site/exec/x86_64-apple-darwin17.6.0
  [1,18] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.0/4.4.0/libexec/octave/api-v52/site/exec/x86_64-apple-darwin17.6.0
  [1,19] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.0/4.4.0/libexec/octave/site/exec/x86_64-apple-darwin17.6.0
  [1,20] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.0/4.4.0/libexec/octave/4.4.0/exec/x86_64-apple-darwin17.6.0
  [1,21] = /Applications/Octave-4.4.0.app/Contents/Resources/usr/Cellar/octave-octave-app_4.4.0/4.4.0/bin
}


That very first entry, /Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/, contains my 9.23 Ghostscript. The `/usr/local/bin` is later, so the 9.23 should take precedence.


$ /Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/gs --version
9.23


Okay: I see the logic for locating Ghostscript in `__print_parse_opts__.m` lines 479 to 491.  And it sure looks to me like that logic should be picking up my 9.23 installation.


>> file_in_path(getenv('PATH'),  'gs')
ans = /Applications/Octave-4.4.0.app/Contents/Resources/usr/bin/gs
>> system([ans ' --version'])
9.23
ans = 0


I will spend some time running through this in the debugger to see if I can find out where the version detection is going wrong.

Andrew Janke <apjanke>
Sun 24 Jun 2018 04:26:58 PM UTC, comment #1: 

It actually appears that the GHOSTSCRIPT make variable is a leftover from an older version of the build system. It is detected by configure but not used anywhere else.

The current logic for finding Ghostscript is encoded in the print m-file functions. On Unix systems it looks for 'gs' in PATH, or seems to use the 'GSC' run-time environment variable.

I see that /Applications/Octave-4.4.0.app/Contents/Resources/usr/opt/ghostscript_9.23/bin is in your PATH. Is Ghostscript 9.21 found in a directory that is earlier on the PATH list?

Mike Miller <mtmiller>
Group Member
Sun 24 Jun 2018 07:13:09 AM UTC, original submission:  

I have an Octave 4.4.0 build on macOS 10.13.5, managed by Homebrew, but in a non-default prefix, /Applications/Octave-4.4.0.app/Contents/Resources/usr. It was built with Qt.

When I run the test suite, from the GUI or CLI, some tests are failing, and these include plot/util/copyobj.m and plot/util/hgsave.m.


  plot/util/copyobj.m .........................................GPL Ghostscript 9.21: Can't find initialization file gs_init.ps.
 PASS      1/2
                                                                  FAIL    1
  plot/util/figure.m .......................................... PASS      5/5
...
  plot/util/hgsave.m ..........................................GPL Ghostscript 9.21: Can't find initialization file gs_init.ps.
 PASS      3/4
                                                                  FAIL    1


What's surprising about these error messages is that it's referencing Ghostscript 9.21. But I built this Octave against Ghostscript 9.23, installed under `/Applications/Octave-4.4.0.app/Contents/Resources/usr/`, using the `GHOSTSCRIPT=path/to/gs` argument to make.

Are there parts of Octave that don't respect that Make-time GHOSTSCRIPT argument? Or am I using it wrong?

Build and test logs attached.


Andrew Janke <apjanke>

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by apjanke (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-25 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2018-06-24 apjanke Attached File- Added octave-octave-app build logs - dad9c4eddd4e4f1af0e709c9dcb3b3ce-41d6dd1c79a9e7d8c757c6786fbefe323405d82a.zip, #44422

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code