Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghostscript error when executing test copyobj #86

Closed
mmuetzel opened this issue May 14, 2021 · 2 comments · Fixed by #87
Closed

Ghostscript error when executing test copyobj #86

mmuetzel opened this issue May 14, 2021 · 2 comments · Fixed by #87
Assignees
Labels
bug Something isn't working

Comments

@mmuetzel
Copy link

test copyobj fails with the following error:

>> test copyobj
GPL Ghostscript 9.26: Can't find initialization file gs_init.ps.
***** testif HAVE_MAGICK; any (strcmp ("gnuplot", available_graphics_toolkits ()))
 toolkit = graphics_toolkit ();
 graphics_toolkit ("gnuplot");
 unwind_protect
   h1 = figure ("visible", "off", "paperposition", [0.25, 2.5, 8.0, 6.0]);
   x = 0:0.1:2*pi;
   y1 = sin (x);
   y2 = exp (x - 1);
   ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
   xlabel ("X");
   ylabel (ax(1), "Axis 1");
   ylabel (ax(2), "Axis 2");
   axes (ax(1));
   text (0.5, 0.5, "Left Axis", ...
         "color", [0 0 1], "horizontalalignment", "center");
   axes (ax(2));
   text (4.5, 80, "Right Axis", ...
         "color", [0 0.5 0], "horizontalalignment", "center");
   s1 = hdl2struct (h1);
   h2 = struct2hdl (s1);
   s2 = hdl2struct (h2);
   png1 = [tempname() ".png"];
   png2 = [tempname() ".png"];
   unwind_protect
     print (h1, png1);
     [img1, map1, alpha1] = imread (png1);
     print (h2, png2);
     [img2, map2, alpha2] = imread (png2);
   unwind_protect_cleanup
     unlink (png1);
     unlink (png2);
   end_unwind_protect
   assert (img1, img2);
   assert (map1, map2);
   assert (alpha1, alpha2);
 unwind_protect_cleanup
   close (h1);
   close (h2);
   graphics_toolkit (toolkit);
 end_unwind_protect
!!!!! test failed
unlink: operation failed: No such file or directory
>>
@mtmiller
Copy link
Contributor

Thanks, confirmed. Looks like we just need to add GS_LIB to the environment to point to the relocated ghostscript library directories.

mtmiller added a commit to mtmiller/octave-snap that referenced this issue May 14, 2021
@mtmiller mtmiller added the bug Something isn't working label May 14, 2021
@mtmiller mtmiller self-assigned this May 14, 2021
@mtmiller
Copy link
Contributor

Fixed, will be part of the next nightly build. Thanks again for catching this oversight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants