【问题标题】:Install of python module cryptography on AIX 5.3在 AIX 5.3 上安装 python 模块加密
【发布时间】:2015-07-11 17:19:04
【问题描述】:

这是我在尝试安装 cryptography-0.8.2 时收到的错误:

# ksh ./install.ksh
"_configtest.c", line 1.1: 1506-731 (S) The '__thread' keyword is not supported on the target platform.  The keyword is ignored.
Note: will not use '__thread' in the C code
The above error message can be safely ignored
"/usr/include/alloca.h", line 34.1: 1506-224 (I) Incorrect pragma ignored.
"c/_cffi_backend.c", line 5665.15: 1506-068 (W) Operation between types "void*" and "char(*)(char,char)" is not allowed.
"c/_cffi_backend.c", line 5666.15: 1506-068 (W) Operation between types "void*" and "long(*)(int,long)" is not allowed.
"c/_cffi_backend.c", line 5667.15: 1506-068 (W) Operation between types "void*" and "long long(*)(long long,long long)" is not allowed.
"c/_cffi_backend.c", line 5668.15: 1506-068 (W) Operation between types "void*" and "double(*)(float,double)" is not allowed.
"c/_cffi_backend.c", line 5669.15: 1506-068 (W) Operation between types "void*" and "float(*)(float,double)" is not allowed.
"c/_cffi_backend.c", line 5670.15: 1506-068 (W) Operation between types "void*" and "void(*)(void)" is not allowed.
"c/_cffi_backend.c", line 5671.15: 1506-068 (W) Operation between types "void*" and "int*(*)(int*)" is not allowed.
"c/_cffi_backend.c", line 5672.15: 1506-068 (W) Operation between types "void*" and "short(*)(struct _testfunc7_s)" is not allowed.
"c/_cffi_backend.c", line 5674.15: 1506-068 (W) Operation between types "void*" and "int(*)(int,...)" is not allowed.
"c/_cffi_backend.c", line 5675.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc7_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5676.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc11_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5677.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc12_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5678.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc13_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5679.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc14_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5680.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc15_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5681.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc16_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5682.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc17_s(*)(int)" is not allowed.
"c/_cffi_backend.c", line 5683.16: 1506-068 (W) Operation between types "void*" and "int(*)(struct _testfunc17_s*)" is not allowed.
"c/_cffi_backend.c", line 5684.16: 1506-068 (W) Operation between types "void*" and "long double(*)(long double,int)" is not allowed.
"c/_cffi_backend.c", line 5685.16: 1506-068 (W) Operation between types "void*" and "short(*)(struct _testfunc7_s*)" is not allowed.
"c/_cffi_backend.c", line 5686.16: 1506-068 (W) Operation between types "void*" and "int(*)(struct _testfunc21_s)" is not allowed.
"c/_cffi_backend.c", line 5687.16: 1506-068 (W) Operation between types "void*" and "struct _testfunc22_s(*)(struct _testfunc22_s,struct _testfunc22_s)" is not allowed.
"c/_cffi_backend.c", line 5688.16: 1506-068 (W) Operation between types "void*" and "int(*)(char*)" is not allowed.
"c/_cffi_backend.c", line 5906.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5907.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5908.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5909.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5910.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5911.5: 1506-196 (W) Initialization between types "void*" and "unsigned int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5912.5: 1506-196 (W) Initialization between types "void*" and "long long(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5913.5: 1506-196 (W) Initialization between types "void*" and "unsigned long long(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5914.5: 1506-196 (W) Initialization between types "void*" and "int(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5915.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(char*,struct _ctypedescr*)" is not allowed.
"c/_cffi_backend.c", line 5916.5: 1506-196 (W) Initialization between types "void*" and "char*(*)(struct _object*,struct _ctypedescr*)" is not allowed.
"c/_cffi_backend.c", line 5917.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(long*)" is not allowed.
"c/_cffi_backend.c", line 5918.5: 1506-196 (W) Initialization between types "void*" and "void(*)(void)" is not allowed.
"c/_cffi_backend.c", line 5919.5: 1506-196 (W) Initialization between types "void*" and "void(*)(void)" is not allowed.
"c/_cffi_backend.c", line 5920.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(char)" is not allowed.
"c/_cffi_backend.c", line 5921.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(char*,struct _ctypedescr*)" is not allowed.
"c/_cffi_backend.c", line 5922.5: 1506-196 (W) Initialization between types "void*" and "int(*)(char*,struct _ctypedescr*,struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5923.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(char*,struct _ctypedescr*)" is not allowed.
"c/_cffi_backend.c", line 5925.5: 1506-196 (W) Initialization between types "void*" and "unsigned short(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5926.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(unsigned short)" is not allowed.
"c/_cffi_backend.c", line 5931.5: 1506-196 (W) Initialization between types "void*" and "long double(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5932.5: 1506-196 (W) Initialization between types "void*" and "_Bool(*)(struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5933.5: 1506-196 (W) Initialization between types "void*" and "long(*)(struct _ctypedescr*,struct _object*,char**)" is not allowed.
"c/_cffi_backend.c", line 5934.5: 1506-196 (W) Initialization between types "void*" and "int(*)(char*,struct _ctypedescr*,struct _object*)" is not allowed.
"c/_cffi_backend.c", line 5935.5: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(char*,const struct _cffi_type_context_s*)" is not allowed.
unable to execute ./Modules/ld_so_aix: No such file or directory
Traceback (most recent call last):
  File "setup.py", line 342, in <module>
    **keywords_with_side_effects(sys.argv)
  File "/opt/freeware/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "build/bdist.aix-5.3/egg/setuptools/dist.py", line 265, in __init__
  File "build/bdist.aix-5.3/egg/setuptools/dist.py", line 310, in fetch_build_eggs
  File "build/bdist.aix-5.3/egg/pkg_resources/__init__.py", line 824, in resolve
  File "build/bdist.aix-5.3/egg/pkg_resources/__init__.py", line 1069, in best_match
  File "build/bdist.aix-5.3/egg/pkg_resources/__init__.py", line 1081, in obtain
  File "build/bdist.aix-5.3/egg/setuptools/dist.py", line 377, in fetch_build_egg
  File "build/bdist.aix-5.3/egg/setuptools/command/easy_install.py", line 629, in easy_install
  File "build/bdist.aix-5.3/egg/setuptools/command/easy_install.py", line 659, in install_item
  File "build/bdist.aix-5.3/egg/setuptools/command/easy_install.py", line 842, in install_eggs
  File "build/bdist.aix-5.3/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
  File "build/bdist.aix-5.3/egg/setuptools/command/easy_install.py", line 1058, in run_setup
distutils.errors.DistutilsError: Setup script exited with error: command './Modules/ld_so_aix' failed with exit status 1

安装脚本如下:

function installmodule {
   module=$1
   gtar -xzf ${module}.tar.gz
   cd $module
   python setup.py install --user
   cd ..
}

export LIBPATH=/opt/freeware/lib
export LD_LIBIRARY_PATH=/opt/freeware/lib
BASEDIR=$HOME/mystuff/
export PYTHONUSERBASE=$BASEDIR/python

installmodule cryptography-0.8.2

停止构建的错误是: unable to execute ./Modules/ld_so_aix: No such file or directory 通过更改指向 ld_so_aix 的代码或在正确的位置创建软链接,该错误已在其他模块中得到纠正。

我还没有想出如何将这些解决方案应用到这个模块。

【问题讨论】:

    标签: python-2.7 aix


    【解决方案1】:

    我通过这些更改安装了它:

    警告:这是一个完整的 hack。有人需要弄清楚为什么这会成功并进行真正的修复。

    /opt/freeware/lib/python2.7/config:
    # diff ld_so_aix.orig ld_so_aix
    89c89
    < impfile="./python.exp"
    ---
    > impfile="/opt/freeware/lib/python2.7/config/python.exp"
    116a117
    >         impfile="/opt/freeware/lib/python2.7/config/python.exp"
    

    注意:impfile 的第二个设置是覆盖它的命令行设置。

    /opt/freeware/lib/python2.7:
    # diff _sysconfigdata.py.original _sysconfigdata.py
    20c20
    <  'BLDSHARED': './Modules/ld_so_aix xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:./Modules/python.exp -L/opt/freeware/lib',
    ---
    >  'BLDSHARED': '/opt/freeware/lib/python2.7/config/ld_so_aix xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:./Modules/python.exp -L/opt/freeware/lib',
    366c366
    <  'LDSHARED': './Modules/ld_so_aix xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:./Modules/python.exp -L/opt/freeware/lib',
    ---
    >  'LDSHARED': '/opt/freeware/lib/python2.7/config/ld_so_aix xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:./Modules/python.exp -L/opt/freeware/lib',
    

    【讨论】:

    • 看到没有人发布更好的答案,我会接受我自己的答案。如果有人发布非黑客答案,我将不接受并接受他们的答案。
    猜你喜欢
    • 1970-01-01
    • 2013-04-03
    • 1970-01-01
    • 2013-10-02
    • 2011-01-23
    • 1970-01-01
    • 2015-12-23
    • 2011-12-31
    • 2010-12-22
    相关资源
    最近更新 更多