-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error Building #21
Comments
Please use an up-to-date version of the enet-sys library. The current version is 1.0.3 |
error: failed to run custom build command for Caused by: --- stderr build script failed, must exit now', C:\Users\simon.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.50\src\lib.rs:1098:5 i have MinGW |
Ah, I suspect this is a problem with unpredictable cmake output folder location. I will look into fixing this, but it might require a patch in the upstream enet libraries build system itself. |
Out of interest, can you try building with MSVC? If it works for you the problem is probably isolated to windows mingw. |
FYI I posted to an existing thread on the repo of the upstream C library: lsalzman/enet#174 (comment) |
error: could not find native static library where can i find enet and build the library |
what i meant is how do i link it |
You do not need to build the library, the build.rs script should take care of it. Unfortunately its currently not working on some windows systems with maybe particular cmake versions. I will wait for lsalzman/enet#174 (comment) to respond, if not I will probably fork the library and make some kind of quick fix. If you want to build the library yourself, it can be found here: https://github.com/lsalzman/enet. You will also have to change the build.rs file in enet-sys, to not use cmake, and replace the |
i build the library, i have enet.lib but how do i link against it when building |
As already said, you need to modify the As a reference: https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-search |
i dont have a build.rs file.... |
this is my cargo.toml
|
I have a hotfix, but I can`t test it right now, have no windows device with me. You can try it by instead of adding enet-sys = "VERSION" to your Cargo.toml, |
= note: some error: could not compile |
I know this one! I pushed another fix. You might need to cargo update before cargo build |
By the way, judging by your Cargo.toml dependencies: it looks like none of your dependencies should have issues with the msvc target. I recommend you use the msvc windows target instead of mingw. In the past when I still used windows more, I always had trouble with mingw, because its support with rust libraries is pretty bad. If windows is supported by a library, it will most likely work with msvc, since its the default windows target for rust. |
the hotfix worked, thank you for taking your time to look into this issue and help me out |
Sure no problem! I will probably make some kind of proper fix + a release on crates.io, once I get some kind of response from the C library maintainers. |
@voidnullptr I think I managed to create a proper fix with #22 . |
thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: NotPresent', C:\Users\simon.cargo\registry\src\index.crates.io-6f17d22bba15001f\enet-sys-0.2.3\build.rs:9:37stack 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)
The text was updated successfully, but these errors were encountered: