在OpenSolaris上安装Shoutpy + Boost.python的问题
我正在尝试在opensolaris 2009.6上安装shoutpy。这个软件依赖于boost.python。我已经从blastwave安装了boost_devel
库,并将/opt/csw/include/boost
链接到了/usr/include/boost
。但是当我尝试运行easy_install shoutpy
时,出现了以下输出:
munderwo@opensolaris-test1:/usr/include$ pfexec easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Running shoutpy-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-w7XQfv/shoutpy-1.0.0/egg-dist-tmp-k11Dky
In file included from /usr/include/boost/python/object/make_instance.hpp:9,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/object/instance.hpp:44: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: `&' cannot appear in a constant-expression
In file included from /usr/include/boost/python/converter/registry.hpp:9,
from /usr/include/boost/python/converter/registered.hpp:8,
from /usr/include/boost/python/object/make_instance.hpp:10,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `&' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: template argument 1 is invalid
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `value' is not a member of `<declaration error>'
error: Setup script exited with error: command '/usr/lib/python2.6/pycc' failed with exit status 1
我使用的是python2.6,opensolaris 2009.06,boost 1.35。
如果能得到任何帮助,那就太好了!
谢谢!
马克
编辑 - 这个问题也发在了serverfault上,因为很难判断问题的具体领域。https://serverfault.com/questions/88724/problem-with-opensolaris-boost-python-and-shoutpy
1 个回答
0
很遗憾,我从来没有在OpenSolaris上尝试过编译shoutpy
,而且现在也不再使用它了。Boost.python对C++编译器的要求很高。你可以用easy_install -b build_directory shoutpy
这个命令,这样在编译失败后,它会保留源代码,然后你可以检查一下Python尝试使用的C++编译器是否在boost.python支持的列表中。
我在我的桌面Linux上尝试过编译,结果成功了,不过我修改了setup.py
文件,让它链接libboost_python-mt
,因为在Ubuntu上libboost_python
是不存在的(根据Python版本等不同,实际上有几个libboost_python*
)。