Build fails on Ubuntu12.04(64bit) (python setup.py build_ext --inplace)

Issue #42 resolved
Nash Chen created an issue

Hi, When I build the C++ / Cython extensions of RLPy: python setup.py build_ext --inplace. I encounter a problem: running build_ext cythoning rlpy/Representations/hashing.pyx to rlpy/Representations/hashing.c

Error compiling Cython file:

...

cdef int BIG_INT = 2147483647

@cython.boundscheck(False) @cython.cdivision(True) cdef long hash(long [:] A, long [:] R, int increment, int max): ^


rlpy/Representations/hashing.pyx:9:21: Expected an identifier or literal building 'rlpy.Representations.hashing' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -Irlpy/Representations -I/usr/include/python2.7 -c rlpy/Representations/hashing.c -o build/temp.linux-x86_64-2.7/rlpy/Representations/hashing.o rlpy/Representations/hashing.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. error: command 'gcc' failed with exit status 1

Can somebody help me? Thanks!

Comments (5)

  1. cdann@cdann.de

    Thanks for filing the issue! I tried to reproduce your problems, but did not succeed. Which version of rlpy are you using? A stable release or the current master branch? Could you also let me know which cython version you are using (type cython -Vin a terminal)?

  2. yharel

    I had this issue too, and it was fixed by adding the Anaconda bin directory to the path (cython version is 0.20.2 in Anaconda and 0.15.1 in /usr/bin). Perhaps this should be mentioned in the "Getting Started" page.

  3. cdann@cdann.de

    Thanks for the suggestion. The next stable version of rlpy will be installable via pip, so (hopefully) this issue will not occur anymore.

  4. Log in to comment