-
Notifications
You must be signed in to change notification settings - Fork 62
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
build-failed : thread 'main' panicked at 'called Result::unwrap()
on an Err
value
#8131
Comments
bash-4.3$ cargo --version bash-4.3$ rustc --version |
The custom build command is failing to extract clang version with this function: https://github.com/libbpf/libbpf-rs/blob/master/libbpf-cargo/src/build.rs#L33 Can you show the output of |
clang --version |
Yeah that definitely fails on the regex: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=73762a6c7452f51f289cbfe5f0c580bc |
So how to fix this issue? Thanks |
I'll try to put out a fix for this in the next few days. I won't bump the version for below though as this only affects the build script. |
@bhzhu203 which Linux distribution are you on? Would be helpful to document and understand the differences. I'm surprised at the output of
|
Hello . I am using LFS for years , not any of a distribution . I followed the document from the BLFS. https://www.linuxfromscratch.org/blfs/view/svn/general/llvm.html |
I get the same error:
my system is ubuntu22.04,and the clang version is:
|
I fixed it after installed rustfmt:
|
'''
Compiling below v0.5.0 (/home/bhzhu/source/below/below)
error: failed to run custom build command for
below v0.5.0 (/home/bhzhu/source/below/below)
Caused by:
process didn't exit successfully:
/home/bhzhu/source/below/target/release/build/below-718216cef9c31e46/build-script-build
(exit status: 101)--- stderr
thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: Build("Failed to run regex on version string")', below/build.rs:19:47stack backtrace:
0: 0x5555557ee5ec - std::backtrace_rs::backtrace::libunwind::trace::h26ded3cee286f9ec
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x5555557ee5ec - std::backtrace_rs::backtrace::trace_unsynchronized::h830d548378790fdc
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x5555557ee5ec - std::sys_common::backtrace::_print_fmt::h7356e27371ec940d
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:66:5
3: 0x5555557ee5ec - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3da18fd93237a444
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:45:22
4: 0x555555810c3c - core::fmt::write::h1b11e7c3b9f52b83
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/fmt/mod.rs:1190:17
5: 0x5555557ea318 - std::io::Write::write_fmt::h2530d62e754fd8dc
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/io/mod.rs:1657:15
6: 0x5555557f0657 - std::sys_common::backtrace::_print::ha001eea1f09df837
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:48:5
7: 0x5555557f0657 - std::sys_common::backtrace::print::he19aad5eb563cdb7
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:35:9
8: 0x5555557f0657 - std::panicking::default_hook::{{closure}}::h4bec003d220dffc8
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:295:22
9: 0x5555557f031f - std::panicking::default_hook::hbf9de44b5ceb445d
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:314:9
10: 0x5555557f0dba - std::panicking::rust_panic_with_hook::hba49b95df3772ed5
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:698:17
11: 0x5555557f0aa7 - std::panicking::begin_panic_handler::{{closure}}::he9fc0b4286f77c60
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:588:13
12: 0x5555557eea94 - std::sys_common::backtrace::__rust_end_short_backtrace::h07791585b84f81da
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:138:18
13: 0x5555557f07a9 - rust_begin_unwind
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:584:5
14: 0x5555555b9c13 - core::panicking::panic_fmt::he8540b011fb85aaa
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/panicking.rs:143:14
15: 0x5555555b9ca3 - core::result::unwrap_failed::h5b5a61b4f1a3fe39
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/result.rs:1749:5
16: 0x5555555babe2 - core::result::Result<T,E>::unwrap::hbd8ff0f689370095
17: 0x5555555bcb7a - build_script_build::main::h64c087248aa8d4af
18: 0x5555555bb2c3 - core::ops::function::FnOnce::call_once::h3fe4fb01b7d47e7e
19: 0x5555555bb509 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4b18e62f18ccc92a
20: 0x5555555bcac9 - std::rt::lang_start::{{closure}}::hf32d562c9a5ca0c2
21: 0x5555557edcd1 - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::hb16268c89c211835
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/ops/function.rs:259:13
22: 0x5555557edcd1 - std::panicking::try::do_call::h42af4c24be01d864
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:492:40
23: 0x5555557edcd1 - std::panicking::try::hcddad39c2668977b
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:456:19
24: 0x5555557edcd1 - std::panic::catch_unwind::h17be4d22360f6801
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panic.rs:137:14
25: 0x5555557edcd1 - std::rt::lang_start_internal::{{closure}}::he399a7bc5b46d1ed
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/rt.rs:128:48
26: 0x5555557edcd1 - std::panicking::try::do_call::he22e88faa301e128
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:492:40
27: 0x5555557edcd1 - std::panicking::try::h179e28dc63c29e66
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:456:19
28: 0x5555557edcd1 - std::panic::catch_unwind::h926c540a0059105b
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panic.rs:137:14
29: 0x5555557edcd1 - std::rt::lang_start_internal::hcf3b4e612381f709
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/rt.rs:128:20
30: 0x5555555bcab1 - std::rt::lang_start::hfb5e709917bc1f4e
31: 0x5555555bcc43 - main
32: 0x7ffff6f1f50d - __libc_start_main
at /home/bhzhu/source/glibc-2.33/csu/../csu/libc-start.c:332:16
33: 0x5555555ba43a - _start
at /home/bhzhu/source/glibc-2.33/csu/../sysdeps/x86_64/start.S:120
34: 0x0 -
warning: build failed, waiting for other jobs to finish...
error: build failed
'''
The text was updated successfully, but these errors were encountered: