django - How to install cffi package on AWS Beanstalk -
this question looks same this post, since there no answer, re-asking here.
i have django project deployed on aws beanstalk, using package cffi
. when run eb deploy
, error logs looks like:
...... installing collected packages: cffi, characteristic, idna, pyasn1, enum34, ipaddress, cryptography, cssselect, django, django-bower, django-celery, sqlparse, django-debug-toolbar, django-devserver, django-extensions, django-filter, django-model-utils, futures, django-pipeline, djangorestframework, html5lib, ipython, ipdb, librabbitmq, lxml, markdown, openxmllib, pillow, psycopg2, py, pyasn1-modules, pydocx, pyopenssl, pytest, python-docx, python-magic, queuelib, w3lib, zope.interface, twisted, scrapy, service-identity, south, uwsgi, werkzeug running setup.py install cffi complete output command /opt/python/run/venv/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-wwakyn/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pnak7u-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python2.7/cffi: package libffi not found in pkg-config search path. perhaps should add directory containing `libffi.pc' pkg_config_path environment variable no package 'libffi' found package libffi not found in pkg-config search path. perhaps should add directory containing `libffi.pc' pkg_config_path environment variable no package 'libffi' found package libffi not found in pkg-config search path. perhaps should add directory containing `libffi.pc' pkg_config_path environment variable no package 'libffi' found package libffi not found in pkg-config search path. perhaps should add directory containing `libffi.pc' pkg_config_path environment variable no package 'libffi' found package libffi not found in pkg-config search path. perhaps should add directory containing `libffi.pc' pkg_config_path environment variable no package 'libffi' found running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/cffi copying cffi/model.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/__init__.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/ffiplatform.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/cparser.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/api.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/commontypes.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/verifier.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/lock.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/recompiler.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/vengine_gen.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/gc_weakref.py -> build/lib.linux-x86_64-2.7/cffi copying cffi/_cffi_include.h -> build/lib.linux-x86_64-2.7/cffi copying cffi/parse_c_type.h -> build/lib.linux-x86_64-2.7/cffi running build_ext building '_cffi_backend' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/c gcc -pthread -fno-strict-aliasing -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -dndebug -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -fpic -duse__thread -i/usr/include/ffi -i/usr/include/libffi -i/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o c/_cffi_backend.c:13:17: error: ffi.h: no such file or directory in file included c/_cffi_backend.c:61: c/malloc_closure.h:81: error: expected specifier-qualifier-list before ‘ffi_closure’ c/malloc_closure.h: in function ‘more_core’: c/malloc_closure.h:117: warning: division 0 c/malloc_closure.h:149: error: ‘union mmaped_block’ has no member named ‘next’ c/malloc_closure.h: @ top level: c/malloc_closure.h:158: error: expected ‘)’ before ‘*’ token c/malloc_closure.h:166: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token c/_cffi_backend.c:238: error: expected specifier-qualifier-list before ‘ffi_cif’ c/_cffi_backend.c: in function ‘cdataowninggc_dealloc’: c/_cffi_backend.c:1573: error: ‘ffi_closure’ undeclared (first use in function) c/_cffi_backend.c:1573: error: (each undeclared identifier reported once c/_cffi_backend.c:1573: error: each function appears in.) c/_cffi_backend.c:1573: error: ‘closure’ undeclared (first use in function) c/_cffi_backend.c:1573: error: expected expression before ‘)’ token c/_cffi_backend.c:1576: warning: implicit declaration of function ‘cffi_closure_free’ c/_cffi_backend.c: in function ‘cdataowninggc_traverse’: c/_cffi_backend.c:1593: error: ‘ffi_closure’ undeclared (first use in function) c/_cffi_backend.c:1593: error: ‘closure’ undeclared (first use in function) c/_cffi_backend.c:1593: error: expected expression before ‘)’ token c/_cffi_backend.c: in function ‘cdataowninggc_clear’: c/_cffi_backend.c:1613: error: ‘ffi_closure’ undeclared (first use in function) c/_cffi_backend.c:1613: error: ‘closure’ undeclared (first use in function) c/_cffi_backend.c:1613: error: expected expression before ‘)’ token c/_cffi_backend.c: in function ‘cdataowninggc_repr’: c/_cffi_backend.c:1742: error: ‘ffi_closure’ undeclared (first use in function) c/_cffi_backend.c:1742: error: expected expression before ‘)’ token c/_cffi_backend.c: @ top level: c/_cffi_backend.c:2308: error: expected declaration specifiers or ‘...’ before ‘ffi_abi’ c/_cffi_backend.c: in function ‘cdata_call’: c/_cffi_backend.c:2437: error: ‘ffi_abi’ undeclared (first use in function) c/_cffi_backend.c:2437: error: expected ‘;’ before ‘fabi’ c/_cffi_backend.c:2479: error: ‘fabi’ undeclared (first use in function) c/_cffi_backend.c:2483: error: many arguments function ‘fb_prepare_cif’ c/_cffi_backend.c:2488: error: ‘cif_description_t’ has no member named ‘exchange_size’ c/_cffi_backend.c:2498: error: ‘cif_description_t’ has no member named ‘exchange_offset_arg’ c/_cffi_backend.c:2528: error: ‘cif_description_t’ has no member named ‘exchange_offset_arg’ c/_cffi_backend.c:2533: warning: implicit declaration of function ‘ffi_call’ c/_cffi_backend.c:2533: error: ‘cif_description_t’ has no member named ‘cif’ c/_cffi_backend.c: in function ‘new_primitive_type’: c/_cffi_backend.c:3524: error: ‘ffi_type’ undeclared (first use in function) c/_cffi_backend.c:3524: error: ‘ffitype’ undeclared (first use in function) c/_cffi_backend.c:3542: error: ‘ffi_type_sint8’ undeclared (first use in function) c/_cffi_backend.c:3543: error: ‘ffi_type_sint16’ undeclared (first use in function) c/_cffi_backend.c:3544: error: ‘ffi_type_sint32’ undeclared (first use in function) c/_cffi_backend.c:3545: error: ‘ffi_type_sint64’ undeclared (first use in function) c/_cffi_backend.c:3551: error: ‘ffi_type_float’ undeclared (first use in function) c/_cffi_backend.c:3553: error: ‘ffi_type_double’ undeclared (first use in function) c/_cffi_backend.c:3555: error: ‘ffi_type_longdouble’ undeclared (first use in function) c/_cffi_backend.c:3561: error: ‘ffi_type_uint8’ undeclared (first use in function) c/_cffi_backend.c:3562: error: ‘ffi_type_uint16’ undeclared (first use in function) c/_cffi_backend.c:3563: error: ‘ffi_type_uint32’ undeclared (first use in function) c/_cffi_backend.c:3564: error: ‘ffi_type_uint64’ undeclared (first use in function) c/_cffi_backend.c: @ top level: c/_cffi_backend.c:4200: error: expected specifier-qualifier-list before ‘ffi_type’ c/_cffi_backend.c:4219: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token c/_cffi_backend.c: in function ‘fb_build’: c/_cffi_backend.c:4359: error: ‘struct funcbuilder_s’ has no member named ‘atypes’ c/_cffi_backend.c:4359: error: ‘ffi_type’ undeclared (first use in function) c/_cffi_backend.c:4359: error: expected expression before ‘)’ token c/_cffi_backend.c:4360: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4363: error: ‘struct funcbuilder_s’ has no member named ‘rtype’ c/_cffi_backend.c:4363: warning: implicit declaration of function ‘fb_fill_type’ c/_cffi_backend.c:4371: error: ‘cif_description_t’ has no member named ‘exchange_offset_arg’ c/_cffi_backend.c:4374: error: ‘struct funcbuilder_s’ has no member named ‘rtype’ c/_cffi_backend.c:4375: error: ‘ffi_arg’ undeclared (first use in function) c/_cffi_backend.c:4385: error: ‘atype’ undeclared (first use in function) c/_cffi_backend.c:4398: error: ‘struct funcbuilder_s’ has no member named ‘atypes’ c/_cffi_backend.c:4399: error: ‘struct funcbuilder_s’ has no member named ‘atypes’ c/_cffi_backend.c:4402: error: ‘cif_description_t’ has no member named ‘exchange_offset_arg’ c/_cffi_backend.c:4409: error: ‘cif_description_t’ has no member named ‘exchange_size’ c/_cffi_backend.c: in function ‘fb_build_name’: c/_cffi_backend.c:4431: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4440: error: ‘struct funcbuilder_s’ has no member named ‘fct’ c/_cffi_backend.c:4442: error: ‘struct funcbuilder_s’ has no member named ‘fct’ c/_cffi_backend.c: in function ‘fb_prepare_ctype’: c/_cffi_backend.c:4483: error: ‘struct funcbuilder_s’ has no member named ‘fct’ c/_cffi_backend.c:4493: error: ‘struct funcbuilder_s’ has no member named ‘fct’ c/_cffi_backend.c: @ top level: c/_cffi_backend.c:4513: error: expected declaration specifiers or ‘...’ before ‘ffi_abi’ c/_cffi_backend.c: in function ‘fb_prepare_cif’: c/_cffi_backend.c:4540: warning: implicit declaration of function ‘ffi_prep_cif’ c/_cffi_backend.c:4540: error: ‘cif_description_t’ has no member named ‘cif’ c/_cffi_backend.c:4540: error: ‘fabi’ undeclared (first use in function) c/_cffi_backend.c:4540: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4541: error: ‘struct funcbuilder_s’ has no member named ‘rtype’ c/_cffi_backend.c:4541: error: ‘struct funcbuilder_s’ has no member named ‘atypes’ c/_cffi_backend.c:4541: error: ‘ffi_ok’ undeclared (first use in function) c/_cffi_backend.c: in function ‘new_function_type’: c/_cffi_backend.c:4585: error: many arguments function ‘fb_prepare_cif’ c/_cffi_backend.c:4599: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4609: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4619: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4622: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4623: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c:4625: error: ‘struct funcbuilder_s’ has no member named ‘nargs’ c/_cffi_backend.c: in function ‘b_new_function_type’: c/_cffi_backend.c:4636: error: ‘ffi_default_abi’ undeclared (first use in function) c/_cffi_backend.c: in function ‘convert_from_object_fficallback’: c/_cffi_backend.c:4655: error: ‘ffi_arg’ undeclared (first use in function) c/_cffi_backend.c: @ top level: c/_cffi_backend.c:4727: error: expected ‘)’ before ‘*’ token c/_cffi_backend.c: in function ‘b_callback’: c/_cffi_backend.c:4798: error: ‘ffi_closure’ undeclared (first use in function) c/_cffi_backend.c:4798: error: ‘closure’ undeclared (first use in function) c/_cffi_backend.c:4819: error: ‘ffi_arg’ undeclared (first use in function) c/_cffi_backend.c:4837: warning: implicit declaration of function ‘cffi_closure_alloc’ c/_cffi_backend.c:4855: warning: implicit declaration of function ‘ffi_prep_closure’ c/_cffi_backend.c:4855: error: ‘cif_description_t’ has no member named ‘cif’ c/_cffi_backend.c:4856: error: ‘invoke_callback’ undeclared (first use in function) c/_cffi_backend.c:4856: error: ‘ffi_ok’ undeclared (first use in function) in file included c/cffi1_module.c:3, c/_cffi_backend.c:5973: c/realize_c_type.c: in function ‘realize_c_type_or_func’: c/realize_c_type.c:562: error: ‘ffi_default_abi’ undeclared (first use in function) c/_cffi_backend.c: in function ‘init_cffi_backend’: c/_cffi_backend.c:6057: error: ‘ffi_default_abi’ undeclared (first use in function) error: command 'gcc' failed exit status 1
i can tell aws looks libffi
without success. however, how install it? tried workaround in link above not working either.
to install cffi
python package, first need install libffi-devel
using yum
:
sudo yum install libffi-devel
which can automate adding config file in .ebextensions
folder this:
packages: yum: libffi-devel: []
this mentioned in other post, since search engine brought me here first , other marked duplicate... thought should better reply here.
Comments
Post a Comment