PythonMagick fails to build
Posted: 2014-01-22T03:50:00-07:00
After updating to ImageMagick-6.8.8-2, I needed to rebuild PythonMagick (v0.9.9), but found that it would not compile. The reason seems to be that additional compare methods were added recently and the compiler was unable to pick which one to use. I'm not by any means a c++ programmer, but by inspecting other code in _Image.cpp, I managed to hack a patch that means the compile succeeds. Whether the patch is correct is another matter, but I thought I'd submit it for consideration.
Code: Select all
--- PythonMagick-0.9.9/pythonmagick_src/_Image.cpp.orig 2014-01-22 08:13:32.531953469 +0000
+++ PythonMagick-0.9.9/pythonmagick_src/_Image.cpp 2014-01-22 08:42:30.755884723 +0000
@@ -93,7 +93,7 @@ void Export_pyste_src_Image()
.def("colorize", (void (Magick::Image::*)(const unsigned int, const unsigned int, const unsigned int, const Magick::Color&) )&Magick::Image::colorize)
.def("colorize", (void (Magick::Image::*)(const unsigned int, const Magick::Color&) )&Magick::Image::colorize)
.def("comment", (void (Magick::Image::*)(const std::string&) )&Magick::Image::comment)
- .def("compare", &Magick::Image::compare)
+ .def("compare", (bool (Magick::Image::*)(const Magick::Image&) )&Magick::Image::compare)
.def("composite", (void (Magick::Image::*)(const Magick::Image&, const ::ssize_t, const ::ssize_t, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_3_4())
.def("composite", (void (Magick::Image::*)(const Magick::Image&, const Magick::Geometry&, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_2_3())
.def("composite", (void (Magick::Image::*)(const Magick::Image&, const MagickCore::GravityType, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_2_3())