kobotoolbox / kobo-docker

Stack of docker containers to all server-side components of KoBoToolbox (kpi, kobocat, enketo-express).
179 stars 203 forks source link

CFFI fails to build in postgres container #325

Closed j-manu closed 2 years ago

j-manu commented 2 years ago

Description/Steps to Reproduce

  1. Install the latest master via kobo-install
  2. Install backend only. Server setup
  3. Activate AWS S3 for backups (not sure if this is relevant but this is the setup)
  4. On python3 run.py -cb logs -f postgresql container contains the following error repeatedly
postgres_1     |   ERROR: Failed building wheel for cffi
postgres_1     |     ERROR: Command errored out with exit status 1:
postgres_1     |      command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xnfml_65/cffi_b28ad5b1686242f38908cfc9aac5db09/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xnfml_65/cffi_b28ad5b1686242f38908cfc9aac5db09/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-jf3ofsyq/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/cffi
postgres_1     |          cwd: /tmp/pip-install-xnfml_65/cffi_b28ad5b1686242f38908cfc9aac5db09/
postgres_1     |     Complete output (36 lines):
postgres_1     |     running install
postgres_1     |     running build
postgres_1     |     running build_py
postgres_1     |     creating build
postgres_1     |     creating build/lib.linux-x86_64-3.5
postgres_1     |     creating build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/api.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/recompiler.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/verifier.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/lock.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/__init__.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/cparser.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/commontypes.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/error.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/model.py -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/_embedding.h -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.5/cffi
postgres_1     |     running build_ext
postgres_1     |     building '_cffi_backend' extension
postgres_1     |     creating build/temp.linux-x86_64-3.5
postgres_1     |     creating build/temp.linux-x86_64-3.5/c
postgres_1     |     x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-5Cvh2K/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.5/c/_cffi_backend.o
postgres_1     |     c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
postgres_1     |      #include <ffi.h>
postgres_1     |                      ^
postgres_1     |     compilation terminated.
postgres_1     |     error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Expected behavior No errors

noliveleger commented 2 years ago

Hello @j-manu, Thank you for reporting this. We will release fix a soon. Did you only activate S3 for backups or did you also choose WAL-e?

j-manu commented 2 years ago

It's been so long. I don't remember exactly :(