Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling Cython file #12

Open
ubenz55555 opened this issue Oct 6, 2017 · 1 comment
Open

Error compiling Cython file #12

ubenz55555 opened this issue Oct 6, 2017 · 1 comment

Comments

@ubenz55555
Copy link

ubenz55555 commented Oct 6, 2017

While I'm trying to add one line in /lib/nms/cpy_nms.pyx "print( boxes)"

if boxes[pos, 4] < threshold:
boxes[pos,0] = boxes[N-1, 0]
boxes[pos,1] = boxes[N-1, 1]
boxes[pos,2] = boxes[N-1, 2]
boxes[pos,3] = boxes[N-1, 3]
boxes[pos,4] = boxes[N-1, 4]
N = N - 1
pos = pos - 1
print(boxes)

it comes out an error after I "make" under /lib
test:lib$ make
python setup.py build_ext --inplace
running build_ext
skipping 'utils/bbox.c' Cython extension (up-to-date)
cythoning nms/cpu_nms.pyx to nms/cpu_nms.c
Error compiling Cython file:

...
boxes[pos,2] = boxes[N-1, 2]
boxes[pos,3] = boxes[N-1, 3]
boxes[pos,4] = boxes[N-1, 4]
N = N - 1
pos = pos - 1
print(boxes)
^

nms/cpu_nms.pyx:99:0: Mixed use of tabs and spaces
building 'nms.cpu_nms' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c nms/cpu_nms.c -o build/temp.linux-x86_64-2.7/nms/cpu_nms.o -Wno-cpp -Wno-unused-function
nms/cpu_nms.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
#error Do not use this file, it is the result of a failed Cython compilation.
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

Does anyone have an idea?

@ubenz55555
Copy link
Author

It seems not a syntex error, I am unable to compile this cython file after I add one line "print(bbox)", to show what is in the bbox . This code seems to be unmodifiable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant