gml2pic compilation failed

44 views
Skip to first unread message

thpit...@gmail.com

unread,
Apr 30, 2018, 6:53:59 PM4/30/18
to ogdf
Hello,

I tried to compile the gml2pic utility against the 2018-03-28 snapshot of ogdf, but unsuccessfully.

Apart from missing includes and namespace specifiers to get "cout" and "endl" and so on, the further compiler error messages indicate refactoring related incompatibility: (has something been removed in latest snapshots?)



g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -std=c++0x -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I. -I/usr/lib -isystem /usr/include/i386-linux-gnu/qt5 -isystem /usr/include/i386-linux-gnu/qt5/QtSvg -isystem /usr/include/i386-linux-gnu/qt5/QtWidgets -isystem /usr/include/i386-linux-gnu/qt5/QtGui -isystem /usr/include/i386-linux-gnu/qt5/QtCore -I. -o drawing-GML.o drawing-GML.cpp
In file included from GMLProcessor.h:36:0,
                 from drawing-GML.cpp:34:
NodeShape.h:125:20: error: expected ‘;’ at end of member declaration
  static NodeShape *create(Shape shape, qreal w, qreal h);
                    ^
NodeShape.h:125:33: error: expected ‘)’ before ‘shape’
  static NodeShape *create(Shape shape, qreal w, qreal h);
                                 ^
In file included from drawing-GML.cpp:34:0:
GMLProcessor.h: In constructor ‘GMLProcessor::GMLProcessor(const Options&)’:
GMLProcessor.h:60:4: error: ‘nodeColor’ is not a member of ‘ogdf::GraphAttributes’
    GraphAttributes::nodeColor    | GraphAttributes::edgeArrow    |
    ^
GMLProcessor.h:61:4: error: ‘edgeColor’ is not a member of ‘ogdf::GraphAttributes’
    GraphAttributes::edgeColor    | GraphAttributes::edgeStyle    |
    ^
In file included from drawing-GML.cpp:37:0:
EndpointShape.h: In static member function ‘static bool EndpointShape::isOpen(EndpointType)’:
EndpointShape.h:88:9: warning: enumeration value ‘stNone’ not handled in switch [-Wswitch]
   switch(type) {
         ^
EndpointShape.h:88:9: warning: enumeration value ‘stArrow’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stTriangle’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stVee’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stTee’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stCircle’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stBox’ not handled in switch [-Wswitch]
EndpointShape.h:88:9: warning: enumeration value ‘stRhomb’ not handled in switch [-Wswitch]
drawing-GML.cpp: In member function ‘void GMLProcessor::normalizeEdge(const ogdf::NodeArray<NodeShape*>&, QPointF*, int&, int&, ogdf::node, ogdf::node)’:
drawing-GML.cpp:51:64: error: ‘class ogdf::ClusterGraphAttributes’ has no member named ‘lineWidthNode’
  while(tail-head+1 > 2 && srcShape->contains(src_x,src_y,m_cga.lineWidthNode(src),points[i])) {
                                                                ^
...


In total there are about 15 "has no member named XYZ" errors.


Stephan Beyer

unread,
May 1, 2018, 7:21:53 AM5/1/18
to og...@googlegroups.com, Carsten Gutwenger
Hi,

On 05/01/2018 12:53 AM, thpit...@gmail.com wrote:
> I tried to compile the gml2pic utility against the 2018-03-28 snapshot
> of ogdf, but unsuccessfully.

This is not surprising: gml2pic is unmaintained for some time now...
If you want to see it working, you can simply use the OGDF Sakura
release (from 2012) or, if you want to, port gml2pic to a more recent
version of OGDF (and probably, from Qt4 to Qt5).

For the OGDF port, you would have to apply at least the
compatibility-breaking changes mentioned here:
https://github.com/ogdf/ogdf/blob/master/doc/porting/baobab.md
and here:
https://github.com/ogdf/ogdf/blob/master/doc/porting/snapshot.md

Many of the errors are due to renames (e.g., stRhomb → Shape::Rhomb),
so it is not that hard to port gml2pic to the latest version of OGDF,
though.

Best,
Stephan

PS @Carsten: Have you "abandoned" the gml2pic project or do you intend
to spend further work on that project?

thpit...@gmail.com

unread,
May 3, 2018, 6:28:54 AM5/3/18
to ogdf
Hello (Stephan),


On Tuesday, May 1, 2018 at 1:21:53 PM UTC+2, Stephan Beyer wrote:
For the OGDF port, you would have to apply at least the
compatibility-breaking changes mentioned here:
https://github.com/ogdf/ogdf/blob/master/doc/porting/baobab.md
and here:
https://github.com/ogdf/ogdf/blob/master/doc/porting/snapshot.md

thank you so far. Very much appreciated.

Before going too deeply into the porting (I have started some), I am wondering what the additional functionality of gml2pic actually is over ogdf snippet code. Would this have to do with the output formats? gml2pic delivers e.g. PNG. I cannot see at a glance whether ogdf can also do this by itself.

Thomas

Stephan Beyer

unread,
May 3, 2018, 6:38:08 AM5/3/18
to og...@googlegroups.com
Hi,

On 05/03/2018 12:28 PM, thpit...@gmail.com wrote:
> On Tuesday, May 1, 2018 at 1:21:53 PM UTC+2, Stephan Beyer wrote:
>
> For the OGDF port, you would have to apply at least the
> compatibility-breaking changes mentioned here:
> https://github.com/ogdf/ogdf/blob/master/doc/porting/baobab.md
> <https://github.com/ogdf/ogdf/blob/master/doc/porting/baobab.md>
> and here:
> https://github.com/ogdf/ogdf/blob/master/doc/porting/snapshot.md
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fogdf%2Fogdf%2Fblob%2Fmaster%2Fdoc%2Fporting%2Fsnapshot.md&sa=D&sntz=1&usg=AFQjCNHDkzu1Kg2fdSLUCXq-SxeZZtMx9Q>
>
>
> thank you so far. Very much appreciated.
>
> Before going too deeply into the porting (I have started some), I am
> wondering what the additional functionality of gml2pic actually is
> over ogdf snippet code. Would this have to do with the output
> formats? gml2pic delivers e.g. PNG. I cannot see at a glance whether
> ogdf can also do this by itself.

To be honest: I have no idea, I have never used it. :)

What I know is: OGDF's only supported graphics output format is SVG
(which you can convert to other formats manually using third-party
tools). However, gml2pic and OGDF may support different features,
e.g., I think some node shapes are not (yet?) supported by OGDF's
SVG export; maybe gml2pic supports these? This should probably be
checked.

Best
Stephan
Reply all
Reply to author
Forward
0 new messages