【问题标题】:Problem installing Shoutpy + Boost.python on opensolaris在 opensolaris 上安装 Shoutpy + Boost.python 时出现问题
【发布时间】:2009-11-25 14:04:38
【问题描述】:

我正在尝试在 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

【问题讨论】:

  • 我写了那个软件。尝试向作者发送电子邮件询问。

标签: python boost boost-python opensolaris


【解决方案1】:

不幸的是,我从未尝试在 OpenSolaris 下编译 shoutpy,而且这些天我也不使用它。 Boost.python 对其 C++ 编译器有很多要求。使用easy_install -b build_directory shoutpy,这样它会在失败后保留源代码,然后检查 C++ 编译器 Python 尝试使用的那些 boost.python 支持的代码。

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

【讨论】:

  • 感谢您的回复。你说你写了那个软件。你写了 Shoutpy?至于我使用 gcc 的编译器,我很确定。 libboost-python-mt 和 libboost-python 有什么区别?
  • 我写了shoutpy。 libboost-python-mt 中的 mt 代表多线程,因此它可以与使用线程的 Python 代码一起使用。
  • 那很方便。我想我会给你发一封电子邮件。我希望 saypy 网站上的那个是最新的 :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-04-23
  • 2012-07-10
  • 2014-07-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多