Hi there,
I am trying to get a native ansible running on AIX.
After fighting through the command line options to get through the proxy (set https_proxy env var and add option --trusted-host pypi.python.org )
pip starts to download and install various packages and fails with cffi
Collecting cffi>=1.4.1 (from cryptography>=1.1->paramiko->ansible)
Downloading cffi-1.9.1.tar.gz (407kB)
100% |################################| 409kB 10.4MB/s
Requirement already satisfied (use --upgrade to upgrade): pyparsing in /opt/lib/python2.7/site-packages (from packaging->cryptography>=1.1->paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /opt/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography>=1.1->paramiko->ansible)
Installing collected packages: cffi, cryptography, paramiko, MarkupSafe, jinja2, PyYAML, pycrypto, ansible
Running setup.py install for cffi ... error
Complete output from command /opt/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7YQLNB/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mLBtVb-record/install-record.txt --single-version-externally-managed --compile:
"_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
running install
running build
running build_py
creating build
creating build/lib.aix-6.1-2.7
creating build/lib.aix-6.1-2.7/cffi
copying cffi/__init__.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/api.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/commontypes.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/cparser.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/lock.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/model.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/recompiler.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/verifier.py -> build/lib.aix-6.1-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.aix-6.1-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.aix-6.1-2.7/cffi
copying cffi/_embedding.h -> build/lib.aix-6.1-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.aix-6.1-2.7
creating build/temp.aix-6.1-2.7/c
xlc_r -I/opt/include -O3 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/buildaix/includes -DNDEBUG -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python2.7 -c c/_cffi_backend.c -o build/temp.aix-6.1-2.7/c/_cffi_backend.o
"c/_cffi_backend.c", line 15.10: 1506-296 (S) #include file <ffi.h> not found.
"c/malloc_closure.h", line 6.10: 1506-296 (S) #include file <ffi.h> not found.
"c/malloc_closure.h", line 81.5: 1506-046 (S) Syntax error.
...
[ continued with various syntax errors ]
Obviously ffi.h is not in the include path, or does not exist at all.
I'm quite new to Python and pip, so it might be very probable that this is my fault.
But it also might be a packaging issue. My environment: AIX 6.1 TL9, aixtools.python-2.7.12.3, xlc 12.1
Do you have any clue where to look for to get rid of the problem?
<EDIT>
I found aixtools.libffi.3.2.1.0 and installed it. No change.
No include files under /opt/include... it's hidden in /opt/lib/libffi-3.2.1/include... puzzled.
export CFLAGS="-I/opt/lib/libffi-3.2.1/include"
export LDFLAGS="-L/opt/lib" # libiffi is really in /opt/lib
Again:
pip --trusted-host pypi.python.org install ansible
The error is different now:
xlc_r -DNDEBUG -I/opt/lib/libffi-3.2.1/include -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python2.7 -c c/_cffi_backend.c -o build/temp.aix-6.1-2.7/c/_cffi_backend.o
"/opt/include/python2.7/pyport.h", line 887.2: 1506-205 (S) #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
"c/_cffi_backend.c", line 6433.15: 1506-068 (W) Operation between types "void*" and "char(*)(char,char)" is not allowed.
"c/_cffi_backend.c", line 6434.15: 1506-068 (W) Operation between types "void*" and "long(*)(int,long)" is not allowed.
"c/_cffi_backend.c", line 6435.15: 1506-068 (W) Operation between types "void*" and "long long(*)(long long,long long)" is not allowed.
"c/_cffi_backend.c", line 6436.15: 1506-068 (W) Operation between types "void*" and "double(*)(float,double)" is not allowed.
[...more warnings...]
LONG_BIT is defined in the python include files, and it should be 8 * SIZEOF_LONG, which is also defined in the python includes...
LONG_BIT is 32 while pip is running, and probably should be 64.
Best regards,
Mega