在opensolaris上安装Shoutpy + Boost.python的问题

时间:2009-11-25 14:04:38

标签: python boost boost-python opensolaris

我试图在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,提升1.35。

任何帮助都会很棒!

干杯

标记

编辑 - 这已经在serverfault上交叉发布,因为它有点难以对问题域的位置进行分类。 https://serverfault.com/questions/88724/problem-with-opensolaris-boost-python-and-shoutpy

1 个答案:

答案 0 :(得分:0)

不幸的是,我从来没有尝试过在OpenSolaris下编译shoutpy,而且我最近没有使用它。 Boost.python需要很多C ++编译器。使用easy_install -b build_directory shoutpy以便它在失败后保留源代码,然后检查Python尝试使用的C ++编译器对boost.python支持的源代码。

我尝试在我的桌面Linux上进行编译,在我编辑setup.py以链接libboost_python-mt而不是libboost_python后,它仍然有用,这在Ubuntu中不存在(有几个{ {1}}取决于Python版本等等。)