octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cs-list errors and Ghostscript warning when trying to print


From: Ben Abbott
Subject: Re: cs-list errors and Ghostscript warning when trying to print
Date: Sun, 30 Jan 2011 12:21:26 -0500

On Jan 30, 2011, at 10:08 AM, Richard Campbell wrote:

> On Jan 30, 2011, at 10:00 AM, Tatsuro MATSUOKA wrote:
> 
>> Hello
>> 
>> As far as I remember,
>> 
>> epstool  and pstoedit are required and fig2dev is optional for fltk printing 
>> for unixy environments
>> including mac OS X.
>> 
>> Please install them.
>> 
>> Regards
>> 
>> Tatsuro
>> --- Richard Campbell  wrote:
>> 
>>> 
>>> On Jan 30, 2011, at 3:53 AM, John W. Eaton wrote:
>>> 
>>>> On 29-Jan-2011, Richard Campbell wrote:
>>>> 
>>>> | In my build of Octave 3.3.54 I get the following during 'make check'
>>>> | 
>>>> | Integrated test scripts:
>>>> | 
>>>> | invalid assignment to cs-list outside multiple assignment.
>>>> | 
>>>> | The build is as described earlier for Mac OSX with minimal dependencies.
>>>> 
>>>> I don't see that error.  It may be that it is happening because you
>>>> haven't installed all the dependencies, but we try to make the tests
>>>> run anyway, just skipping the ones that can't work because of missing
>>>> dependencies.  So will you try to debug where it is coming from?
>>>> The first set of "Integrated test scripts" that are normally executed
>>>> are from the file src/DLD-FUNCTIONS/besselj.cc.  To run them outside
>>>> of "make check", please try the following
>>>> 
>>>> ./run-octave
>>>> ...
>>>> octave:1> cd /src/tree/directory/src/DLD-FUNTIONS
>>>> octave:2> test besselj.cc
>>>> 
>>>> (where /src/tree/directory is wherever your top-level Octave source
>>>> tree is) and let us know what happens.
>>>> 
>>>> | When I try to print, I get:
>>>> | 
>>>> | octave:2> print('-dpng','test.png')
>>>> | warning: print.m: ghostscript not found in EXEC_PATH.
>>>> | warning: print.m: Ghostscript binary is not available.
>>>> | warning: print.m: epstool binary is not available.
>>>> | warning: print.m: fig2dev binary is not available.
>>>> | warning: print.m: pstoedit binary is not available.
>>>> | error: invalid assignment to cs-list outside multiple assignment.
>>>> | error: matrix cannot be indexed with {
>>>> | error: evaluating argument list element number 3
>>>> | error: called from:
>>>> | error:   /Users/campbell/Downloads/octave-3.3.54/scripts/plot/print.m at 
>>>> line 377, column 9
>>>> | 
>>>> | The Ghostscript warning is confusing because I have libpng installed, 
>>>> and twice during
>>> 'configure' it is stated that
>>>> | 
>>>> | configure: WARNING: I didn't find ghostscript, but it's only a problem 
>>>> if you need to
>>> reconstruct figures for the manual
>>>> 
>>>> I think this message is incorrect now.  Previously, we only used
>>>> ghostscript to generate some output formats when building the Octave
>>>> documentation.  Now it is used in printing as well, to convert PS to
>>>> various formats.
>>>> 
>>>> I changed the configure warning to be
>>>> 
>>>> I didn't find ghostscript, so reconstructing figures for the manual
>>>> will fail, and saving graphics in some output formats will fail when
>>>> using Octave
>>>> 
>>>> jwe
>>> 
>>> Okay, after installing Ghostscript (which builds fine on OSX with 
>>> ./configure && make && sudo
>>> make install, no funny stuff) that warning alone goes away, leaving:
>>> 
>>> octave:4> print('-dpng','test.png')
>>> warning: print.m: epstool binary is not available.
>>> warning: print.m: fig2dev binary is not available.
>>> warning: print.m: pstoedit binary is not available.
>>> error: invalid assignment to cs-list outside multiple assignment.
>>> error: matrix cannot be indexed with {
>>> error: evaluating argument list element number 3
>>> error: called from:
>>> error:   /Users/campbell/Downloads/octave-3.3.54/scripts/plot/print.m at 
>>> line 377, column 9
>>> 
>> 
> 
> I'm not using fltk - I'm using gnuplot and X11.
> 
> I still get the cs-list error. All the others are warnings and only appear 
> the first time print is called. Can we address the error?
> 
> octave:2> print('-dpng','test.png')
> warning: print.m: fig2dev binary is not available.
> error: invalid assignment to cs-list outside multiple assignment.
> error: matrix cannot be indexed with {
> error: evaluating argument list element number 3
> error: called from:
> error:   /Users/campbell/Downloads/octave-3.3.54/scripts/plot/print.m at line 
> 377, column 9


The cs-list error should be easy to fix ... and I have some memory of this bug 
(or a similar one) already being fixed. As the sources you are using don't 
match the default branch, please type the following.

        octave:1> system (sprintf ("grep -n \"^\" %s | head -n 400 | tail -n 
50", which ("print")))

(there's probably a better way to do that) In any event, I get the result below.

351:            props(end+1).h = h(n);
352:            props(end).name = "fontname";
353:            props(end).value = {get(h(n), "fontname")};
354:          endif
355:        endif
356:        if (ishandle (h(n)))
357:          if (! isempty (opts.fontsize))
358:            props(end+1).h = h(n);
359:            props(end).name = "fontsize";
360:            props(end).value = {get(h(n), "fontsize")};
361:          endif
362:        endif
363:      endfor
364:      if (! isempty (opts.font))
365:        set (h(ishandle(h)), "fontname", opts.font);
366:      endif
367:      if (! isempty (opts.fontsize))
368:        if (ischar (opts.fontsize))
369:          fontsize = str2double (opts.fontsize);
370:        else
371:          fontsize = opts.fontsize;
372:        endif
373:        set (h(ishandle(h)), "fontsize", fontsize);
374:      endif
375:    endif
376:
377:    ## call the graphcis toolkit print script
378:    switch (get (opts.figure, "__graphics_toolkit__"))
379:    case "gnuplot"
380:      opts = __gnuplot_print__ (opts);
381:    otherwise
382:      opts = __fltk_print__ (opts);
383:    endswitch
384:
385:  unwind_protect_cleanup
386:    ## restore modified properties
387:    if (isstruct (props))
388:      for n = 1:numel(props)
389:        if (ishandle (props(n).h))
390:          set (props(n).h, props(n).name, props(n).value{1});
391:        endif
392:      endfor
393:    endif
394:
395:    ## Unlink temporary files
396:    for n = 1:numel(opts.unlink)
397:      [status, output] = unlink (opts.unlink{n});
398:      if (status != 0)
399:        warning ("print.m: %s, '%s'", output, opts.unlink{n});
400:      endif

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]