Compiling Graph Tool, No longer gets along with Cairo
The graph-tool master branch as of today (6/15/18) does not compile with cairomm > 1.15.5.
I ran into the following error during compilation:
CXX graph_cairo_draw.lo
graph_cairo_draw.cc: In member function ‘double VertexShape<Descriptor>::get_size(Cairo::Context&)’:
graph_cairo_draw.cc:640:56: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)),
^
graph_cairo_draw.cc:641:56: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(VERTEX_FONT_WEIGHT)));
^
graph_cairo_draw.cc: In member function ‘void VertexShape<Descriptor>::draw(Cairo::Context&, bool)’:
graph_cairo_draw.cc:974:56: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(VERTEX_FONT_SLANT)),
^
graph_cairo_draw.cc:975:56: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(VERTEX_FONT_WEIGHT)));
^
graph_cairo_draw.cc: In member function ‘void EdgeShape<Descriptor, VertexShape>::draw(Cairo::Context&, double)’:
graph_cairo_draw.cc:1180:30: error: ‘FILL_RULE_EVEN_ODD’ is not a member of ‘Cairo’
cr.set_fill_rule(Cairo::FILL_RULE_EVEN_ODD);
^
graph_cairo_draw.cc:1185:29: error: ‘OPERATOR_SOURCE’ is not a member of ‘Cairo’
cr.set_operator(Cairo::OPERATOR_SOURCE);
^
graph_cairo_draw.cc:1229:29: error: ‘OPERATOR_OVER’ is not a member of ‘Cairo’
cr.set_operator(Cairo::OPERATOR_OVER);
^
graph_cairo_draw.cc:1252:34: error: ‘FILL_RULE_EVEN_ODD’ is not a member of ‘Cairo’
cr.set_fill_rule(Cairo::FILL_RULE_EVEN_ODD);
^
graph_cairo_draw.cc:1317:52: error: ‘FontSlant’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontSlant>(_attrs.template get<int32_t>(EDGE_FONT_SLANT)),
^
graph_cairo_draw.cc:1318:52: error: ‘FontWeight’ in namespace ‘Cairo’ does not name a type
static_cast<Cairo::FontWeight>(_attrs.template get<int32_t>(EDGE_FONT_WEIGHT)));
^
Makefile:577: recipe for target 'graph_cairo_draw.lo' failed
During my troubleshooting, I searched for any files in cairomm
which contain FontSlant
:
grep -rnw /path/to/cairomm -e 'FontSlant'
And this action returned the following:
./cairomm-1.15.5/NEWS:17: - Change Cairo::FontSlant enum to Cairo::ToyFontFace::Slant.
./cairomm-1.15.5/ChangeLog:43: Change Cairo::FontSlant enum to Cairo::ToyFontFace::Slant.
So, there is no FontSlant
in cairomm as of cairomm-1.15.5. I will now try different versions of py-cairo, cairo and cairomm, but this seems like an important issue.