ruabmbua / enet-sys Goto Github PK
View Code? Open in Web Editor NEWRaw rust bindings to the enet C library
License: MIT License
Raw rust bindings to the enet C library
License: MIT License
The current version, 0.2.4, which contains the bindgen update from #14, is incompatible with 0.2.3.
Example:
peerCount
in 0.2.3: https://docs.rs/enet-sys/0.2.3/enet_sys/struct._ENetHost.html#structfield.peerCount
peerCount: usize
peerCount
in 0.2.4: https://docs.rs/enet-sys/0.2.4/enet_sys/struct._ENetHost.html#structfield.peerCount
peerCount: size_t // `size_t` resolves to `u64` (or `u32`)
Code that used ENetHost::peerCount
for, e.g., the size/indexing of a vec will now fail, with something like "expected usize
, found u64
". Probably other fields/variables are affected as well, but this is one case that broke for me.
Because this was released as 0.2.4
, and not as 0.3
, this can break code that only runs cargo update
.
Semver.org on this case (link):
What do I do if I accidentally release a backwards incompatible change as a minor version?
As soon as you realize that youβve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If itβs appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.
(Since the major version is still 0, "minor version" here refers to the "patch version" I believe).
So maybe publishing the current state as 0.3, and either yanking 0.2.4 or publishing 0.2.5 with the changes reverted would be a solution? Or maybe adjusting bindgen to use other/the same as before types might also be an option. But not sure, just my initial ideas.
Thanks for the quick reply to #14 btw.!
I've just updated to Fedora 38, and now the build script for enet-sys panics.
I get a really strange output regarding a __atomic_wide_counter_struct_
ident of some sort. This ident also seems to point to a file name.
I've attached the output of the compilation, as well as the header file the ident points to.
Do you have any idea what could be causing this?
PS C:\Users\Admin\Documents\dftest> cargo build
Compiling enet-sys v1.0.4
error: failed to run custom build command for `enet-sys v1.0.4`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `C:\Users\Admin\Documents\dftest\target\debug\build\enet-sys-2af32fe846c91f07\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at C:\Users\Admin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.65.1\ir\context.rs:1994:26:
Non floating-type complex? Type(_Complex _Float16, kind: Complex, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None)), Type(_Float16, kind: Float16, cconv: 100, decl: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None), canon: Cursor( kind: NoDeclFound, loc: builtin definitions, usr: None))
stack backtrace:
0: 0x7ff654b40cda - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\sys_common\backtrace.rs:44
1: 0x7ff654b6414b - core::fmt::rt::Argument::fmt
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\fmt\rt.rs:138
2: 0x7ff654b6414b - core::fmt::write
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\fmt\mod.rs:1094
3: 0x7ff654b3bc31 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\io\mod.rs:1714
4: 0x7ff654b40a5a - std::sys_common::backtrace::_print
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\sys_common\backtrace.rs:47
5: 0x7ff654b40a5a - std::sys_common::backtrace::print
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\sys_common\backtrace.rs:34
6: 0x7ff654b4367a - std::panicking::default_hook::closure$1
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:270
7: 0x7ff654b432e8 - std::panicking::default_hook
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:290
8: 0x7ff654b43d2e - std::panicking::rust_panic_with_hook
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:707
9: 0x7ff654b43c1d - std::panicking::begin_panic_handler::closure$0
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:599
10: 0x7ff654b41999 - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\sys_common\backtrace.rs:170
11: 0x7ff654b43920 - std::panicking::begin_panic_handler
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:595
12: 0x7ff654b6d645 - core::panicking::panic_fmt
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\panicking.rs:67
13: 0x7ff6546df9e7 - bindgen::ir::context::BindgenContext::next_item_id::hd9de428854eeb2f1
14: 0x7ff6546dedf5 - bindgen::ir::context::BindgenContext::builtin_or_resolved_ty::h04370afef562dd6c
15: 0x7ff654788077 - bindgen::ir::item::Item::from_ty_or_ref_with_id::h57fefd4f047a4916
16: 0x7ff654787df8 - bindgen::ir::item::Item::from_ty_or_ref::h175189cf9e6631d1
17: 0x7ff65477e1af - bindgen::ir::function::args_from_ty_and_cursor::{{closure}}::h763ef080e57d876a
18: 0x7ff65476d9e7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once::h35eacd8910bc93cf
19: 0x7ff65470cec6 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next::hbf010e6b40ada2e5
20: 0x7ff6547ad197 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::h2eb634c7d9f24546
21: 0x7ff6547c0cc1 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h5b2a018e43505ed1
22: 0x7ff6547bfe1a - <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter::h83e2cd8e5d73aec3
23: 0x7ff654712181 - core::iter::traits::iterator::Iterator::collect::h4c98d41d0853e3d3
24: 0x7ff65477de4b - bindgen::ir::function::cursor_mangling::h5445470789da9a01
25: 0x7ff65477e795 - bindgen::ir::function::FunctionSig::from_ty::h6975a5c75727d4e0
26: 0x7ff65470092f - bindgen::ir::ty::Type::from_clang_ty::he13c210bd5ba49b6
27: 0x7ff6547895ea - bindgen::ir::item::Item::from_ty::hb453bc6e2d84d51f
28: 0x7ff654788953 - bindgen::ir::item::Item::from_ty::hb453bc6e2d84d51f
29: 0x7ff654787347 - bindgen::ir::item::Item::parse::h569f79d2f5eed971
30: 0x7ff6546b32c9 - bindgen::parse_one::h284fa1ab09c63b0c
31: 0x7ff6546b388a - bindgen::parse::{{closure}}::{{closure}}::h78a8d3b6b51a527f
32: 0x7ff65467861e - bindgen::clang::is_valid_identifier::{{closure}}::h38ed9e3d245d5418
33: 0x7ffc772ebc8e - <unknown>
34: 0x7ffc772ea1b6 - <unknown>
35: 0x7ffc772e70f4 - <unknown>
36: 0x7ffc772e67ec - <unknown>
37: 0x7ffc77308abb - clang_visitChildren
38: 0x7ff654971bed - clang_sys::clang_visitChildren::h5794846b67ac0190
39: 0x7ff654675eb9 - bindgen::clang::Cursor::visit::hb91495c9312e74fd
40: 0x7ff6546b3837 - bindgen::parse::{{closure}}::hc7984285e3fc1fcf
41: 0x7ff6546e14d0 - bindgen::ir::context::BindgenContext::with_module::hd9c740a4a0ebfca6
42: 0x7ff6546b35a1 - bindgen::parse_one::{{closure}}::h10dfc05fbca7f3e2
43: 0x7ff6546b06dc - bindgen::<impl bindgen::options::BindgenOptions>::process_comment::{{closure}}::hf96a8c739f753b77
44: 0x7ff6546adebf - bindgen::Builder::generate::hfa833464a875736d
45: 0x7ff6545e43b4 - std::rt::lang_start::h59a2f7e494df77dd
46: 0x7ff6545e19e6 - std::rt::lang_start::h59a2f7e494df77dd
47: 0x7ff6545e1009 - __ImageBase
48: 0x7ff6545e169c - std::rt::lang_start::h59a2f7e494df77dd
49: 0x7ff654b36418 - std::rt::lang_start_internal::closure$2
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\rt.rs:148
50: 0x7ff654b36418 - std::panicking::try::do_call
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:502
51: 0x7ff654b36418 - std::panicking::try
at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:466
52: 0x7ff654b36418 - std::panic::catch_unwind
ary\std\src\rt.rs:148
54: 0x7ff6545e1677 - std::rt::lang_start::h59a2f7e494df77dd
55: 0x7ff6545e4829 - main
56: 0x7ff654b6ade0 - invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
57: 0x7ff654b6ade0 - __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
58: 0x7ffcbdec26ad - BaseThreadInitThunk
59: 0x7ffcbe5ea9f8 - RtlUserThreadStart
My cargo.toml
:
[package]
name = "dftest"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
enet-sys = "1.0.4"
I'm using the MSVC toolchain. Thanks
Hi,
Tried to compile with rustc 1.26.0
and clang version 6.0.0
.
I.. Wont paste the error here, since it's 22 megabytes: https://www.tzaeru.com/p/output.txt
I've absolutely no idea how to approach fixing this! π
cargo audit
finds two security vulnerabilities:
Scanning Cargo.lock for vulnerabilities (45 crate dependencies)
Crate: regex
Version: 0.2.11
Title: Regexes with large repetitions on empty sub-expressions take a very long time to parse
Date: 2022-03-08
ID: RUSTSEC-2022-0013
URL: https://rustsec.org/advisories/RUSTSEC-2022-0013
Solution: Upgrade to >=1.5.5
Dependency tree:
regex 0.2.11
Crate: thread_local
Version: 0.3.6
Title: Data race in `Iter` and `IterMut`
Date: 2022-01-23
ID: RUSTSEC-2022-0006
URL: https://rustsec.org/advisories/RUSTSEC-2022-0006
Solution: Upgrade to >=1.1.4
Dependency tree:
thread_local 0.3.6
βββ regex 0.2.11
error: 2 vulnerabilities found!
See futile/enet-rs#15 and futile/enet-rs#16 for further info on these issues.
Checking how enet-sys depends on these using cargo tree
shows the following:
enet-sys v0.2.3 (/some/local/path/enet-sys)
[build-dependencies]
βββ bindgen v0.35.0
β βββ cexpr v0.2.3
β β βββ nom v3.2.1
β β βββ memchr v1.0.2
β β βββ libc v0.2.121
β βββ cfg-if v0.1.10
β βββ clang-sys v0.22.0
β β βββ glob v0.2.11
β β βββ libc v0.2.121
β β βββ libloading v0.5.2
β β [build-dependencies]
β β βββ cc v1.0.73
β β [build-dependencies]
β β βββ glob v0.2.11
β βββ clap v2.34.0
β β βββ ansi_term v0.12.1
β β βββ atty v0.2.14
β β β βββ libc v0.2.121
β β βββ bitflags v1.3.2
β β βββ strsim v0.8.0
β β βββ textwrap v0.11.0
β β β βββ unicode-width v0.1.9
β β βββ unicode-width v0.1.9
β β βββ vec_map v0.8.2
β βββ env_logger v0.5.13
β β βββ atty v0.2.14 (*)
β β βββ humantime v1.3.0
β β β βββ quick-error v1.2.3
β β βββ log v0.4.16
β β β βββ cfg-if v1.0.0
β β βββ regex v1.5.5
β β β βββ aho-corasick v0.7.18
β β β β βββ memchr v2.4.1
β β β βββ memchr v2.4.1
β β β βββ regex-syntax v0.6.25
β β βββ termcolor v1.1.3
β βββ lazy_static v1.4.0
β βββ log v0.4.16 (*)
β βββ peeking_take_while v0.1.2
β βββ quote v0.3.15
β βββ regex v0.2.11
β β βββ aho-corasick v0.6.10
β β β βββ memchr v2.4.1
β β βββ memchr v2.4.1
β β βββ regex-syntax v0.5.6
β β β βββ ucd-util v0.1.8
β β βββ thread_local v0.3.6
β β β βββ lazy_static v1.4.0
β β βββ utf8-ranges v1.0.4
β βββ which v1.0.5
β βββ libc v0.2.121
βββ cmake v0.1.48
βββ cc v1.0.73
So both of these are due to bindgen, which is at version 0.35.0 in Cargo.toml. Current bindgen version (at the time of writing) is 0.59.2, so quite some new versions exist.
I tried upgrading bindgen, but that leads to doc tests failing as indented comments in enet's source code are now interpreted (and run) as rust code, see rust-lang/rust-bindgen#1313. Also, newer bindgen versions use u128
in signatures, which causes warnings from rustc because u128
is not FFI-safe (known, but very annoying).
Here is a full log of cargo build
and cargo test
with bindgen at 0.59.2: link to a gist, because too long for inline display (>2.5k lines).
As bindgen is only used as a build dependency, these vulnerabilities might not be too bad, but I guess it'd be nice to fix them anyway.
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: NotPresent', C:\Users\simon.cargo\registry\src\index.crates.io-6f17d22bba15001f\enet-sys-0.2.3\build.rs:9:37
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\panicking.rs:593
1: core::panicking::panic_fmt
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\core\src\panicking.rs:67
2: core::result::unwrap_failed
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\core\src\result.rs:1651
3: core::result::Result<T,E>::unwrap
4: std::rt::lang_start
5: std::rt::lang_start
6: __ImageBase
7: std::rt::lang_start
8: std::rt::lang_start_internal::closure$2
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\rt.rs:148
9: std::panicking::try::do_call
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\panicking.rs:500
10: std::panicking::try
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\panicking.rs:464
11: std::panic::catch_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\panic.rs:142
12: std::rt::lang_start_internal
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library\std\src\rt.rs:148
13: std::rt::lang_start
14: main
15: invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
16: __scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
17: BaseThreadInitThunk
18: RtlUserThreadStart
and stuck on
cargo build
Compiling enet-sys v0.2.3
^C Building [========================> ] 82/86: enet-sys(build)
C:\Users\simon\Desktop\C++\gt\GrowRust>cargo build --verbose
Fresh cfg-if v1.0.0
Fresh cc v1.0.72
Fresh glob v0.2.11
Fresh winapi v0.3.9
Fresh memchr v2.4.1
Fresh libc v0.2.117
Fresh winapi-util v0.1.5
Fresh aho-corasick v0.7.18
Fresh memchr v1.0.2
Fresh atty v0.2.14
Fresh unicode-xid v0.2.2
Fresh quick-error v1.2.3
Fresh regex-syntax v0.6.25
Fresh lazy_static v1.4.0
Fresh ucd-util v0.1.8
Fresh unicode-width v0.1.9
Fresh regex v1.5.4
Fresh thread_local v0.3.6
Fresh regex-syntax v0.5.6
Fresh textwrap v0.11.0
Fresh humantime v1.3.0
Fresh proc-macro2 v1.0.36
Fresh nom v3.2.1
Fresh log v0.4.14
Fresh libloading v0.5.2
Fresh termcolor v1.1.2
Fresh aho-corasick v0.6.10
Fresh utf8-ranges v1.0.4
Fresh bitflags v1.3.2
Fresh strsim v0.8.0
Fresh vec_map v0.8.2
Fresh regex v0.2.11
Fresh clap v2.34.0
Fresh quote v1.0.15
Fresh env_logger v0.5.13
Fresh cexpr v0.2.3
Fresh clang-sys v0.22.0
Fresh which v1.0.5
Fresh quote v0.3.15
Fresh peeking_take_while v0.1.2
Fresh cfg-if v0.1.10
Fresh syn v1.0.86
Fresh getrandom v0.2.4
Fresh cmake v0.1.48
Fresh bindgen v0.35.0
Fresh serde_derive v1.0.136
Fresh rand_core v0.6.3
Fresh ppv-lite86 v0.2.16
Fresh rand_chacha v0.3.1
Fresh serde v1.0.136
Fresh itoa v1.0.1
Fresh ryu v1.0.9
Compiling enet-sys v0.2.3
Fresh serde_json v1.0.79
Fresh rand v0.8.4
Fresh byteorder v1.4.3
Running C:\Users\simon\Desktop\C++\gt\GrowRust\target\debug\build\enet-sys-244e8c9665792020\build-script-build
Building [========================> ] 82/86: enet-sys(build)
Please #[derive(Copy, Clone, PartialEq, Eq)]
on ENetEventType
.
After the bindgen update, this doesnt build well with the latest Rust 1.6 toolchain (stable) on Windows:
cmake --version cmake version 3.23.1
rustc --version rustc 1.60.0 (7737e0b5c 2022-04-04)
Windows SDK: 10.0.22000.0
latest
C:\source\enet-sys-mvk> cargo build Compiling enet-sys v1.0.0 (C:\source\enet-sys-mvk) error[E0588]: packed type cannot transitively contain a
#[repr(align)]type --> C:\source\enet-sys-mvk\target\debug\build\enet-sys-476a2ef1944315e3\out/bindings.rs:59928:1 | 59928 | / pub struct _IMAGE_TLS_DIRECTORY64 { 59929 | | pub StartAddressOfRawData: ULONGLONG, 59930 | | pub EndAddressOfRawData: ULONGLONG, 59931 | | pub AddressOfIndex: ULONGLONG, ... | 59934 | | pub __bindgen_anon_1: _IMAGE_TLS_DIRECTORY64__bindgen_ty_1, 59935 | | } | |_^ | note:
_IMAGE_TLS_DIRECTORY64__bindgen_ty_1__bindgen_ty_1has a
#[repr(align)]attribute --> C:\source\enet-sys-mvk\target\debug\build\enet-sys-476a2ef1944315e3\out/bindings.rs:59945:1 | 59945 | / pub struct _IMAGE_TLS_DIRECTORY64__bindgen_ty_1__bindgen_ty_1 { 59946 | | pub _bitfield_align_1: [u32; 0], 59947 | | pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 59948 | | } | |_^ note:
_IMAGE_TLS_DIRECTORY64contains a field of type
_IMAGE_TLS_DIRECTORY64__bindgen_ty_1--> C:\source\enet-sys-mvk\target\debug\build\enet-sys-476a2ef1944315e3\out/bindings.rs:59934:9 | 59934 | pub __bindgen_anon_1: _IMAGE_TLS_DIRECTORY64__bindgen_ty_1, | ^^^^^^^^^^^^^^^^ note: ...which contains a field of type
_IMAGE_TLS_DIRECTORY64__bindgen_ty_1__bindgen_ty_1`
--> C:\source\enet-sys-mvk\target\debug\build\enet-sys-476a2ef1944315e3\out/bindings.rs:59940:9
|
59940 | pub __bindgen_anon_1: _IMAGE_TLS_DIRECTORY64__bindgen_ty_1__bindgen_ty_1,
| ^^^^^^^^^^^^^^^^
For more information about this error, try rustc --explain E0588
.
error: could not compile enet-sys
due to previous error`
Adding the following to build.rs solves this though:
.blocklist_type("_?P?IMAGE_TLS_DIRECTORY.*")
Please add links = "enet"
to Cargo.toml, to only link to enet once, if two deps depend on enet-sys.
And without links = "enet"
it doesn't build, at least with rustc-msvc I get this error:
error: could not find native static library `enet`, perhaps an -L flag is missing?
error: aborting due to previous error
error: Could not compile `enet-sys`.
But with links = "enet"
, everything works with rustc-msvc.
D:\Program Files\Microsoft Visual Studio 14.0>cd D:\3rdparty\enet-sys
D:\3rdparty\enet-sys>cargo b
Compiling enet-sys v0.2.0 (file:///D:/3rdparty/enet-sys)
error[E0277]: `_IMAGE_LINENUMBER__bindgen_ty_1` doesn't implement `std::fmt::Deb
ug`
--> D:\3rdparty\enet-sys\target\debug\build\enet-sys-d7eedfea4cae5078\out/b
indings.rs:49220:5
|
49220 | pub Type: _IMAGE_LINENUMBER__bindgen_ty_1,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `_IMAGE_LINENUMBER__bindge
n_ty_1` cannot be formatted using `{:?}`
|
= help: the trait `std::fmt::Debug` is not implemented for `_IMAGE_LINENUM
BER__bindgen_ty_1`
= note: add `#[derive(Debug)]` or manually implement `std::fmt::Debug`
= note: required because of the requirements on the impl of `std::fmt::Deb
ug` for `&_IMAGE_LINENUMBER__bindgen_ty_1`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error[E0277]: `[u8; 40]` doesn't implement `std::fmt::Debug`
--> D:\3rdparty\enet-sys\target\debug\build\enet-sys-d7eedfea4cae5078\out/
bindings.rs:109601:5
|
109601 | pub __bindgen_padding_0: [u8; 40usize],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[u8; 40]` cannot be formatt
ed using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `[u8; 40]`
= note: required because of the requirements on the impl of `std::fmt::De
bug` for `&[u8; 40]`
= note: required for the cast to the object type `dyn std::fmt::Debug`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `enet-sys`.
To learn more, run the command again with --verbose.
D:\3rdparty\enet-sys>rustc --version
rustc 1.30.0-nightly (02cb8f2a4 2018-08-29)
Please help solve the problem, try different versions of c++
C:/Users/Alex/.cargo/bin/cargo.exe build --color=always --message-format=json-diagnostic-rendered-ansi --package c_mock --bin c_mock Compiling enet-sys v1.0.1 error: failed to run custom build command for
enet-sys v1.0.1Caused by: process didn't exit successfully:
C:\Users\Alex\Desktop\CMock\target\debug\build\enet-sys-2c37d8d63c9d601a\build-script-build(exit code: 101) --- stderr D:/msys64/mingw64/include\stdlib.h:388:47: error: expected ';' after top level declarator D:/msys64/mingw64/include\stdlib.h:389:48: error: expected ';' after top level declarator D:/msys64/mingw64/include\stdlib.h:396:26: error: expected ';' after top level declarator D:/msys64/mingw64/include\stdlib.h:681:69: error: expected ';' after top level declarator D:/msys64/mingw64/include\stdlib.h:683:48: error: expected ';' after top level declarator D:/msys64/mingw64/include\stdlib.h:684:55: error: expected ';' after top level declarator D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:71:40: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:133:43: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:163:43: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:193:43: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:220:44: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:243:44: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:264:44: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:291:44: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:314:44: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:335:44: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:356:40: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:377:40: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values) D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:398:40: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) fatal error: too many errors emitted, stopping now [-ferror-limit=] D:/msys64/mingw64/include\stdlib.h:388:47: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/include\stdlib.h:389:48: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/include\stdlib.h:396:26: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/include\stdlib.h:681:69: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/include\stdlib.h:683:48: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/include\stdlib.h:684:55: error: expected ';' after top level declarator, err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:71:40: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:133:43: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:163:43: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:193:43: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:220:44: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:243:44: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:264:44: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:291:44: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:314:44: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:335:44: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:356:40: error: passing '__v8qi' (aka 'char') to parameter of incompatible type '__attribute__((__vector_size__(8 * sizeof(char)))) char' (vector of 8 'char' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:377:40: error: passing '__v4hi' (aka 'short') to parameter of incompatible type '__attribute__((__vector_size__(4 * sizeof(short)))) short' (vector of 4 'short' values), err: true D:/msys64/mingw64/lib/clang/14.0.0/include\mmintrin.h:398:40: error: passing '__v2si' (aka 'int') to parameter of incompatible type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values), err: true fatal error: too many errors emitted, stopping now [-ferror-limit=], err: true thread 'main' panicked at 'Unable to generate bindings: ()', C:\Users\Alex\.cargo\registry\src\github.com-1ecc6299db9ec823\enet-sys-1.0.1\build.rs:19:10 stack backtrace: 0: rust_begin_unwind at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\std\src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src/panicking.rs:143:14 2: core::result::unwrap_failed at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src/result.rs:1749:5 3: core::result::Result<T,E>::expect at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\library\core\src/result.rs:1022:23 4: build_script_build::main at .\build.rs:11:20 5: core::ops::function::FnOnce::call_once at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\library\core\src\ops/function.rs:227:5 note: Some details are omitted, run with
RUST_BACKTRACE=fullfor a verbose backtrace. Process finished with exit code 101
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.