Skip to content

warning: unexpected cfg condition name: has_error_description_deprecated #203

@thereal-grayner

Description

@thereal-grayner

Hello,

Today installed electrs on another machine on my LAN, followed the same install process as before but this time encountered this error.

I did an earlier install on Ubuntu 22.04.5 LTS a week or so ago, todays install was on a different PC running Lubuntu 24.04.4 LTS and got the warning below.

This didn't happen on my other machine when I installed as far as I can see the same thing a week or so back, so IDK why it happened this time.

Anyway, the error message has some advice for dev's as to how to prevent it, so thought I should pass that on.

Details below.

Thanks,
Glen.

Did the standard install of clang/cmake/rustup and all good.
...
info: profile set to default
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for stable-x86_64-unknown-linux-gnu
info: latest update on 2026-03-26 for version 1.94.1 (e408947bf 2026-03-25)
$ . "$HOME/.cargo/env"

So then tried to compile/run electrs:
$ git clone https://github.com/blockstream/electrs && cd electrs
$ git checkout new-index
Already on 'new-index'
Your branch is up-to-date with 'origin/new-index'.

$ cargo run --release --bin electrs -- -vvv --lightmode --timestamp ... etc etc
info: syncing channel updates for 1.92.0-x86_64-unknown-linux-gnu
info: latest update on 2025-12-11 for version 1.92.0 (ded5c06cf 2025-12-08)
info: downloading 7 components
...
Spent a while time building and compiling and then this happened:
...
Compiling rocksdb v0.24.0
Compiling electrs v0.4.1 (/home/grayner/electrs)
warning: unexpected cfg condition name: has_error_description_deprecated
--> src/errors.rs:1:1
|
1 | / error_chain! {
2 | | types {
3 | | Error, ErrorKind, ResultExt, Result;
... |
34 | | }
| |_^
|
= help: expected names are: docsrs, feature, and test and 31 more
= note: using a cfg inside a macro will use the cfgs from the destination crate and not the ones from the defining crate
= help: try referring to impl_error_chain_processed crate for guidance on how handle this unexpected cfg
= help: the macro impl_error_chain_processed may come from an old version of the error_chain crate, try updating your dependency with cargo update -p error_chain
= note: see https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html for more information about checking conditional configuration
= note: #[warn(unexpected_cfgs)] on by default
= note: this warning originates in the macro impl_error_chain_processed which comes from the expansion of the macro error_chain (in Nightly builds, run with -Z macro-backtrace for more info)

warning: electrs (lib) generated 1 warning
Finished release profile [optimized] target(s) in 49m 38s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions