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

The rust-analyzer stops working after installing the xgboost crate. #25

Open
kobinabrandon opened this issue Dec 12, 2024 · 0 comments
Open

Comments

@kobinabrandon
Copy link

I'm a beginner to rust, and I'm building a simple machine learning project in the language.

However, whenever I run "cargo add xgboost", I noticed that all the warnings given by the rust-analyzer disappeared. Also, running "cargo run" results in the following stack trace (apologies if it's quite long):

error: expected one of !, (, ), +, ,, ::, or <, found /
-->../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:9914
|
3 | ...] pub struct __mbstate_t { pub __count : :: std :: os :: raw :: c_int , pub __value : mbstate_t_union(unnamed_at/usr/include/bits/types.
| ----------- while parsing this struct ^ expected one of 7 poss
le tokens

error: expected where or { after union name, found (
--> ../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:10037
|
3 | ... ( Copy , Clone ) ] pub union mbstate_t_union(unnamed_at/usr/include/bits/types/__mbstate_t_h_16_3) { pub __wch : :: std :: os :: raw :.
| ^ expected where or { after union name

error[E0412]: cannot find type __builtin_va_list in this scope
--> .../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:5845
  basic-rust-project  git:(main)  cargo run
Compiling xgboost-sys v0.1.2
error: expected one of !, (, ), +, ,, ::, or <, found /
--> ../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:9914
|
3 | ...] pub struct __mbstate_t { pub __count : :: std :: os :: raw :: c_int , pub __value : mbstate_t_union(unnamed_at/usr/include/bits/types.
| ----------- while parsing this struct ^ expected one of 7 poss
le tokens

error: expected where or { after union name, found (
--> ../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:10037
|
3 | ... ( Copy , Clone ) ] pub union mbstate_t_union(unnamed_at/usr/include/bits/types/__mbstate_t_h_16_3) { pub __wch : :: std :: os :: raw :.
| ^ expected where or { after union name

error[E0412]: cannot find type __builtin_va_list in this scope
--> ../target/debug/build/xgboost-sys-3e655db5b13b610b/out/bindings.rs:3:5845
|
3 | ...X : u32 = 4294967295 ; pub type __gnuc_va_list = __builtin_va_list ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_shor.
| ^^^^^^^^^^^^^^^^^ not found in this scope

For more information about this error, try rustc --explain E0412.
error: could not compile xgboost-sys (lib) due to 3 previous errors
  basic-rust-project  git:(main) 

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

No branches or pull requests

1 participant