This repository was archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
This repository was archived by the owner on Aug 8, 2024. It is now read-only.
"enum_(unnamed_at_/usr/include/linux/loop_h_16_1)" is not a valid Ident #7
Copy link
Copy link
Closed
Description
Hi,
Reproduced rust-bindgen issue: rust-lang/rust-bindgen#2312
Compiling loopdev v0.4.0
Compiling enumset_derive v0.6.1
Compiling libparted-sys v0.3.1
Compiling num-iter v0.1.43
Compiling typenum v1.16.0
error: failed to run custom build command for `loopdev v0.4.0`
Caused by:
process didn't exit successfully: `/mnt/repo/AOSC-Dev/aoscdk-rs/target/debug/build/loopdev-334d105e9633682c/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_16_1)" is not a valid Ident', /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/fallback.rs:811:9
stack backtrace:
0: 0x5555589d78e0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h36a7aec67b0db3ef
1: 0x5555589fc4f4 - core::fmt::write::h7d78873c9f7a736d
2: 0x5555589c72b0 - std::io::Write::write_fmt::h3653f72623b2c5b1
3: 0x5555589d7720 - std::sys_common::backtrace::print::h4ba366dab4d8d880
4: 0x5555589ca00c - std::panicking::default_hook::{{closure}}::h0fa66bbe12df1171
5: 0x5555589c9e1c - std::panicking::default_hook::h997043e2b640b851
6: 0x5555589ca508 - std::panicking::rust_panic_with_hook::h8492e5d1cb5e4152
7: 0x5555589d7bfc - std::panicking::begin_panic_handler::{{closure}}::hc3d9ead452698424
8: 0x5555589d7b20 - std::sys_common::backtrace::__rust_end_short_backtrace::h45c79ef3fdbb2db0
9: 0x5555589ca164 - rust_begin_unwind
10: 0x5555585e8590 - core::panicking::panic_fmt::h5171e01556971d91
11: 0x5555589a1a40 - proc_macro2::fallback::validate_ident::h0601b9ba85e86d80
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/fallback.rs:811:9
12: 0x5555589a183c - proc_macro2::fallback::Ident::_new::h5c5a3dd6d5d1333a
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/fallback.rs:753:9
13: 0x5555589a1894 - proc_macro2::fallback::Ident::new::hb478cdf21b2a2164
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/fallback.rs:763:9
14: 0x5555589a3b50 - proc_macro2::imp::Ident::new::hf85e65ac44bfeba0
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/wrapper.rs:701:50
15: 0x55555899e1f8 - proc_macro2::Ident::new::haa727b5dacb72a99
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.56/src/lib.rs:972:21
16: 0x555558703c0c - bindgen::ir::context::BindgenContext::rust_ident_raw::h7fe653644ad08f40
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/ir/context.rs:878:9
17: 0x55555870394c - bindgen::ir::context::BindgenContext::rust_ident::h54f0931149f1595a
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/ir/context.rs:870:9
18: 0x55555863f778 - <bindgen::ir::enum_ty::Enum as bindgen::codegen::CodeGenerator>::codegen::hfbc6992d49936a93
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:2907:21
19: 0x55555869e614 - <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen::h5894f41bfffe3c9a
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:1004:39
20: 0x55555867475c - <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen::he58367f13a6d1306
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:492:17
21: 0x5555586bef10 - <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}::h6b8d0b9c5c08232d
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:515:21
22: 0x5555586748e4 - <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::h4fd846797a789e6c
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:545:13
23: 0x555558674740 - <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen::he58367f13a6d1306
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:483:17
24: 0x5555586c6734 - bindgen::codegen::codegen::{{closure}}::h138681c6119125a8
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:4287:9
25: 0x5555587058e8 - bindgen::ir::context::BindgenContext::gen::h1d55eee5c268c43c
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/ir/context.rs:1190:19
26: 0x5555586c60c8 - bindgen::codegen::codegen::hf049004d6b1de9ff
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/codegen/mod.rs:4251:5
27: 0x5555586ca8c8 - bindgen::Bindings::generate::h404ebfe61246e21d
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/lib.rs:2374:32
28: 0x5555586c829c - bindgen::Builder::generate::h5aaaf4b9918c10df
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/lib.rs:1478:9
29: 0x5555585ea1f8 - build_script_build::main::h79ef15ec79813006
at /home/loongson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/loopdev-0.4.0/build.rs:7:20
30: 0x5555585e8e84 - core::ops::function::FnOnce::call_once::h9ff9070868288659
at /mnt/repo/loongarch-rs/rust/library/core/src/ops/function.rs:250:5
31: 0x5555585e9990 - std::sys_common::backtrace::__rust_begin_short_backtrace::h88f0965c716e200a
at /mnt/repo/loongarch-rs/rust/library/std/src/sys_common/backtrace.rs:134:18
32: 0x5555585e90a4 - std::rt::lang_start::{{closure}}::h2df3e43a012c05db
at /mnt/repo/loongarch-rs/rust/library/std/src/rt.rs:166:18
33: 0x5555589d4e1c - std::panicking::try::do_call::hba1e5d0eda70a380
34: 0x5555589d4f08 - __rust_try
35: 0x5555589d4e68 - std::panicking::try::do_call::hbe1d7d7c58560c8f
36: 0x5555589d4f08 - __rust_try
37: 0x5555589d4d64 - std::panicking::try::h974a23446c059bb7
38: 0x5555589c6770 - std::rt::lang_start_internal::hefe79b88b52e0197
39: 0x5555585e9078 - std::rt::lang_start::h90fdfc890dc45f39
at /mnt/repo/loongarch-rs/rust/library/std/src/rt.rs:165:17
40: 0x5555585ea3c8 - main
41: 0x7ffff11e575c - <unknown>
42: 0x7ffff11e5848 - __libc_start_main
43: 0x5555585e8d30 - _start
44: 0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
Fixed by: rust-lang/rust-bindgen#2319 And I backported the patch to bindgen-0.58.1 and bindgen-0.59.2, cargo build passed!
Could you give me some suggestion please?
Thanks,
Leslie Zhai
Metadata
Metadata
Assignees
Labels
No labels