【问题标题】:M2crypto compilation on aixaix 上的 M2crypto 编译
【发布时间】:2013-03-23 12:18:27
【问题描述】:

在 AIX5.1 上使用以下加扰命令编译 M2Crypto 模块时:

/opt/local/python/2.7.3/bin/python setup.py build_ext --swig /opt/local/swig/1.3.4/bin/swig -I /opt/local/swig/1.3.4/share/swig/1.3.40/:/opt/local/swig/1.3.4/share/swig/1.3.40/python --openssl /opt/local/openssl/0.9.8/ --library-dirs=/opt/local/openssl/0.9.8/lib/

输出如下:

/opt/local/swig/1.3.4/share/swig/1.3.40//exception.i:11: Error: CPP #error ""This version of exception.i should not be used"". Use the -cpperraswarn option to continue swig processing.

可用编译器列表:

  • --compiler=bcpp Borland C++ 编译器
  • --compiler=cygwin GNU C Compiler for Win32 的 Cygwin 端口
  • --compiler=emx GNU C Compiler for OS/2 的 EMX 端口
  • --compiler=mingw32 GNU C Compiler for Win32 的 Mingw32 端口
  • --compiler=msvc Microsoft Visual C++
  • --compiler=unix 标准 UNIX 风格的编译器

传递这些似乎也不起作用。在 /opt/local/python/2.7.3/lib/python2.7/config/Makefile 我看到:

CC= xlc_r CXX= g++

首先应该使用 xlc_r 编译器。 将 -cpperraswarn 传递给它作为建议返回: error: don't know how to compile C/C++ code on platform 'posix' with 'pperraswarn' compiler

应该有办法让它使用不同于可用编译器列表中定义的编译器进行编译。

【问题讨论】:

    标签: python swig aix m2crypto


    【解决方案1】:

    嗯,本质上,

    Swig 应该以不同的方式编译,

    ./configure --with-python=/opt/local/python/2.7.3/bin/python --prefix=/opt/local/swig/1.3.40 CC=xlc_r CXX=/usr/vacpp/bin/xlC_r
    

    在这种情况下,正确的编译器选项很重要。

    然后对于 M2Crypto:

    /opt/local/python/2.7.3/bin/python setup.py build_ext --openssl=/opt/local/openssl/1.0.0a/

    在该问题之后通常构建和安装。 希望这些东西将来对某人有用。

    【讨论】:

      猜你喜欢
      • 2015-01-10
      • 2016-02-17
      • 2010-10-08
      • 2013-12-10
      • 2012-01-27
      • 2015-07-11
      • 2017-03-16
      • 2012-12-21
      • 2011-04-04
      相关资源
      最近更新 更多