如何在linux(CentOS)上构建pgmagick?

时间:2012-04-11 16:47:52

标签: python centos graphicsmagick pgmagick

尝试在CentOS 5.6上构建pgmagick时,我没有取得多大成功。

我通过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

但是,每当我尝试构建pgmagick时,我都会收到以下错误:

/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

我还尝试安装boost141boost141-develboost141-python,但pgmagick不会针对这些库进行构建。

有关如何解决问题或进一步诊断问题的任何建议?

3 个答案:

答案 0 :(得分:1)

看起来版本不兼容问题,尝试使用 boost-1.34

答案 1 :(得分:1)

当你运行configure时,我假设你把它作为./configure --enable-shared=yes执行(注意参数)。如果你这样做(就像教程所说),我认为没有理由说它不应该工作。如果你没有,这可能有所帮助。

答案 2 :(得分:1)

事实证明,实现这项工作的唯一方法是:

  • 从系统中删除所有预编译的boost rpms
  • 从系统中删除所有预编译的GraphicsMagick rpms
  • 使用boost-1.49.0
  • 手动编译./configure --prefix=/usr --enable-shared=yes
  • 通过GraphicsMagick-1.3.14
  • 重新安装GraphicsMagick-c++-1.3.14GraphicsMagick-devel-1.3.14GraphicsMagick-c++-devel-1.3.14yum
  • 从bitbucket克隆pgmagick存储库
  • python setup.py install目录
  • 中再次运行pgmagick