Python 2.7 在AIX5.3上安装python模块加密

Python 2.7 在AIX5.3上安装python模块加密,python-2.7,aix,Python 2.7,Aix,这是我在尝试安装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

这是我在尝试安装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
停止生成的错误是:
无法执行./Modules/ld\u so\u aix:没有这样的文件或目录
在其他模块中,通过更改指向ld_so_aix的代码或在正确的位置创建软链接,已经纠正了该错误


我还没有弄清楚如何将这些解决方案应用于此模块。

我安装了这些更改:

警告:这是一个完整的黑客。有人需要弄清楚为什么这是成功的,并把在一个真正的修复

/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"
/opt/freeware/lib/python2.7/config:
#diff ld_so_aix.orig ld_so_aix
89c89
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',
/opt/freeware/lib/python2.7:
#diff\u sysconfigdata.py.original\u sysconfigdata.py
20c20
<'BLDSHARED':'。/Modules/ld_so_aix xlc_r-ma-I/opt/freeware/include-DAIX_reageny_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_-generious_-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_general_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_reagential_CPLUSCPLUS-Wl,-brtl-bI:./Modules/python.exp-L/opt/freeware/lib”,

看到没有人给出更好的答案,我会接受自己的答案。如果有人发布了一个非黑客的答案,我将不接受这一点,并接受他们的。
/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',