sinkingsugar/nimtorch

Cannot compile nimtorch tests on Windows 10

eshitasagar opened this issue · 2 comments

C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib\ATen_cpu.lib
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib\cpuinfo.lib
collect2.exe: error: ld returned 1 exit status
Error: execution of an external program failed: 'g++.exe   -o C:\Users\vsagar200\work\soft\nimtorch\tests\test_xor.exe  C:\Users\vsagar200\nimcache\test_xor_d\torch_test_xor.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_system.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_torch.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\fragments_cpp.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_macros.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_tables.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_hashes.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_math.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_strutils.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_parseutils.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_bitops.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_algorithm.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_unicode.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_ospaths.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_winlean.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_dynlib.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_torch_cpp.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_os.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_times.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_options.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_typetraits.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_strformat.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_tensors.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_sequtils.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\stdlib_sets.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_tensor_ops.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_autograd_macro.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_autograd_backward.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_nn.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_init.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_python_helpers.cpp.o C:\Users\vsagar200\nimcache\test_xor_d\torch_optim.cpp.o  -LC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib -LC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib64 -lC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib\ATen_cpu.lib -lC:\Users\vsagar200\work\bin\nim-0.19.0_x64\ATen-windows10-cpu\lib\cpuinfo.lib '

Although the ATEN path is correctly set.
Tried on nim 0.18.1 and 0.19.0
the .lib files present at the same location the error is saying it cannot find.

There are multiple issues here sadly. Because windows is kinda a black sheep in terms of linker.

First of all are you using our distribution of ATen binaries?

If so anyway you need to add --cc:vcc to actually use visual studio compiler.

We added windows conda builds today!