Coder Social home page Coder Social logo

Comments (5)

salsifis avatar salsifis commented on June 12, 2024

You can use cargo +nightly install --locked difftastic in order to use the exact specific versions of dependencies.

from difftastic.

CY-Pan avatar CY-Pan commented on June 12, 2024

I met the same issue. cargo install difftastic failes with the following error:

note:    Creating library C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.lib and object C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.exp
          tree-sitter-perl.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_perl_external_scanner_create
          tree-sitter-perl.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_perl_external_scanner_destroy
          tree-sitter-perl.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_perl_external_scanner_scan
          tree-sitter-perl.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_perl_external_scanner_serialize
          tree-sitter-perl.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_perl_external_scanner_deserialize
          C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.exe : fatal error LNK1120: 5 unresolved externals

The symbols pointed out in error message are different on multiple builds after cargo clean. But they typically are tree_sitter_XXX. I've met messages like:

note:    Creating library C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.lib and object C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.exp
          difft-b8e99ba7cab4de71.difft.c0dcad56909ceb21-cgu.10.rcgu.o : error LNK2019: unresolved external symbol tree_sitter_bash referenced in function _ZN5difft5parse18tree_sitter_parser13from_language17h55a89fc3cac76701E
          C:\My\Rust\targets\release\deps\difft-b8e99ba7cab4de71.exe : fatal error LNK1120: 1 unresolved externals

I also tried cargo install --locked difftastic and got:

  = note:    Creating library C:\My\Rust\targets\release\deps\difft-e08fee778c13d13d.lib and object C:\My\Rust\targets\release\deps\difft-e08fee778c13d13d.exp
          difft-e08fee778c13d13d.difft.c513c0a83ef1cc2b-cgu.07.rcgu.o : error LNK2019: unresolved external symbol tree_sitter_ruby referenced in function _ZN5difft5parse18tree_sitter_parser13from_language17hefffdd356ce77bd7E
          difft-e08fee778c13d13d.difft.c513c0a83ef1cc2b-cgu.07.rcgu.o : error LNK2019: unresolved external symbol tree_sitter_java referenced in function _ZN5difft5parse18tree_sitter_parser13from_language17hefffdd356ce77bd7E
          C:\My\Rust\targets\release\deps\difft-e08fee778c13d13d.exe : fatal error LNK1120: 2 unresolved externals

My rustup version is:

rustup 1.26.0 (5af9b9484 2023-04-05)
stable-x86_64-pc-windows-msvc
rustc 1.75.0 (82e1608df 2023-12-21)

My MSVC version is Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33134 for x64.

from difftastic.

Wilfred avatar Wilfred commented on June 12, 2024

I'm not sure what the issue is here. You could use the prebuilt Windows binaries if you just want to use difftastic, but I'd expect this to work. The Windows CI is green, so I'm not sure how the GitHub environment differs from your environment.

GitHub CI is using rust 1.63 and based on https://github.com/actions/runner-images#available-images I think the C++ compiler is gcc rather than MSVC.

from difftastic.

klensy avatar klensy commented on June 12, 2024

Well, git config core.symlinks true in repo allows to build difft in windows.

Oh, it's about cargo install, not build. But anyway.

from difftastic.

axbannaz avatar axbannaz commented on June 12, 2024

not sure if it is tied to windows versions.. I have the same versions of the tools installed on all three windows 11 machines, two 23H2 and one 22H2. this issue is on windows 11 22H2.
VS 2022 v17.9.6 Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64

from difftastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.