Skip to content

Docker build error #1

@immanuelfodor

Description

@immanuelfodor

Hi Peter, when I tried to build your docker container, at some point it gave me lots of errors, maybe some C++ dependency is failing, could you please look into it?

git clone https://github.com/PeterGrace/kallithea.git kallithea-docker

cat docker-compose.yml 
version: "3"
services:
  kallithea:
    build: ./kallithea-docker
    image: kallithea:latest
    container_name: kallithea
    ports:
     - "8080:5000"
    restart: unless-stopped
    volumes:
     - /srv/kallithea/data:/opt/kallithea/data
     - /srv/kallithea/repos:/opt/kallithea/repos
docker-compose up -d --build
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python2 /usr/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bsRBLd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.python.org -- 'setuptools>=40.8.0' wheel 'cffi>=1.1; python_implementation != '"'"'PyPy'"'"''                                                                                                                          
       cwd: None                                                                                                                                                                                                                             
  Complete output (76 lines):                                                                                                                                                                                                                
  DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support                                                                                                                            
  Collecting setuptools>=40.8.0                                                                                                                                                                                                              
    Downloading https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl (576kB)                                                                    
  Collecting wheel                                                                                                                                                                                                                           
    Downloading https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl                                                                                 
  Collecting cffi>=1.1                                                                                                                                                                                                                       
    Downloading https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz (456kB)                                                                                        
  Collecting pycparser (from cffi>=1.1)                                                                                                                                                                                                      
    Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)                                                                                     
  Installing collected packages: setuptools, wheel, pycparser, cffi                                                                                                                                                                          
    Running setup.py install for pycparser: started                                                                                                                                                                                          
      Running setup.py install for pycparser: finished with status 'done'                                                                                                                                                                    
    Running setup.py install for cffi: started                                                                                                                                                                                               
      Running setup.py install for cffi: finished with status 'error'                                                                                                                                                                        
      ERROR: Command errored out with exit status 1:                                                                                                                                                                                         
       command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-88iagr/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-88iagr/cffi/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-DU4lq0/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-bsRBLd/overlay --compile                                                                                                                                                                                                                 
           cwd: /tmp/pip-install-88iagr/cffi/                                                                                                                                                                                                
      Complete output (56 lines):                                                                                                                                                                                                            
      Package libffi was not found in the pkg-config search path.                                                                                                                                                                            
      Perhaps you should add the directory containing `libffi.pc'                                                                                                                                                                            
      to the PKG_CONFIG_PATH environment variable                                                                                                                                                                                            
      Package 'libffi', required by 'virtual:world', not found                                                                                                                                                                               
      Package libffi was not found in the pkg-config search path.                                                                                                                                                                            
      Perhaps you should add the directory containing `libffi.pc'                                                                                                                                                                            
      to the PKG_CONFIG_PATH environment variable                                                                                                                                                                                            
      Package 'libffi', required by 'virtual:world', not found                                                                                                                                                                               
      Package libffi was not found in the pkg-config search path.                                                                                                                                                                            
      Perhaps you should add the directory containing `libffi.pc'                                                                                                                                                                            
      to the PKG_CONFIG_PATH environment variable                                                                                                                                                                                            
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not found
      Package libffi was not found in the pkg-config search path.
      Perhaps you should add the directory containing `libffi.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'libffi', required by 'virtual:world', not 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/backend_ctypes.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/model.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/recompiler.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/cparser.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/lock.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/verifier.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/__init__.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/error.py -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/api.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
      copying cffi/_embedding.h -> build/lib.linux-x86_64-2.7/cffi
      copying cffi/_cffi_errors.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 -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -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:15:10: fatal error: ffi.h: No such file or directory
       #include <ffi.h>
                ^~~~~~~
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-88iagr/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-88iagr/cffi/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-DU4lq0/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-bsRBLd/overlay --compile Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bsRBLd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.python.org -- 'setuptools>=40.8.0' wheel 'cffi>=1.1; python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions