bugGNU Octave - Bugs: bug #60641, Print figure to svg fails is...

 
 

bug #60641: Print figure to svg fails is ylabel contains "px"

Submitter:  None
Submitted:  Wed 19 May 2021 08:47:25 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.2.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 25 May 2021 09:10:35 PM UTC, comment #9: 

Looks fine now. Thanks.

Dmitri A. Sergatskov <dasergatskov>
Tue 25 May 2021 09:05:09 PM UTC, comment #8: 

I just went to fix this but jwe beat me to it.  Apparently the merge of stable to default introduced an extra '}' character.

Rik <rik5>
Group administrator
Tue 25 May 2021 09:04:13 PM UTC, comment #7: 

I pushed the following changeset to fix the merge error:

http://hg.savannah.gnu.org/hgweb/octave/rev/1077d7c87fcc

John W. Eaton <jwe>
Group administrator
Tue 25 May 2021 09:00:57 PM UTC, comment #6: 

Here is end of make V=1:




libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DOCTINTERP_DLL -Iliboctave -I../liboctave -I../liboctave/array -Iliboctave/numeric -I../liboctave/numeric -Iliboctave/operators -I../liboctave/operators -I../liboctave/system -I../liboctave/util -I../libinterp/octave-value -Ilibinterp -I../libinterp -I../libinterp/operators -Ilibinterp/parse-tree -I../libinterp/parse-tree -Ilibinterp/corefcn -I../libinterp/corefcn -I../liboctave/wrappers -I/usr/include/GraphicsMagick -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -fPIC -pthread -fopenmp -Wall -W -Wshadow -Woverloaded-virtual -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -fvisibility=hidden -O2 -march=native -mavx -mavx2 -flto=4 -fno-fat-lto-objects -MT libinterp/corefcn/libcorefcn_la-gl2ps-print.lo -MD -MP -MF libinterp/corefcn/.deps/libcorefcn_la-gl2ps-print.Tpo -c ../libinterp/corefcn/gl2ps-print.cc  -fPIC -DPIC -o libinterp/corefcn/.libs/libcorefcn_la-gl2ps-print.o
../libinterp/corefcn/gl2ps-print.cc:529:5: error: expected unqualified-id before ‘else’
  529 |     else
      |     ^~~~
../libinterp/corefcn/gl2ps-print.cc:534:3: error: ‘gl2ps_renderer’ has not been declared
  534 |   gl2ps_renderer::alignment_to_mode (int ha, int va) const
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:534:54: error: non-member function ‘int alignment_to_mode(int, int)’ cannot have cv-qualifier
  534 |   gl2ps_renderer::alignment_to_mode (int ha, int va) const
      |                                                      ^~~~~
../libinterp/corefcn/gl2ps-print.cc:570:3: error: ‘gl2ps_renderer’ has not been declared
  570 |   gl2ps_renderer::fix_strlist_position (double x, double y, double z,
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:572:51: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                   ^~~~~~~~~~~~~
      |                                                   octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 1 is invalid
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                                        ^
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:572:51: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                   ^~~~~~~~~~~~~
      |                                                   octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 1 is invalid
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                                        ^
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:572:51: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                   ^~~~~~~~~~~~~
      |                                                   octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 1 is invalid
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                                        ^
../libinterp/corefcn/gl2ps-print.cc:572:72: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:572:41: error: invalid template-id
  572 |                                         std::list<text_renderer::string>& lst)
      |                                         ^~~
../libinterp/corefcn/gl2ps-print.cc:572:51: error: ‘text_renderer’ has not been declared
  572 |                                         std::list<text_renderer::string>& lst)
      |                                                   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:572:41: error: template placeholder type ‘list<...auto...>’ must be followed by a simple declarator-id
  572 |                                         std::list<text_renderer::string>& lst)
      |                                         ^~~
In file included from /usr/include/c++/11/list:63,
                 from ../liboctave/util/quit.h:35,
                 from ../liboctave/util/lo-array-errwarn.h:32,
                 from ../libinterp/corefcn/errwarn.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:31:
