【发布时间】:2012-04-11 16:47:52
【问题描述】:
我在 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
我也尝试安装 boost141、boost141-devel 和 boost141-python,但 pgmagick 不会针对这些库构建。
关于如何解决问题或进一步诊断问题的任何建议?
【问题讨论】:
-
不是一个直接的答案,但是你看过 Python Imaging Library 吗? pythonware.com/products/pil 还是直接使用
subprocess模块执行GraphicsMagick? -
@RolandSmith 不幸的是,PIL 没有我们需要的功能。使用
subprocess是一种选择,但也很痛苦,因为该应用程序是直接使用 pgmagick 开发的 - 需要重新编写大量代码。 -
看看其他发行版如何为 pgmagick 构建包。也许需要特定的补丁? pgmagick 主页提到在 Ubuntu 上使用
libboost-python1.40-dev。 -
您使用的是哪个版本的 CentOS?我只是尝试在我的 Scientific Linux 6.2 上构建扩展(从 repo 安装了 boost/graphics-magick 依赖项,下载了源代码,做了
python setup.py build)并且没有任何问题。
标签: python centos graphicsmagick pgmagick