daijifeng001 / MNC

Instance-aware Semantic Segmentation via Multi-task Network Cascades
Other
489 stars 182 forks source link

Error with buildling Cython modules #9

Open jingyan1216 opened 8 years ago

jingyan1216 commented 8 years ago

Hi,

I followed the installation guide and got the following error with make:

python setup.py build_ext --inplace
running build_ext
building 'nms.cpu_nms' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/nms
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/software/python-2.7-modules/lib/python2.7/site-packages/numpy/core/include -I/opt/python27/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
gcc: error: nms/cpu_nms.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command 'gcc' failed with exit status 1
make: *** [all] Error 1

I was wondering if you have any thoughts on how I can fix it. Thanks!

HaozhiQi commented 8 years ago

The issue may be caused by your cython version. What's your cython version?

jingyan1216 commented 8 years ago

I'm using cython 0.24 and gcc 4.9.2, on CentOS-6.6-x86_64.

hgaiser commented 8 years ago

Looks like a strange issue...

gcc is looking for a nms/cpu_nms.c file, which doesn't (and shouldn't?) exist..

If I look in the setup.py script I see:

    Extension(
        "nms.cpu_nms",
        ["nms/cpu_nms.pyx"],
        extra_compile_args={'gcc': ["-Wno-cpp", "-Wno-unused-function"]},
        include_dirs = [numpy_include]

It should be looking for nms/cpu_nms.pyx. Did you modify the setup.py script somehow?

jingyanw commented 8 years ago

I managed to build the Cython modules on another machine with Ubuntu 14.04, cython 0.23.4, gcc 4.8.4, Python 2.7.

On the other machine, I still got the original error. I downgraded Cython from 0.24 to 0.23.4 and it didn't help, so Cython version is not the issue. There seems to be something fragile about the set_up.py script, but I haven't been able to identify what exactly the issue is.

I didn't make any changes to the setup.py script.