/usr/include/c++/11/bits/stl_list.h:556:11: note: ‘template<class _Tp, class _Alloc> class std::__cxx11::list’ declared here
  556 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘void fix_strlist_position(...)’:
../libinterp/corefcn/gl2ps-print.cc:574:25: error: ‘lst’ was not declared in this scope
  574 |     for (auto& txtobj : lst)
      |                         ^~~
../libinterp/corefcn/gl2ps-print.cc:577:34: error: ‘get_transform’ was not declared in this scope
  577 |         ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                  ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:577:62: error: ‘x’ was not declared in this scope
  577 |         ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                              ^
../libinterp/corefcn/gl2ps-print.cc:577:65: error: ‘y’ was not declared in this scope; did you mean ‘yn’?
  577 |         ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                                 ^
      |                                                                 yn
../libinterp/corefcn/gl2ps-print.cc:577:68: error: ‘z’ was not declared in this scope
  577 |         ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                                    ^
../libinterp/corefcn/gl2ps-print.cc:580:22: error: ‘rotation’ was not declared in this scope
  580 |         double rot = rotation * 4.0 * atan (1.0) / 180;
      |                      ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:581:44: error: ‘box’ was not declared in this scope
  581 |         coord_pix(0) += (txtobj.get_x () + box(0))*cos (rot)
      |                                            ^~~
../libinterp/corefcn/gl2ps-print.cc:587:9: error: ‘m_glfcns’ was not declared in this scope
  587 |         m_glfcns.glGetIntegerv (GL_VIEWPORT, vp);
      |         ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:806:3: error: ‘gl2ps_renderer’ has not been declared
  806 |   gl2ps_renderer::format_svg_element (std::string str, Matrix box,
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘std::string format_svg_element(std::string, Matrix, double, ColumnVector, Matrix)’:
../libinterp/corefcn/gl2ps-print.cc:827:34: error: ‘m_svg_def_index’ was not declared in this scope
  827 |         new_id = std::to_string (m_svg_def_index) + "-" + id ;
      |                                  ^~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:842:5: error: ‘m_svg_def_index’ was not declared in this scope
  842 |     m_svg_def_index++;
      |     ^~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:915:3: error: ‘gl2ps_renderer’ has not been declared
  915 |   gl2ps_renderer::strlist_to_svg (double x, double y, double z,
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:917:45: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  917 |                                   std::list<text_renderer::string>& lst)
      |                                             ^~~~~~~~~~~~~
      |                                             octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 1 is invalid
  917 |                                   std::list<text_renderer::string>& lst)
      |                                                                  ^
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:917:45: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  917 |                                   std::list<text_renderer::string>& lst)
      |                                             ^~~~~~~~~~~~~
      |                                             octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 1 is invalid
  917 |                                   std::list<text_renderer::string>& lst)
      |                                                                  ^
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:917:45: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
  917 |                                   std::list<text_renderer::string>& lst)
      |                                             ^~~~~~~~~~~~~
      |                                             octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 1 is invalid
  917 |                                   std::list<text_renderer::string>& lst)
      |                                                                  ^
../libinterp/corefcn/gl2ps-print.cc:917:66: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:917:35: error: invalid template-id
  917 |                                   std::list<text_renderer::string>& lst)
      |                                   ^~~
../libinterp/corefcn/gl2ps-print.cc:917:45: error: ‘text_renderer’ has not been declared
  917 |                                   std::list<text_renderer::string>& lst)
      |                                             ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:917:35: error: template placeholder type ‘list<...auto...>’ must be followed by a simple declarator-id
  917 |                                   std::list<text_renderer::string>& lst)
      |                                   ^~~
In file included from /usr/include/c++/11/list:63,
                 from ../liboctave/util/quit.h:35,
                 from ../liboctave/util/lo-array-errwarn.h:32,
                 from ../libinterp/corefcn/errwarn.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:31:
/usr/include/c++/11/bits/stl_list.h:556:11: note: ‘template<class _Tp, class _Alloc> class std::__cxx11::list’ declared here
  556 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘std::string strlist_to_svg(...)’:
../libinterp/corefcn/gl2ps-print.cc:920:30: error: ‘get_transform’ was not declared in this scope
  920 |     ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                              ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:920:58: error: ‘x’ was not declared in this scope
  920 |     ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                          ^
../libinterp/corefcn/gl2ps-print.cc:920:61: error: ‘y’ was not declared in this scope; did you mean ‘yn’?
  920 |     ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                             ^
      |                                                             yn
../libinterp/corefcn/gl2ps-print.cc:920:64: error: ‘z’ was not declared in this scope
  920 |     ColumnVector coord_pix = get_transform ().transform (x, y, z, false);
      |                                                                ^
../libinterp/corefcn/gl2ps-print.cc:922:9: error: ‘lst’ was not declared in this scope
  922 |     if (lst.empty ())
      |         ^~~
../libinterp/corefcn/gl2ps-print.cc:926:23: error: ‘lst’ was not declared in this scope
  926 |     std::string svg = lst.front ().get_svg_element ();
      |                       ^~~
../libinterp/corefcn/gl2ps-print.cc:928:39: error: ‘box’ was not declared in this scope
  928 |       return format_svg_element (svg, box, rotation, coord_pix,
      |                                       ^~~
../libinterp/corefcn/gl2ps-print.cc:928:44: error: ‘rotation’ was not declared in this scope
  928 |       return format_svg_element (svg, box, rotation, coord_pix,
      |                                            ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:935:42: error: ‘box’ was not declared in this scope
  935 |        << "translate(" << coord_pix(0) + box(0) << "," << coord_pix(1) - box(1)
      |                                          ^~~
../libinterp/corefcn/gl2ps-print.cc:936:27: error: ‘rotation’ was not declared in this scope
  936 |        << ") rotate(" << -rotation << "," << -box(0) << "," << box(1)
      |                           ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1016:3: error: ‘gl2ps_renderer’ has not been declared
 1016 |   gl2ps_renderer::strlist_to_ps (double x, double y, double z,
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1018:44: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                            ^~~~~~~~~~~~~
      |                                            octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 1 is invalid
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                                                 ^
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:1018:44: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                            ^~~~~~~~~~~~~
      |                                            octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 1 is invalid
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                                                 ^
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:1018:44: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                            ^~~~~~~~~~~~~
      |                                            octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 1 is invalid
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                                                 ^
../libinterp/corefcn/gl2ps-print.cc:1018:65: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:1018:34: error: invalid template-id
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                  ^~~
../libinterp/corefcn/gl2ps-print.cc:1018:44: error: ‘text_renderer’ has not been declared
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                            ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1018:34: error: template placeholder type ‘list<...auto...>’ must be followed by a simple declarator-id
 1018 |                                  std::list<text_renderer::string>& lst)
      |                                  ^~~
In file included from /usr/include/c++/11/list:63,
                 from ../liboctave/util/quit.h:35,
                 from ../liboctave/util/lo-array-errwarn.h:32,
                 from ../libinterp/corefcn/errwarn.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:31:
/usr/include/c++/11/bits/stl_list.h:556:11: note: ‘template<class _Tp, class _Alloc> class std::__cxx11::list’ declared here
  556 |     class list : protected _List_base<_Tp, _Alloc>
      |           ^~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘std::string strlist_to_ps(...)’:
../libinterp/corefcn/gl2ps-print.cc:1020:9: error: ‘lst’ was not declared in this scope
 1020 |     if (lst.empty ())
      |         ^~~
../libinterp/corefcn/gl2ps-print.cc:1041:27: error: ‘x’ was not declared in this scope
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                           ^
../libinterp/corefcn/gl2ps-print.cc:1041:30: error: ‘y’ was not declared in this scope; did you mean ‘yn’?
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                              ^
      |                              yn
../libinterp/corefcn/gl2ps-print.cc:1041:33: error: ‘z’ was not declared in this scope
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                                 ^
../libinterp/corefcn/gl2ps-print.cc:1041:36: error: ‘box’ was not declared in this scope
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                                    ^~~
../libinterp/corefcn/gl2ps-print.cc:1041:41: error: ‘rotation’ was not declared in this scope
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                                         ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1041:51: error: ‘lst’ was not declared in this scope
 1041 |     fix_strlist_position (x, y, z, box, rotation, lst);
      |                                                   ^~~
../libinterp/corefcn/gl2ps-print.cc:1065:13: error: ‘fontname’ was not declared in this scope
 1065 |             fontname = "Symbol";
      |             ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1070:13: error: ‘fontname’ was not declared in this scope
 1070 |             fontname = select_font (txtobj.get_name (),
      |             ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1130:23: error: ‘fontname’ was not declared in this scope
 1130 |            << " /" << fontname << " SRX\n";
      |                       ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1139:3: error: ‘gl2ps_renderer’ has not been declared
 1139 |   gl2ps_renderer::render_text (const std::string& txt,
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘Matrix render_text(const string&, double, double, double, int, int, double)’:
../libinterp/corefcn/gl2ps-print.cc:1143:30: error: ‘fontname’ was not declared in this scope
 1143 |     std::string saved_font = fontname;
      |                              ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1150:15: error: ‘text_renderer’ was not declared in this scope; did you mean ‘octave::text_renderer’?
 1150 |     std::list<text_renderer::string> lst;
      |               ^~~~~~~~~~~~~
      |               octave::text_renderer
In file included from libinterp/corefcn/graphics.h:54,
                 from ../libinterp/corefcn/gl2ps-print.h:33,
                 from ../libinterp/corefcn/gl2ps-print.cc:32:
../libinterp/corefcn/text-renderer.h:46:3: note: ‘octave::text_renderer’ declared here
   46 |   text_renderer
      |   ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1150:36: error: template argument 1 is invalid
 1150 |     std::list<text_renderer::string> lst;
      |                                    ^
../libinterp/corefcn/gl2ps-print.cc:1150:36: error: template argument 2 is invalid
../libinterp/corefcn/gl2ps-print.cc:1152:5: error: ‘text_to_strlist’ was not declared in this scope
 1152 |     text_to_strlist (str, lst, bbox, ha, va, rotation);
      |     ^~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1153:5: error: ‘m_glfcns’ was not declared in this scope
 1153 |     m_glfcns.glRasterPos3d (x, y, z);
      |     ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1156:9: error: ‘term’ was not declared in this scope; did you mean ‘tm’?
 1156 |     if (term.find ("svg") != std::string::npos)
      |         ^~~~
      |         tm
../libinterp/corefcn/gl2ps-print.cc:1170:54: error: ‘fontsize’ was not declared in this scope
 1170 |       gl2psTextOpt (str.c_str (), fontname.c_str (), fontsize,
      |                                                      ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1179:3: error: ‘gl2ps_renderer’ has not been declared
 1179 |   gl2ps_renderer::set_font (const base_properties& props)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘void set_font(const base_properties&)’:
../libinterp/corefcn/gl2ps-print.cc:1181:5: error: ‘opengl_renderer’ has not been declared
 1181 |     opengl_renderer::set_font (props);
      |     ^~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1185:7: error: ‘set_interpreter’ was not declared in this scope
 1185 |       set_interpreter (props.get ("interpreter").string_value ());
      |       ^~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1187:5: error: ‘fontsize’ was not declared in this scope
 1187 |     fontsize = props.get ("__fontsize_points__").double_value ();
      |     ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1195:5: error: ‘fontname’ was not declared in this scope
 1195 |     fontname = select_font (fn, isbold, isitalic);
      |     ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1199:3: error: ‘gl2ps_renderer’ has not been declared
 1199 |   gl2ps_renderer::draw_image (const image::properties& props)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘void draw_image(const image::properties&)’:
../libinterp/corefcn/gl2ps-print.cc:1233:29: error: ‘xform’ was not declared in this scope
 1233 |     const ColumnVector p0 = xform.transform (x(0), y(0), 0);
      |                             ^~~~~
../libinterp/corefcn/gl2ps-print.cc:1236:9: error: ‘math’ has not been declared
 1236 |     if (math::isnan (p0(0)) || math::isnan (p0(1))
      |         ^~~~
../libinterp/corefcn/gl2ps-print.cc:1236:32: error: ‘math’ has not been declared
 1236 |     if (math::isnan (p0(0)) || math::isnan (p0(1))
      |                                ^~~~
../libinterp/corefcn/gl2ps-print.cc:1237:12: error: ‘math’ has not been declared
 1237 |         || math::isnan (p1(0)) || math::isnan (p1(1)))
      |            ^~~~
../libinterp/corefcn/gl2ps-print.cc:1237:35: error: ‘math’ has not been declared
 1237 |         || math::isnan (p1(0)) || math::isnan (p1(1)))
      |                                   ^~~~
../libinterp/corefcn/gl2ps-print.cc:1286:17: error: ‘get_viewport_scaled’ was not declared in this scope
 1286 |     Matrix vp = get_viewport_scaled ();
      |                 ^~~~~~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1300:34: error: invalid operands of types ‘double’ and ‘<unresolved overloaded function type>’ to binary ‘operator>’
 1300 |       = do_clip ? (vp_lim_min(0) > xmin ? vp_lim_min(0) : xmin) : vp_lim_min(0);
      |                    ~~~~~~~~~~~~~~^~~~~~
../libinterp/corefcn/gl2ps-print.cc:1303:36: error: ‘ymin’ was not declared in this scope; did you mean ‘xmin’?
 1303 |       = do_clip ? (vp_lim_min(1) > ymin ? vp_lim_min(1) : ymin) : vp_lim_min(1);
      |                                    ^~~~
      |                                    xmin
../libinterp/corefcn/gl2ps-print.cc:1306:34: error: invalid operands of types ‘double’ and ‘<unresolved overloaded function type>’ to binary ‘operator<’
 1306 |       = do_clip ? (vp_lim_max(0) < xmax ? vp_lim_max(0) : xmax) : vp_lim_max(0);
      |                    ~~~~~~~~~~~~~~^~~~~~
../libinterp/corefcn/gl2ps-print.cc:1309:36: error: ‘ymax’ was not declared in this scope; did you mean ‘xmax’?
 1309 |       = do_clip ? (vp_lim_max(1) < ymax ? vp_lim_max(1) : ymax) : vp_lim_max(1);
      |                                    ^~~~
      |                                    xmax
../libinterp/corefcn/gl2ps-print.cc:1327:5: error: ‘m_glfcns’ was not declared in this scope
 1327 |     m_glfcns.glGetFloatv (GL_ZOOM_X, &zoom_x);
      |     ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1331:27: error: ‘m_devpixratio’ was not declared in this scope
 1331 |     m_glfcns.glPixelZoom (m_devpixratio * pix_dx, - m_devpixratio * pix_dy);
      |                           ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1363:13: error: ‘draw_pixels’ was not declared in this scope; did you mean ‘glDrawPixels’?
 1363 |             draw_pixels (j1-j0, i1-i0, a);
      |             ^~~~~~~~~~~
      |             glDrawPixels
../libinterp/corefcn/gl2ps-print.cc:1392:13: error: ‘draw_pixels’ was not declared in this scope; did you mean ‘glDrawPixels’?
 1392 |             draw_pixels (j1-j0, i1-i0, a);
      |             ^~~~~~~~~~~
      |             glDrawPixels
../libinterp/corefcn/gl2ps-print.cc:1421:13: error: ‘draw_pixels’ was not declared in this scope; did you mean ‘glDrawPixels’?
 1421 |             draw_pixels (j1-j0, i1-i0, a);
      |             ^~~~~~~~~~~
      |             glDrawPixels
../libinterp/corefcn/gl2ps-print.cc:1450:13: error: ‘draw_pixels’ was not declared in this scope; did you mean ‘glDrawPixels’?
 1450 |             draw_pixels (j1-j0, i1-i0, a);
      |             ^~~~~~~~~~~
      |             glDrawPixels
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1462:3: error: ‘gl2ps_renderer’ has not been declared
 1462 |   gl2ps_renderer::draw_pixels (int w, int h, const float *data)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1474:3: error: ‘gl2ps_renderer’ has not been declared
 1474 |   gl2ps_renderer::draw_pixels (int w, int h, const uint8_t *data)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1489:3: error: ‘gl2ps_renderer’ has not been declared
 1489 |   gl2ps_renderer::draw_pixels (int w, int h, const uint16_t *data)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1504:3: error: ‘gl2ps_renderer’ has not been declared
 1504 |   gl2ps_renderer::draw_text (const text::properties& props)
      |   ^~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: In function ‘void draw_text(const text::properties&)’:
../libinterp/corefcn/gl2ps-print.cc:1509:5: error: ‘draw_text_background’ was not declared in this scope
 1509 |     draw_text_background (props, true);
      |     ^~~~~~~~~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1515:5: error: ‘set_color’ was not declared in this scope
 1515 |     set_color (props.get_color_rgb ());
      |     ^~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1517:30: error: ‘fontname’ was not declared in this scope
 1517 |     std::string saved_font = fontname;
      |                              ^~~~~~~~
../libinterp/corefcn/gl2ps-print.cc:1538:24: error: ‘get_transform’ was not declared in this scope
 1538 |     const Matrix pos = get_transform ().scale (props.get_data_position ());
      |                        ^~~~~~~~~~~~~
../libinterp/corefcn/gl2ps-print.cc: At global scope:
../libinterp/corefcn/gl2ps-print.cc:1544:1: error: expected declaration before ‘}’ token
 1544 | }
      | ^
../libinterp/corefcn/gl2ps-print.cc:596:3: warning: ‘std::string code_to_symbol(uint32_t)’ defined but not used [-Wunused-function]
  596 |   code_to_symbol (uint32_t code)
      |   ^~~~~~~~~~~~~~
make[2]: *** [Makefile:19351: libinterp/corefcn/libcorefcn_la-gl2ps-print.lo] Error 1


Dmitri A. Sergatskov <dasergatskov>
Tue 25 May 2021 08:51:36 PM UTC, comment #5: 

It looks like you also did something bad to default...
All buildbots are failing.

Dmitri.


Dmitri A. Sergatskov <dasergatskov>
Tue 25 May 2021 07:08:26 PM UTC, comment #4: 

I verified the fix.  I also grafted the change on to the stable branch.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Fri 21 May 2021 06:47:42 PM UTC, comment #3: 

This bug looks important enough to be applied to stable as well
(before 6.3 release).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 21 May 2021 07:16:11 AM UTC, comment #2: 

This should be foixed on the default branch after this cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/dcb8f78d0f6b

Pantxo Diribarne <pantxo>
Group Member
Wed 19 May 2021 09:28:27 PM UTC, comment #1: 

I cannot reproduce with gl2ps 1.4.0 but I can with the latest gl2ps 1.4.2.

Prior to 1.4.1 or 1.4.2, gl2ps specifies SVG viewports in pixels rather than points, like all other back-ends do. We currently try to workaround this inconsistency by replacing "px" by "pt" twice in the same line of the preamble of SVG files.

Now that the inconsistency has been fixed upstream there is no more "px" in the preamble and the next "px" that is found screws up the file. I'll look into this.

Pantxo Diribarne <pantxo>
Group Member
Wed 19 May 2021 08:47:25 PM UTC, original submission:  

Hello,

I have a fresh Octave installation from Homebrew. Saving a figure to SVG fails if the title of the Y axis contains the substring "px".

Steps to reproduce:


>> clear
>> clear all
>> close all
>> plot(0)
>> print -dsvg 'test.svg' % Success
>> ylabel('px')
>> print -dsvg 'test.svg' % Failure
Failed to parse XML contents
tag mismatchSee "octave-svgconvert -h">>


Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  •  

    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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-25 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2021-05-21 pantxo StatusConfirmed Ready For Test
    2021-05-19 pantxo CategoryPlotting Plotting with OpenGL
        StatusNone Confirmed
        Operating SystemMac OS Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code