Error: could not compile `rustc-demangle` (lib)

Greetings, friends!

Can you tell me how to fix this error?

error: could not compile `rustc-demangle` (lib)

There should be more information about the cause before and after the text you've quoted.

2 Likes

Friend, it's showing now:

Summary

root@123776:~# git clone GitHub - availproject/avail-light
cd avail-light
cargo build --release
fatal: destination path 'avail-light' already exists and is not an empty directory.
Compiling serde_derive v1.0.195
Compiling zeroize_derive v1.4.2
Compiling thiserror-impl v1.0.56
Compiling tracing-attributes v0.1.27
Compiling futures-macro v0.3.30
Compiling impl-trait-for-tuples v0.2.2
Compiling parity-scale-codec-derive v3.6.9
Compiling tokio-macros v2.2.0
Compiling scale-info-derive v2.10.0
Compiling derive_more v0.99.17
Compiling rustc-demangle v0.1.23
Compiling pin-project-internal v1.1.3
Compiling async-trait v0.1.77
Compiling rustix v0.36.17
Compiling memoffset v0.8.0
Compiling memfd v0.6.4
Compiling psm v0.1.21
Compiling ref-cast-impl v1.0.22
Compiling wasmtime-asm-macros v8.0.1
Compiling wasmtime-jit-debug v8.0.1
Compiling ansi_term v0.12.1
Compiling wasm-bindgen-shared v0.2.90
Compiling cpp_demangle v0.3.5
Compiling ref-cast v1.0.22
Compiling zeroize v1.7.0
Compiling password-hash v0.4.2
Compiling wasmtime-jit-icache-coherence v8.0.1
Compiling thiserror v1.0.56
Compiling futures-util v0.3.30
Compiling bumpalo v3.14.0
Compiling base64 v0.13.1
Compiling generic-array v0.14.7
Compiling wasmtime v8.0.1
Compiling matchers v0.0.1
Compiling libsecp256k1-core v0.3.0
Compiling pin-project v1.1.3
Compiling wasm-bindgen-backend v0.2.90
Compiling arrayvec v0.5.2
Compiling wasm-bindgen v0.2.90
Compiling constant_time_eq v0.3.0
Compiling environmental v1.1.4
Compiling blake2b_simd v1.0.2
Compiling rand_chacha v0.2.2
Compiling secp256k1-sys v0.6.1
Compiling hash-db v0.16.0
Compiling heck v0.4.1
Compiling bs58 v0.4.0
Compiling crypto-common v0.1.6
Compiling block-buffer v0.10.4
Compiling digest v0.9.0
Compiling digest v0.10.7
Compiling block-buffer v0.9.0
Compiling crypto-mac v0.8.0
Compiling sha2 v0.9.9
Compiling libsecp256k1-gen-genmult v0.3.0
Compiling libsecp256k1-gen-ecmult v0.3.0
Compiling crypto-mac v0.11.1
Compiling hmac v0.8.1
Compiling curve25519-dalek v3.2.0
Compiling rand v0.7.3
Compiling curve25519-dalek v2.1.3
Compiling hmac v0.12.1
Compiling sha2 v0.10.8
Compiling serde v1.0.195
Compiling sha3 v0.10.8
Compiling blake2 v0.10.6
Compiling twox-hash v1.6.3
Compiling pbkdf2 v0.11.0
Compiling wasm-bindgen-macro-support v0.2.90
Compiling libsecp256k1 v0.7.1
Compiling signature v2.2.0
Compiling merlin v2.0.1
Compiling schnorrkel v0.9.1
Compiling hmac-drbg v0.3.0
Compiling pbkdf2 v0.8.0
Compiling hmac v0.11.0
Compiling wasm-bindgen-macro v0.2.90
Compiling num-format v0.4.4
Compiling dyn-clonable-impl v0.9.0
Compiling httparse v1.8.0
Compiling dyn-clone v1.0.16
Compiling tiny-bip39 v1.0.0
Compiling secrecy v0.8.0
Compiling hash256-std-hasher v0.15.2
Compiling array-bytes v6.2.2
Compiling semver v1.0.21
Compiling signature v1.6.4
Compiling serde_json v1.0.111
Compiling bytes v1.5.0
Compiling log v0.4.20
Compiling indexmap v1.9.3
Compiling hex v0.4.3
Compiling tracing v0.1.40
Compiling impl-serde v0.4.0
Compiling uint v0.9.5
Compiling parity-scale-codec v3.6.9
Compiling tokio v1.35.1
Compiling futures-executor v0.3.30
Compiling rlp v0.5.2
Compiling bincode v1.3.3
Compiling gimli v0.27.3
Compiling futures v0.3.30
Compiling wasmparser v0.102.0
Compiling cranelift-entity v0.95.1
Compiling impl-rlp v0.3.0
Compiling tracing-serde v0.1.3
Compiling object v0.30.4
Compiling tracing-log v0.1.4
Compiling ss58-registry v1.45.0
Compiling tracing-subscriber v0.2.25
Compiling ed25519-zebra v3.1.0
Compiling substrate-bip39 v0.4.5
Compiling dyn-clonable v0.9.0
Compiling backtrace v0.3.69
Compiling scale-info v2.10.0
Compiling impl-codec v0.6.0
Compiling js-sys v0.3.67
Compiling nohash-hasher v0.2.0
Compiling adler v1.0.2
Compiling gimli v0.28.1
Compiling miniz_oxide v0.7.1
Compiling object v0.32.2
Compiling rustc_version v0.4.0
Compiling send_wrapper v0.4.0
Compiling data-encoding v2.5.0
error: rustc interrupted by SIGSEGV, printing backtrace

/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6)[0x7fe511231aa6]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fe50e2f3520]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x24fd4df)[0x7fe510afd4df]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvXNtNtCs3MNCXqnqcQA_20rustc_builtin_macros8deriving7defaultNtB2_27DetectNonVariantDefaultAttrNtNtCsidHnM8M7zmy_9rustc_ast5visit7Visitor13visit_variant+0x66)[0x7fe51106e236]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4382bd2)[0x7fe512982bd2]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvXs_NtNtCsWyDWKIg9Cl_12rustc_expand3mbe11macro_rulesNtB4_23MacroRulesMacroExpanderNtNtB8_4base15TTMacroExpander6expand+0x4f2)[0x7fe512c42ece]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvMs1_NtCsWyDWKIg9Cl_12rustc_expand6expandNtB5_13MacroExpander21fully_expand_fragment+0x1560)[0x7fe512e80c60]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvMs1_NtCsWyDWKIg9Cl_12rustc_expand6expandNtB5_13MacroExpander12expand_crate+0x2e4)[0x7fe512e7d9fe]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(_RNvNtCsgqCaRwxIDM4_15rustc_interface6passes21resolver_for_lowering+0xb31)[0x7fe5132e7b71]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4ce7033)[0x7fe5132e7033]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4af4c65)[0x7fe5130f4c65]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4af4309)[0x7fe5130f4309]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4afe5f3)[0x7fe5130fe5f3]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4c2c7db)[0x7fe51322c7db]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4c2c639)[0x7fe51322c639]
/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5)[0x7fe50e5988e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7fe50e345ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x7fe50e3d7850]

note: we would appreciate a report at GitHub - rust-lang/rust: Empowering everyone to build reliable and efficient software.
Compiling trie-db v0.27.1
Compiling trie-root v0.18.0
Compiling memory-db v0.32.0
Compiling schnellru v0.2.1
Compiling asynchronous-codec v0.6.2
error: could not compile tokio (lib)

Caused by:
process didn't exit successfully: /root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name tokio --edition=2021 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=209 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="bytes"' --cfg 'feature="default"' --cfg 'feature="fs"' --cfg 'feature="full"' --cfg 'feature="io-std"' --cfg 'feature="io-util"' --cfg 'feature="libc"' --cfg 'feature="macros"' --cfg 'feature="mio"' --cfg 'feature="net"' --cfg 'feature="num_cpus"' --cfg 'feature="parking_lot"' --cfg 'feature="process"' --cfg 'feature="rt"' --cfg 'feature="rt-multi-thread"' --cfg 'feature="signal"' --cfg 'feature="signal-hook-registry"' --cfg 'feature="socket2"' --cfg 'feature="sync"' --cfg 'feature="time"' --cfg 'feature="tokio-macros"' -C metadata=a1a8a82a88e3314c -C extra-filename=-a1a8a82a88e3314c --out-dir /root/avail-light/target/release/deps -L dependency=/root/avail-light/target/release/deps --extern bytes=/root/avail-light/target/release/deps/libbytes-e1c22d7e4a799fc0.rmeta --extern libc=/root/avail-light/target/release/deps/liblibc-304ace76cbe1e4ca.rmeta --extern mio=/root/avail-light/target/release/deps/libmio-13bd241655fc809f.rmeta --extern num_cpus=/root/avail-light/target/release/deps/libnum_cpus-19f35f59802d1f27.rmeta --extern parking_lot=/root/avail-light/target/release/deps/libparking_lot-37b62a2a72f4f05d.rmeta --extern pin_project_lite=/root/avail-light/target/release/deps/libpin_project_lite-bdce6dcfd31fea7f.rmeta --extern signal_hook_registry=/root/avail-light/target/release/deps/libsignal_hook_registry-83f1fb5a485d06cf.rmeta --extern socket2=/root/avail-light/target/release/deps/libsocket2-888401404f705f95.rmeta --extern tokio_macros=/root/avail-light/target/release/deps/libtokio_macros-09070474303f0d63.so --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...

This seems to be coming from git. Perhaps you're using git dependencies or submodules. And it seems that there are some stray files in there, or perhaps you're on case-insensitive file system and the repo only works with case-sensitive fs.

Try deleting ~/.cargo/registry and ./target/ directories, so that Cargo redownloads and rebuilds everything fresh.

error: rustc interrupted by SIGSEGV,

that is puzzling, because it's not supposed to happen no matter what else is wrong. Unfortunately I don't know what could be causing this.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.