-
-
Notifications
You must be signed in to change notification settings - Fork 2
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 fail with cargo installed by yum #24
Comments
Hmm, I'm not sure what is happening... I run CI on Rust 1.45.2 in #25 and it compiles successfully. Also it compiles successfully on my laptop. |
This error occurs only when Lines 6 to 9 in edb58a4
Lines 23 to 25 in edb58a4
So, this error may actually mean that |
@APIPLM
If you can't solve it, it might be useful for debugging if you can provide the following information:
|
@taiki-e Thanks for your help. you are right. It is about Rustc and Cargo version and it works for version 1.46.0.In my side, I have backup VM machine, which has the almost same version of CentOS( the original one having patch 3.10.0-1127.19.1 , the backup 3.10.0-1127.13.1) and GCC same version which is (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) . In the backup machine, I reference to like install rust on archlinux( https://wiki.archlinux.org/index.php/Rust). In the original one. I just installed all packages by yum (like yum install Rust-x86-64, Rust-src, rust-std-static and so on). Then on the original one, the rustc version is 1.45.2 and cargo version is 1.45.1, and on the backup one, the rustc version is 1.46.0 and the cargo version is 1.46.0. I was wondering why there are people put the old version in the repo for Centos. But the point is how yum and rpm work like what cargo of rust have for package manager. If something is incorrect from my side. Point out, please. Thanks in advance. |
@taiki-e As go further to build time-main(version "0.2.16" https://github.com/time-rs/time). The below error come out. Seem like related to const_fn error: error: error: error: error: aborting due to 5 previous errors error: could not compile |
I think it's likely that the rustc or cargo provided by the vendor is a little broken. |
@APIPLM That's an error on my end, and is a failure that isn't the fault of this crate. I believe I already pushed up a newer commit that fixed it, but if not it's in my laptop. |
@taiki-e you are right. in backup one after rustup update 1.45.2 and set to it as an active channel. In the original machine, uninstalled rust installed by yum and install rust 1.45.2 by rustup. then there is no issue as compiling the const_fn-master. of course removed cache version_check-0.9.2.crate and version_check-0.9.2.rs. I was wondering what happened as rustup install rust 1.45.2 and yum install rust.x86_64. I think that we can close this issue. |
@jhpratt Thanks, as I said that that issue might related to this crate when seeing the message like "error: core::num::::checked_add is not yet stable as a const fn". As running cargo build on rustc 1.45.2 and cargo 1.45.1, it work fine for time 0.2.16. But running cargo build on rustc 1.46.0 and cargo 1.46.0 (stable version) for times 0.2.16 and there is the issue as I posted in the above. And also in the code level, I can see you that you mentioned that "This function is @taiki-e if you have any comments. Feel freely to say. Thanks in advance. |
26: Replace version_check with our own parser to generate better errors r=taiki-e a=taiki-e This helps us to understand what kind of error occurred at which stage of parsing. See also #24 (comment). Co-authored-by: Taiki Endo <[email protected]>
As said in #26, I believe this issue is completely resolved so I'll close this. |
(Marked as a (fixed) bug. It's likely that |
@jhpratt you are right. that issue is not related to this one. As I checked out the latest time-rs(0.2.18),then built in the rustc 1.46.0, there is not the issue as I said in the above. |
cargo build
Updating crates.io index
Compiling version_check v0.9.2
Compiling const_fn v0.4.1 (/root/const_fn-master)
error: failed to run custom build command for
const_fn v0.4.1 (/root/const_fn-master)
Caused by:
process didn't exit successfully:
/root/const_fn-master/target/debug/build/const_fn-13eda46b8fb9e1dc/build-script-build
(exit code: 101)--- stdout
cargo:rustc-cfg=const_fn_has_build_script
--- stderr
thread 'main' panicked at 'unexpected output from
rustc --version
', build.rs:8:17stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /builddir/build/BUILD/rustc-1.45.2-src/vendor/backtrace/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /builddir/build/BUILD/rustc-1.45.2-src/vendor/backtrace/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:218
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:486
11: std::panicking::begin_panic
at /builddir/build/BUILD/rustc-1.45.2-src/src/libstd/panicking.rs:410
12: build_script_build::main
at ./build.rs:8
13: std::rt::lang_start::{{closure}}
at /builddir/build/BUILD/rustc-1.45.2-src/src/libstd/rt.rs:67
14: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:52
15: std::panicking::try::do_call
at src/libstd/panicking.rs:297
16: std::panicking::try
at src/libstd/panicking.rs:274
17: std::panic::catch_unwind
at src/libstd/panic.rs:394
18: std::rt::lang_start_internal
at src/libstd/rt.rs:51
19: std::rt::lang_start
at /builddir/build/BUILD/rustc-1.45.2-src/src/libstd/rt.rs:67
20: main
21: __libc_start_main
22:
The text was updated successfully, but these errors were encountered: