1

I'm not having much success when attempting building pgmagick on CentOS 5.6.

I've installed the following via yum:

boost-1.33.1
boost-devel-1.33.1
GraphicsMagick-1.3.14
GraphicsMagick-c++-1.3.14
GraphicsMagick-devel-1.3.14
GraphicsMagick-c++-devel-1.3.14
python-2.6.5
python-devel-2.6.5

However, whenever I try to build pgmagick I get the following error:

/usr/include/boost/python/converter/registered.hpp: In instantiation of ‘const boost::python::converter::registration& boost::python::converter::detail::registered_base<const volatile void>::converters’:
/usr/include/boost/python/converter/arg_from_python.hpp:269:   instantiated from ‘boost::python::converter::pointer_arg_from_python<T>::pointer_arg_from_python(PyObject*) [with T = void*]’
/usr/include/boost/python/arg_from_python.hpp:70:   instantiated from ‘boost::python::arg_from_python<T>::arg_from_python(PyObject*) [with T = void*]’
/usr/include/boost/preprocessor/iteration/detail/local.hpp:37:   instantiated from ‘PyObject* boost::python::detail::caller_arity<3u>::impl<F, Policies, Sig>::operator()(PyObject*, PyObject*) [with F = void (*)(Magick::Blob&, void*, long unsigned int), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector4<void, Magick::Blob&, void*, long unsigned int>]’
/usr/include/boost/python/object/py_function.hpp:38:   instantiated from ‘PyObject* boost::python::objects::caller_py_function_impl<Caller>::operator()(PyObject*, PyObject*) [with Caller = boost::python::detail::caller<void (*)(Magick::Blob&, void*, long unsigned int), boost::python::default_call_policies, boost::mpl::vector4<void, Magick::Blob&, void*, long unsigned int> >]’
./src/_Blob.cpp:43:   instantiated from here
/usr/include/boost/python/converter/registered.hpp:88: error: no matching function for call to ‘registry_lookup(const volatile void (*)())’
error: command 'gcc' failed with exit status 1

I've also tried installing boost141, boost141-devel and boost141-python but pgmagick won't build against those libraries.

Any suggestions on how I can fix the problem, or further diagnose the issue?

Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134
  • Not a direct answer, but have you looked at the Python Imaging Library? http://www.pythonware.com/products/pil/ Or at using the `subprocess` module to execute GraphicsMagick directly? – Roland Smith Apr 23 '12 at 19:29
  • @RolandSmith unfortunately PIL doesn't have the features we require. Using `subprocess` is an option, but also it's quite a pain since the app has been developed using pgmagick directly - a lot of code would need to be reworked. – Phillip B Oldham Apr 24 '12 at 11:25
  • Look at how other distributions build packages for pgmagick. Maybe specific patches are needed? The pgmagick homepage mentions using `libboost-python1.40-dev` on Ubuntu. – Roland Smith Apr 24 '12 at 18:28
  • what version of CentOS are you using? I just tried to build the extension on my Scientific Linux 6.2 (installed boost/graphics-magick dependencies from repo, downloaded source, did `python setup.py build`) and didn't have any issues there. – shu zOMG chen Apr 26 '12 at 18:51

3 Answers3

1

It looks like versions incompatibility problem, try using boost-1.34

Ivan Blinkov
  • 2,466
  • 15
  • 17
  • CentOS doesn't seem to have boost-1.34 available. Would it be best to install this manually? – Phillip B Oldham Apr 24 '12 at 11:26
  • I'd just use some non-official repo like this one: http://rpm.pbone.net/index.php3/stat/4/idpl/8359010/dir/centos_5/com/boost-1.34.1-11.1.x86_64.rpm.html – Ivan Blinkov Apr 24 '12 at 20:20
  • Generally I don't recommend installing packages from non-official repos. You should only do that if you're willing to take the risks involved. According to the pgmagick docs, boost141 and your GraphicsMagick libraries should be supported: http://packages.python.org/pgmagick/tutorial.html#requirements – shu zOMG chen Apr 26 '12 at 18:42
1

When you ran configure, I'm assuming you executed it as ./configure --enable-shared=yes (note the parameter). If you did that (like the tutorial says), I see no reason why it shouldn't be working. If you didn't, this may help.

glen3b
  • 693
  • 1
  • 8
  • 22
1

Turns out the only way to get this working was to:

  • remove all the pre-compiled boost rpms from the system
  • remove all the pre-compiled GraphicsMagick rpms from the system
  • compile boost-1.49.0 manually, using ./configure --prefix=/usr --enable-shared=yes
  • reinstall GraphicsMagick-1.3.14, GraphicsMagick-c++-1.3.14, GraphicsMagick-devel-1.3.14 and GraphicsMagick-c++-devel-1.3.14 via yum
  • clone the pgmagick repository from bitbucket
  • run python setup.py install again within the pgmagick directory
Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134