difftastic icon indicating copy to clipboard operation
difftastic copied to clipboard

Compilation Error on 3b049c2fd "cargo update"

Open egrieco opened this issue 1 year ago • 1 comments

After commit 3b049c2fd "cargo update" I'm seeing the following compilation error:

  cargo:warning=clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  cargo:warning=vendored_parsers/tree-sitter-lua-src/scanner.cc:2:10: fatal error: 'cwctype' file not found
  cargo:warning=#include <cwctype>
  cargo:warning=         ^~~~~~~~~
  cargo:warning=1 error generated.

  --- stderr


  error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=10.7" "-std=c++14" "-I" "vendored_parsers/tree-sitter-lua-src" "-Wall" "-Wextra" "-o" "~/Repos/difftastic/target/debug/build/difftastic-a3b1e54c05e0af46/out/07332a6062849104-scanner.o" "-c" "vendored_parsers/tree-sitter-lua-src/scanner.cc" with args "c++" did not execute successfully (status code exit status: 1).

This the previous commit b3732b9eb compiles successfully.

Note: The error message above has been mildly edited. /Users/<MY_USER> was replaced with a tilde "~".

egrieco avatar Mar 29 '24 05:03 egrieco

Hmm, so the commit updated the cc crate, but I'm surprised it broke the build for you.

What platform are you on, with which compilers? This header is part of the stdlib apparently: https://en.cppreference.com/w/cpp/header/cwctype

FWIW most tree-sitter parsers are trying to move to be pure C, which might help too. The most actively maintained Lua parser seems to have no C++ at least: https://github.com/tjdevries/tree-sitter-lua

Wilfred avatar Apr 01 '24 15:04 Wilfred

I've updated the Lua parser and cc crate, and CI is still green. Feel free to reopen if you're still seeing issues.

Wilfred avatar Jul 20 '24 23:07 Wilfred