C++ compilation error libdeepspeech.so

Sometime ago I had tried to get the DeepSpeech to compile and run on Windows (here: Build DeepSpeech on Windows: tfcompile_flags error)

This is another issue in the attempt. Thanks in advance for any help. Following some suggestions that you gave @lissyx, I was able to get this build working:

bazel build -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" native_client:libctc_decoder_with_kenlm.so

I was running into issues in the second build:

bazel build --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden native_client:libdeepspeech.so native_client:generate_trie 

I switched off Cuda compilation in the config file to overcome some errors. The next error that I am stuck at is this. During the second build statement that I mentioned above, I run into this:

ERROR: G:/pradical/smartscribe/codes_and_scripts/tensorflow/native_client/BUILD:13:1: C++ compilation of rule //native_client:libdeepspeech.so' failed (Exit 2): cl.exe failed: error executing command
cd C:/users/pradical pras/_bazel_pradical pras/kemb47d3/execroot/org_tensorflow
  SET INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt;
    SET LIB=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.15063.0\um\x64;
.
.
.
 /DEIGEN_MAX_ALIGN_BYTES=64 /D__CLANG_SUPPORT_DYN_ANNOTATION__ /DTF_USE_SNAPPY /DKENLM_MAX_ORDER=6 /showIncludes /MD /O2 /DNDEBUG -w -O3 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wno-sign-compare -fvisibility=hidden /Fobazel-out/x64_windows-opt/bin/native_client/_objs/libdeepspeech.so/exception.obj /c native_client/kenlm/util/exception.cc
cl : Command line error D8021 : invalid numeric argument '/Wno-sign-compare'
INFO: Elapsed time: 97.690s, Critical Path: 18.51s
INFO: 2 processes: 2 local.
FAILED: Build did NOT complete successfully

I should add, there are many more files mentioned in the interim here, but I have removed them for the sake of brevity, but if there is a need I can post the entire error.

I did some digging, it seems like this might have something to do with signed/ unsigned integers, which seems to be an issue sometimes with cl.exe. Adding a gcc flag “-Wno-sign-compare” is supposed to solve this issue sometimes (though not highly recommended), but I am not entirely sure where to make this amendment. Am I even on the right track? Please let me know.

Thank you!

I really don’t know what is complicated here: cl explicitely tells you it does not understand the /Wno-sign-compare, which makes sense since it’s a gcc flag. You need to find how to do the same with cl, I can’t help here.