在CentOS 5.6上嘗試構建pgmagick
時,我並沒有太大的成功。如何在linux上構建pgmagick(CentOS)?
我已經安裝了通過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 setup.py install
再次pgmagick
庫,但你看了Python圖像庫? http://www.pythonware.com/products/pil/或者使用'subprocess'模塊直接執行GraphicsMagick? – 2012-04-23 19:29:08@RolandSmith遺憾的是PIL沒有我們所需要的功能。使用'subprocess'是一個選項,但也很痛苦,因爲應用程序是直接使用pgmagick開發的 - 很多代碼需要重新編寫。 – 2012-04-24 11:25:24
看看其他發行版如何爲pgmagick構建軟件包。也許需要特定的補丁? pgmagick主頁在Ubuntu上提到使用'libboost-python1.40-dev'。 – 2012-04-24 18:28:36