GraphLayout plugin fails against newer graphviz versions

47 views
Skip to first unread message

kowrip

unread,
Sep 30, 2010, 2:31:10 PM9/30/10
to GGobi users
GGobi users/developers,

I just ran into an issue when trying to build ggobi 2.1.8 against
graphviz 2.24. Specifically, the GraphLayout plugin failed.
Previously, it built fine against graphviz 2.12. However, somewhere
between versions 2.12 and 2.24, changes were made to the types.h
header file. When building ggobi 2.1.8 against this new graphviz
version, the build fails with this error:

gcc -DHAVE_CONFIG_H -I. -I/siglinux/rpm/SOURCES/IGNORE/
ggobi-2.1.8/src -I/siglinux/rpm/SOURCES/IGNORE/ggobi-2.1.8/libltdl -I/
usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib64/gtk-2.0/
include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/
pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/
include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/
siglinux/tc/sles11sp1_gcc-4.3.4_x86-64/sig1/graphviz-2.24.0/include/
graphviz -Wno-unknown-pragmas -g -O2 -MT plugin_la-graphviz.lo -MD -MP
-MF .deps/plugin_la-graphviz.Tpo -c graphviz.c -fPIC -DPIC -o .libs/
plugin_la- graphviz.o
graphviz.c: In function dot_neato_layout_cb:
graphviz.c:270: error: request for member x in something not a
structure or union
graphviz.c:271: error: request for member y in something not a
structure or union

The error is caused by the removal of this macro in the types.h file
of graphviz:

#define ND_coord_i(n) (n)->u.coord

The offending lines are:

pos[i][0] = (gdouble) ND_coord_i(node).x;
pos[i][1] = (gdouble) ND_coord_i(node).y;

Simply replacing them with the equivalent macro expansion solved the
problem:

pos[i][0] = (gdouble) (node)->u.coord.x;
pos[i][1] = (gdouble) (node)->u.coord.y;

I wanted to pass this on to help others avoid the same headaches I
had.

Kris

M. Edward (Ed) Borasky

unread,
Sep 30, 2010, 3:22:17 PM9/30/10
to kowrip, GGobi users
Thanks!! I ran into this a couple of weeks ago. I solved it by
building ggobi before installing the graphviz-devel RPM, but that's an
ugly hack.

I should try to locate the developer who's maintaining GGobi in the
openSUSE Build Service - his GGobi doesn't have the plugins at all,
which is why I'm building from source. Maybe he ran into this and gave
up.
--
M. Edward (Ed) Borasky
http://borasky-research.net http://twitter.com/znmeb

"A mathematician is a device for turning coffee into theorems." - Paul Erdos


Quoting kowrip <kris...@gmail.com>:

> --
> You received this message because you are subscribed to the Google
> Groups "GGobi users" group.
> To post to this group, send email to gg...@googlegroups.com.
> To unsubscribe from this group, send email to
> ggobi+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ggobi?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages