0

I am trying to install: couchbase-python-cffi as part of a PyPi package. But I keep on getting the following error when trying to install couchbase-python-cffi:

VerificationError: CompileError: command 'cc' failed with exit status 1

This error only occurs on my Travis Build: https://travis-ci.org/ardydedase/pycouchbase/jobs/75819605#L541

Here's the content of my travis file:

# Config file for automatic testing at travis-ci.org

language: python

python:
  - "3.4"
  - "3.3"
  - "2.7"
  - "2.6"
  - "pypy"

before_install:
  - sudo rm -rf /etc/apt/sources.list.d/*
  - wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -
  - echo deb http://packages.couchbase.com/ubuntu precise precise/main | sudo tee /etc/apt/sources.list.d/couchbase.list
  - sudo apt-get update
  - sudo apt-cache search libcouchbase
  - sudo apt-get install libxml2-dev libxslt-dev python-dev libffi6 libffi-dev
  - sudo apt-get install build-essential libssl-dev

install:
  - sudo apt-get -y install libcouchbase-dev libcouchbase2-core libcouchbase2-libevent libevent-dev
  - pip -q install gevent || echo "Couldn't find gevent"
  - pip -q install twisted
  - pip -q install testresources
  - pip install -r requirements.txt

# command to run tests, e.g. python setup.py test
script: 
  - cd couchbase-python-cffi
  - python setup.py install
  - cd ..
  - python runtests.py

Any help will be greatly appreciated as this has been bothering me for quite a while.

PuercoPop
  • 6,707
  • 4
  • 30
  • 40
Ardy Dedase
  • 1,088
  • 9
  • 15
  • 1
    The first error on the Travis log is ``error: ‘lcb_SYNCTOKEN’ undeclared``. It looks like a missing ``#include`` in the cffi source code of couchbase_ffi. I don't know why only on Travis... – Armin Rigo Aug 16 '15 at 18:14
  • Looking at further errors, maybe the problem is the version of ``libcouchbase-dev``. – Armin Rigo Aug 16 '15 at 18:16
  • @ArminRigo: Thanks for taking a look! Turns out I missed a cached header. – Ardy Dedase Aug 17 '15 at 17:13

1 Answers1

1

The couchbase_cffi module contains a "cached" header of the library (in couchbase_ffi/_lcb.h). That was generated against an older version of the library. Remove that file to force couchbase_cffi to regenerate that file again.

Mark Nunberg
  • 3,551
  • 15
  • 18
  • Thanks! After this one is solved, I encountered another issue that you might be able to help me with: http://stackoverflow.com/questions/32056557/importerror-no-module-named-couchbase-libcouchbase – Ardy Dedase Aug 17 '15 at 17:44