SynergyNet icon indicating copy to clipboard operation
SynergyNet copied to clipboard

Problem compiling FaceBoxes

Open pepeballesterostel opened this issue 1 year ago • 11 comments

After trying a couple of times, I find impossible to correctly compile the file ./build_cpu_nms.sh. The error is:

cl : Command line error D8021 : **invalid numeric argument '/Wno-cpp'**
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

I am not sure if this could be related to the operating system. I am running the code in Visual Studio Code on Windows 11.

Looking after the error I found this. So I changed in build.py inside FaceBoxes/utils the line of code 47: from extra_compile_args=["-Wno-cpp", "-Wno-unused-function"] to extra_compile_args={'gcc': ['/Qstd=c99']} After running this, I get the following warnings:

cl : Command line warning D9024 : unrecognized source file type 'gcc', object file assumed
cl : Command line warning D9027 : source file 'gcc' ignored

From where I assume that is basically not compiling the extra modules, but ignoring it. So, it does not show and error, but as expected, the code does not work. The error raises in FaceBoxes\utils\nms_wrapper.py :

  File "nms\cpu_nms.pyx", line 25, in nms.cpu_nms.cpu_nms
ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'

I also tried commenting line 47 - in build.py inside FaceBoxes/utils - and uncommenting line 46, which raises the same error.

Any ideas how to solve this? Many thanks.

pepeballesterostel avatar Apr 08 '23 23:04 pepeballesterostel