BloopAI/bloop

how to compile the codes on windows platform?

Opened this issue · 0 comments

Environment
os:windows 11
rust verison:stable-x86_64-pc-windows-msvc
visual studio:2022 MSVC 143
windows 11 sdk(10.0.22621.0)

problem
tree-sitter-cobol this model can't compile,this is the error

"error: failed to run custom build command for `tree-sitter-COBOL v0.0.1 (https://github.com/BloopAI/tree-sitter-cobol#8ba6692c)`

Caused by:
  process didn't exit successfully: `d:\soft\bloop\bloop\target\release\build\tree-sitter-COBOL-7ac71b9692c0d062\build-script-build` (exit code: 1)
  --- stderr


  error occurred: Command "D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Z7" "-Brepro" "-I" "src" "-W4" "-Fod:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-COBOL-5bb33bcafbd9c31d\\out\\2e40c9e35e9506f4-scanner.o" "-c" "src\\scanner.c" with args cl.exe did not execute successfully (status code exit code: 2)."

then i change tree-sitter-cobol's github address ,i use "https://github.com/yutaro-sakamoto/tree-sitter-cobol", then compile sucess.
on the way,i had modified other errors, for example

error[E0061]: this method takes 4 arguments but 3 arguments were supplied

but in then end , error is happen again. error is

 error: linking with link.exe failed: exit code: 1120
  |
  = note: "D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\symbols.o" "d:\\soft\\bloop\\bloop\\target\\release\\deps\\bleep.bleep.3293838c4c544328-cgu.05.rcgu.o" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\deps" "/LIBPATH:C:\\Users\\1\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_msvc-0.52.6\\lib" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\blake3-9f2d9b8ad2582fe0\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\blake3-9f2d9b8ad2582fe0\\out" "/LIBPATH:C:\\Users\\1\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\windows_x86_64_msvc-0.48.5\\lib" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\ring-9fd61faec906616d\\out" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\ring-39c2db8ffda659d3\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\libsqlite3-sys-41f52b03f1d1deb1\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\zstd-sys-5b1fbec53922f2aa\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\esaxx-rs-87cf1f6f9a82a7c6\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\onig_sys-1eb6a65d8b65be2b\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-7a45b6d97d482ac5\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-COBOL-6a76655b3727217c\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-c-e3b837d947ab06c8\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-c-sharp-3cb38563d559d854\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-cpp-8aa99f24d0b710fc\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-cpp-8aa99f24d0b710fc\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-go-fb4aa752ed9c7055\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-java-8ab1e21efa9577b3\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-javascript-cadff690b0abb911\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-md-74c1bbd03cdfd507\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-md-74c1bbd03cdfd507\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-md-74c1bbd03cdfd507\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-md-74c1bbd03cdfd507\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-php-5b619e2f3529ae32\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-python-16c8116ab84f7288\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-python-16c8116ab84f7288\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-r-10e35c05925f72a6\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-ruby-7782878ccfaac0df\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-rust-5948f47ad2f48db4\\out" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\atlmfc\\lib\\x64" "/LIBPATH:d:\\soft\\bloop\\bloop\\target\\release\\build\\tree-sitter-typescript-b455406a145dcd1c\\out" "/LIBPATH:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_typescript-86aba49a794a1d14.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_rust-606d1b3b964e4b43.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_ruby-1075a4e4ba66e1d3.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_r-24417f5d9cbe0147.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_python-0fd941b3267d9d5c.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_php-59dc6dc51c0ccde6.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_javascript-bb02dee06be49984.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_java-79762396d737017e.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_go-7d2564f465f4ffee.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_cpp-29d4a8fcf4a2508d.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_COBOL-c12b5027b87d2f82.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_c_sharp-daef53a249cc9c64.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_c-00aafadc5b56a8db.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter_md-192aa77ed943d32d.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libblake3-91017dfee8ef32ce.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libesaxx_rs-9dc6158dd592b583.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libonig_sys-6e25bc8c5c732f04.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libtree_sitter-310667670eb7e1ad.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libzstd_sys-bad7c23136619e87.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\liblibsqlite3_sys-34ae0618969b9b28.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libring-6f657d95af7a8670.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libring-862344b37bd8cf37.rlib" "C:\\Users\\1\\AppData\\Local\\Temp\\rustcw1WxGf\\libstd-d7a86f21fcd377c7.rlib" "C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-1f67c2a5a11a0b2e.rlib" "windows.0.48.5.lib" "windows.0.52.0.lib" "windows.0.48.5.lib" "kernel32.lib" "legacy_stdio_definitions.lib" "bcrypt.lib" "advapi32.lib" "windows.0.52.0.lib" "windows.0.52.0.lib" "windows.0.52.0.lib" "advapi32.lib" "cfgmgr32.lib" "credui.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "secur32.lib" "user32.lib" "winspool.lib" "ws2_32.lib" "kernel32.lib" "kernel32.lib" "advapi32.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "ws2_32.lib" "kernel32.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/LIBPATH:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:d:\\soft\\bloop\\bloop\\target\\release\\deps\\bleep.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\1\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
  = note:   正在创建库 d:\soft\bloop\bloop\target\release\deps\bleep.lib 和对象 d:\soft\bloop\bloop\target\release\deps\bleep.exp
          libtree_sitter_COBOL-c12b5027b87d2f82.rlib(2e40c9e35e9506f4-parser.o) : error LNK2001: 无法解析的外部符号 tree_sitter_COBOL_external_scanner_create
          libtree_sitter_COBOL-c12b5027b87d2f82.rlib(2e40c9e35e9506f4-parser.o) : error LNK2001: 无法解析的外部符号 tree_sitter_COBOL_external_scanner_destroy
          libtree_sitter_COBOL-c12b5027b87d2f82.rlib(2e40c9e35e9506f4-parser.o) : error LNK2001: 无法解析的外部符号 tree_sitter_COBOL_external_scanner_scan
          libtree_sitter_COBOL-c12b5027b87d2f82.rlib(2e40c9e35e9506f4-parser.o) : error LNK2001: 无法解析的外部符号 tree_sitter_COBOL_external_scanner_serialize
          libtree_sitter_COBOL-c12b5027b87d2f82.rlib(2e40c9e35e9506f4-parser.o) : error LNK2001: 无法解析的外部符号 tree_sitter_COBOL_external_scanner_deserialize
          d:\soft\bloop\bloop\target\release\deps\bleep.exe : fatal error LNK1120: 5 个无法解析的外部命令


error: could not compile bleep (bin "bleep") due to 1 previous error