Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo build failing #229

Closed
tmerse opened this issue Dec 18, 2022 · 4 comments · May be fixed by #490
Closed

cargo build failing #229

tmerse opened this issue Dec 18, 2022 · 4 comments · May be fixed by #490

Comments

@tmerse
Copy link

tmerse commented Dec 18, 2022

Disclaimer: not a rust user, so there could be an oversight on my side. But cargo build mostly worked for me in the past.

Running cargo build leads to this error:

warning: cc1: fatal error: vendor/tree-sitter-c/src/parser.c: No such file or directory
warning: compilation terminated.

...

error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "vendor/tree-sitter-c/src" "-o" "<PATH_TO_REPO>/tree-grepper/target/debug/build/tree-grepper-1a9b91f5eb854a89/out/vendor/tree-sitter-c/src/parser.o" "-c" "vendor/tree-sitter-c/src/parser.c" with args "cc" did not execute successfully (status code exit status: 1).
➜  tree-grepper git:(main) cargo --version   
cargo 1.66.0 (d65d197ad 2022-11-15)
➜  tree-grepper git:(main) rustc --version     
rustc 1.66.0 (69f9c33d7 2022-12-12)

I used the most recent version of the git repo (commit: cc93c0330be512860db7e23011093341fb61b2f6 -> "│ Merge pull request #228 from BrianHicks/dependabot/cargo/cc-1.0.78")

@Mephistophiles
Copy link
Contributor

Hi, Are you using the nix package manager? It seems the tree-sitter-repo is not cloned.

@tmerse
Copy link
Author

tmerse commented Dec 18, 2022

Hi, Are you using the nix package manager? It seems the tree-sitter-repo is not cloned.

Not using nix (but want to look into it somewhere in the future when I have enough free-time allotted). I thought only cloning the repo and than cd repo && cargo build would suffice.

If you have a Rust toolchain set up, you can also clone this repo and run cargo build.

@Mephistophiles
Copy link
Contributor

Oh, you have to clone all repos from this file into vendor folder:

https://github.com/BrianHicks/tree-grepper/blob/main/flake.nix

@tmerse
Copy link
Author

tmerse commented Dec 18, 2022

Thanks for clarifying. I think I'll go with nix than :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants