[cargo] `cargo install --all-features` fails with compile errors
Hello.
When using the standard way of installing using cargo options here, we get a hard failure from the full logs:
$ cargo install himalaya --all-features
Updating crates.io index
Installing himalaya v1.1.0
Updating crates.io index
Locking 551 packages to latest compatible versions
Adding ariadne v0.2.0 (available: v0.5.1)
Adding chumsky v1.0.0-alpha.7 (available: v1.0.0-alpha.8)
Adding pimalaya-tui v0.2.2 (available: v0.3.0)
Adding toml v0.8.23 (available: v0.9.5)
Adding uuid v0.8.2 (available: v1.18.1)
Downloaded serde_json v1.0.144
Downloaded 1 crate (152.1KiB) in 0.27s
Compiling proc-macro2 v1.0.101
Compiling unicode-ident v1.0.19
Compiling libc v0.2.175
Compiling serde_core v1.0.220
Compiling version_check v0.9.5
Compiling serde v1.0.220
Compiling typenum v1.18.0
Compiling autocfg v1.5.0
Compiling cfg-if v1.0.3
Compiling find-msvc-tools v0.1.1
Compiling shlex v1.3.0
Compiling zerocopy v0.8.27
Compiling libm v0.2.15
Compiling crossbeam-utils v0.8.21
Compiling subtle v2.6.1
Compiling thiserror v1.0.69
Compiling equivalent v1.0.2
Compiling hashbrown v0.15.5
Compiling winnow v0.7.13
Compiling smallvec v1.15.1
Compiling toml_write v0.1.2
Compiling generic-array v0.14.7
Compiling memchr v2.7.5
Compiling pin-project-lite v0.2.16
Compiling num-traits v0.2.19
Compiling once_cell v1.21.3
Compiling const-oid v0.9.6
Compiling log v0.4.28
Compiling indexmap v2.11.1
Compiling quote v1.0.40
Compiling syn v1.0.109
Compiling fnv v1.0.7
Compiling heck v0.5.0
Compiling rustls v0.23.31
Compiling pkg-config v0.3.32
Compiling syn v2.0.106
Compiling ident_case v1.0.1
Compiling icu_properties_data v2.0.1
Compiling bytes v1.10.1
Compiling icu_normalizer_data v2.0.0
Compiling target-lexicon v0.12.16
Compiling untrusted v0.9.0
Compiling crc32fast v1.5.0
Compiling jobserver v0.1.34
Compiling getrandom v0.2.16
Compiling signal-hook-registry v1.4.6
Compiling rand_core v0.6.4
Compiling cc v1.2.37
Compiling futures-core v0.3.31
Compiling tracing-core v0.1.34
Compiling memoffset v0.9.1
Compiling lock_api v0.4.13
Compiling ppv-lite86 v0.2.21
Compiling semver v1.0.26
Compiling socket2 v0.6.0
Compiling cfg-expr v0.15.8
Compiling mio v1.0.4
Compiling rand_chacha v0.3.1
Compiling version-compare v0.2.0
Compiling cfg_aliases v0.2.1
Compiling httparse v1.10.1
Compiling nix v0.29.0
Compiling cpufeatures v0.2.17
Compiling rand v0.8.5
Compiling futures-io v0.3.31
Compiling parking_lot_core v0.9.11
Compiling stable_deref_trait v1.2.0
Compiling rustc_version v0.4.1
Compiling build-rs v0.1.2
Compiling parking v2.2.1
Compiling concurrent-queue v2.5.0
Compiling rustix v1.1.2
Compiling strsim v0.10.0
Compiling base64ct v1.8.0
Compiling curve25519-dalek v4.1.3
Compiling num-bigint-dig v0.8.4
Compiling ring v0.17.14
Compiling slab v0.4.11
Compiling pem-rfc7468 v0.7.0
Compiling darling_core v0.14.4
Compiling linux-raw-sys v0.11.0
Compiling event-listener v5.4.1
Compiling num-integer v0.1.46
Compiling futures-sink v0.3.31
Compiling aho-corasick v1.1.3
Compiling futures-channel v0.3.31
Compiling ahash v0.8.12
Compiling event-listener-strategy v0.5.4
Compiling regex-syntax v0.8.6
Compiling fastrand v2.3.0
Compiling base64 v0.22.1
Compiling synstructure v0.13.2
Compiling zvariant_utils v2.1.0
Compiling litemap v0.8.0
Compiling rustls v0.21.12
Compiling pin-utils v0.1.0
Compiling futures-task v0.3.31
Compiling signal-hook v0.3.18
Compiling crc24 v0.1.6
Compiling writeable v0.6.1
Compiling spin v0.9.8
Compiling percent-encoding v2.3.2
Compiling futures-lite v2.6.1
Compiling lazy_static v1.5.0
Compiling num-iter v0.1.45
Compiling memoffset v0.7.1
Compiling thiserror v2.0.16
Compiling iana-time-zone v0.1.64
Compiling openssl-probe v0.1.6
Compiling adler2 v2.0.1
Compiling strsim v0.9.3
Compiling serde_json v1.0.144
Compiling itoa v1.0.15
Compiling darling_core v0.10.2
Compiling miniz_oxide v0.8.9
Compiling ff v0.13.1
Compiling minimal-lexical v0.2.1
Compiling async-task v4.7.1
Compiling atomic-waker v1.1.2
Compiling zeroize_derive v1.4.2
Compiling serde_derive v1.0.220
Compiling tracing-attributes v0.1.30
Compiling thiserror-impl v1.0.69
Compiling tokio-macros v2.5.0
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.8.0
Compiling zerovec-derive v0.11.1
Compiling displaydoc v0.2.5
Compiling zeroize v1.8.1
Compiling futures-macro v0.3.31
Compiling enumflags2_derive v0.7.12
Compiling rustls-pki-types v1.12.0
Compiling zerofrom v0.1.6
Compiling tokio v1.47.1
Compiling crypto-common v0.1.6
Compiling block-buffer v0.10.4
Compiling block-padding v0.3.3
Compiling async-trait v0.1.89
Compiling digest v0.10.7
Compiling tracing v0.1.41
Compiling inout v0.1.4
Compiling yoke v0.8.0
Compiling cipher v0.4.4
Compiling zerovec v0.11.4
Compiling hmac v0.12.1
Compiling serde_repr v0.1.20
Compiling curve25519-dalek-derive v0.1.1
Compiling der v0.7.10
Compiling darling_macro v0.14.4
Compiling hkdf v0.12.4
Compiling sha2 v0.10.9
Compiling futures-util v0.3.31
Compiling zerotrie v0.2.2
Compiling darling v0.14.4
Compiling tinystr v0.8.1
Compiling derive_builder_core v0.12.0
Compiling potential_utf v0.1.3
Compiling regex-automata v0.4.10
Compiling spki v0.7.3
Compiling icu_locale_core v2.0.0
Compiling icu_collections v2.0.0
Compiling pkcs8 v0.10.2
Compiling bounded-static-derive v0.8.0
Compiling icu_provider v2.0.0
Compiling derive_builder_macro v0.12.0
Compiling serde_spanned v0.6.9
Compiling toml_datetime v0.6.11
Compiling bitflags v2.9.4
Compiling toml_edit v0.22.27
Compiling chrono v0.4.42
Compiling signature v2.2.0
Compiling rustls-webpki v0.103.5
Compiling base16ct v0.2.0
Compiling byteorder v1.5.0
Compiling static_assertions v1.1.0
Compiling sec1 v0.7.3
Compiling enumflags2 v0.7.12
Compiling icu_properties v2.0.1
Compiling icu_normalizer v2.0.0
Compiling proc-macro-crate v3.3.0
Compiling toml v0.8.23
Compiling sha1 v0.10.6
Compiling rustls-pemfile v2.2.0
Compiling system-deps v6.2.2
Compiling crypto-bigint v0.5.5
Compiling darling_macro v0.10.2
Compiling nom v7.1.3
Compiling num-derive v0.4.2
Compiling thiserror-impl v2.0.16
Compiling piper v0.2.4
Compiling group v0.13.0
Compiling zvariant_derive v4.2.0
Compiling libgpg-error-sys v0.6.2
Compiling zbus_macros v4.4.0
Compiling gpgme-sys v0.11.0
Compiling async-lock v3.4.1
Compiling async-channel v2.5.0
Compiling proc-macro-error-attr v1.0.4
Compiling chumsky v1.0.0-alpha.7
Compiling endi v1.1.0
Compiling object v0.36.7
Compiling hex v0.4.3
Compiling scopeguard v1.2.0
Compiling owo-colors v4.2.2
Compiling rayon-core v1.13.0
Compiling getrandom v0.3.3
Compiling zvariant v4.2.0
Compiling blocking v1.6.2
Compiling polling v3.10.0
Compiling elliptic-curve v0.13.8
Compiling darling v0.10.2
Compiling idna_adapter v1.2.1
Compiling aes v0.8.4
Compiling webpki-roots v1.0.2
Compiling http v1.3.1
Compiling num-bigint v0.4.6
Compiling proc-macro-error v1.0.4
Compiling utf8_iter v1.0.4
Compiling unicase v2.8.1
Compiling mime_guess v2.0.5
Compiling idna v1.1.0
Compiling num-rational v0.4.2
Compiling zbus_names v3.0.0
Compiling async-io v2.5.0
Compiling async-fs v2.1.3
Compiling from_variants_impl v0.6.0
Compiling flate2 v1.1.2
Compiling rfc6979 v0.4.0
Compiling rustls-native-certs v0.8.1
Compiling async-executor v1.13.3
Compiling enum-as-inner v0.6.1
Compiling async-recursion v1.1.1
Compiling form_urlencoded v1.2.2
Compiling async-broadcast v0.7.2
Compiling num-complex v0.4.6
Compiling ordered-stream v0.2.0
Compiling xdg-home v1.3.0
Compiling eyre v0.6.12
Compiling base64 v0.21.7
Compiling bitflags v1.3.2
Compiling color-spantrace v0.3.0
Compiling zbus v4.4.0
Compiling num v0.4.3
Compiling url v2.5.7
Compiling rustls-platform-verifier v0.6.1
Compiling ecdsa v0.16.9
Compiling ureq-proto v0.5.2
Compiling primeorder v0.13.6
Compiling bstr v1.12.0
Compiling cbc v0.1.2
Compiling mio v0.8.11
Compiling thread_local v1.1.9
Compiling option-ext v0.2.0
Compiling utf-8 v0.7.6
Compiling Inflector v0.11.4
Compiling vcpkg v0.2.15
Compiling ureq v3.1.2
Compiling dirs-sys v0.5.0
Compiling ouroboros_macro v0.15.6
Compiling parking_lot v0.12.4
Compiling libz-sys v1.1.22
Compiling ed25519 v2.2.3
Compiling rustls-webpki v0.101.7
Compiling sct v0.7.1
Compiling linux-keyutils v0.2.4
Compiling pkcs1 v0.7.5
Compiling gethostname v0.4.3
Compiling bounded-static v0.8.0
Compiling paste v1.0.15
Compiling keccak v0.1.5
Compiling rsa v0.9.8
Compiling imap-types v2.0.0-alpha.4
Compiling sha3 v0.10.8
Compiling ed25519-dalek v2.2.0
Compiling http-lib v0.1.0
Compiling dirs v6.0.0
Compiling p256 v0.13.2
Compiling p384 v0.13.1
Compiling x25519-dalek v2.0.1
Compiling abnf-core v0.6.0
Compiling tokio-rustls v0.26.2
Compiling secret-service v4.0.0
Compiling camellia v0.1.0
Compiling blowfish v0.9.1
Compiling futures-executor v0.3.31
Compiling derive_builder v0.12.0
Compiling cfb-mode v0.8.2
Compiling des v0.8.1
Compiling idea v0.5.1
Compiling cast5 v0.11.1
Compiling twofish v0.7.1
Compiling md-5 v0.10.6
Compiling ripemd v0.1.3
Compiling sharded-slab v0.1.7
Compiling crossbeam-epoch v0.9.18
Compiling os_str_bytes v6.6.1
Compiling buffer-redux v1.0.2
Compiling encoding_rs v0.8.35
Compiling fixedbitset v0.4.2
Compiling same-file v1.0.6
Compiling allocator-api2 v0.2.21
Compiling utf8parse v0.2.2
Compiling bitfield v0.14.0
Compiling ryu v1.0.20
Compiling tinyvec_macros v0.1.1
Compiling custom_derive v0.1.7
Compiling tinyvec v1.10.0
Compiling pgp v0.10.2
Compiling anstyle-parse v0.2.7
Compiling keyring v3.6.3
Compiling conv v0.3.3
Compiling hashbrown v0.14.5
Compiling walkdir v2.5.0
Compiling petgraph v0.6.5
Compiling tokio-rustls v0.24.1
Compiling tracing-subscriber v0.3.20
Compiling keyring-lib v1.0.2
Compiling crossbeam-deque v0.8.6
Compiling shellexpand v3.1.1
Compiling imap-codec v2.0.0-alpha.5
Compiling futures v0.3.31
Compiling signal-hook-mio v0.2.4
Compiling gpg-error v0.6.2
Compiling rustls-pemfile v1.0.4
Compiling rustls-native-certs v0.7.3
Compiling process-lib v1.0.0
Compiling serde_path_to_error v0.1.17
Compiling rustls-webpki v0.102.8
Compiling email-macros v0.0.2
Compiling libgit2-sys v0.17.0+1.8.1
Compiling inotify-sys v0.1.5
Compiling cstr-argument v0.1.2
Compiling anstyle v1.0.11
Compiling is_terminal_polyfill v1.70.1
Compiling anstyle-query v1.1.4
Compiling linked-hash-map v0.5.6
Compiling z-base-32 v0.1.4
Compiling gimli v0.31.1
Compiling data-encoding v2.9.0
Compiling ipnet v2.11.0
Compiling colorchoice v1.0.4
Compiling anstream v0.6.20
Compiling rustls-platform-verifier v0.4.0
error[E0277]: the trait bound `webpki::Error: std::error::Error` is not satisfied
--> /home/teward/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-platform-verifier-0.4.0/src/verification/others.rs:234:40
|
234 | other_err.0.downcast_ref::<webpki::Error>()
| ------------ ^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `webpki::Error`
| |
| required by a bound introduced by this call
|
note: required by a bound in `<(dyn std::error::Error + Send + Sync + 'static)>::downcast_ref`
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/error.rs:295:5
For more information about this error, try `rustc --explain E0277`.
error: could not compile `rustls-platform-verifier` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `himalaya v1.1.0`, intermediate artifacts can be found at `/tmp/cargo-installS51HYf`.
This seems to be a build failure that also happens whether we use default features only and not --all-features on a fresh Rust environment set up on Ubuntu 24.04 using Rust upstream and cargo.
Note that running the build with the Sources option with cargo check --all-features and cargo build --all-features --release succeeds without this error.
same kind of issue here ✋
i get a few different errors
original error
i get the exact error of this issue when running one of
cargo +stable install --git https://github.com/pimalaya/himalaya --rev 5632fda
cargo +stable install --force --git https://github.com/pimalaya/himalaya --tag v1.1.0
other errors
process with errors
cargo +stable install himalaya --all-features
Caused by:
process didn't exit successfully: `/tmp/cargo-installSpxe1B/release/build/libgpg-error-sys-0178afc9b77815f6/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GPG_ERROR_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
Error: PkgConfig(
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gpg-error 'gpg-error >= 1.12'
The system library `gpg-error` required by crate `libgpg-error-sys` was not found.
The file `gpg-error.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.
HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing `gpg-error.pc`.
)
failed to load source for dependency imap-codec
cargo install --path . # from pimalaya/himalaya@cf008c0c
error: failed to compile `himalaya v1.1.0 (/home/disc/a.stevan/documents/repos/github.com/pimalaya/himalaya)`, intermediate artifacts can be found at `/home/disc/a.stevan/documents/repos/github.com/pimalaya/himalaya/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Caused by:
failed to load source for dependency `imap-codec`
Caused by:
Unable to update https://github.com/duesee/imap-codec
Caused by:
failed to parse manifest at `/home/disc/a.stevan/.local/share/cargo/git/checkouts/imap-codec-b5ebdb49b22e077a/7ba64ef/imap-types/fuzz/Cargo.toml`
Caused by:
feature `edition2024` is required
cannot download base64ct v1.8.0
with the following commands
cargo install himalaya --all-features
cargo install --force --git https://github.com/pimalaya/himalaya --tag v1.1.0
cargo install --git https://github.com/pimalaya/himalaya --rev 5632fda
cargo install --path . # from pimalaya/himalaya@5632fda
nothing even compiles and my error is
error: failed to compile `himalaya v1.1.0`, intermediate artifacts can be found at `/tmp/cargo-installMbjs0k`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Caused by:
failed to download `base64ct v1.8.0`
Caused by:
unable to get packages from source
Caused by:
failed to parse manifest at `/home/disc/a.stevan/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/base64ct-1.8.0/Cargo.toml`
Caused by:
feature `edition2024` is required
The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.82.0 (8f40fc59f 2024-08-21)).
Consider trying a newer version of Cargo (this may require the nightly release).
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.
For the first error, I think a --locked could work. This prevents cargo to install newer deps and to keep versions as listed in the lock file. For the other error, it looks like you miss libgpg installed on your machine. For example, on Debian, sth like sudo apt install libgpgme-dev should work.
thanks @soywod !!
- 🟢 adding
--lockedtocargo installfrom crates.io appears to work - ⚪ i have some trouble updating my system and installing
libgpgme-devso i cannot test this one
maybe adding these to the README would be helpful ?
btw, i just started playing with
himalayaandmirador... AMAZING projects !! 🥳i started writing scritps to interact with my emails addresses, it's been pretty much a breeze so far 👌
Which OS do you run?
Happy that you like the projects, have a look at other Pimalaya's projects it moves quite a lot these days. I just released a CLI to manage contacts, a CLI to manage calendars and another one to manage OAuth 2.0 tokens: https://github.com/pimalaya
Which OS do you run?
this was Ubuntu 22.04LTS i believe
Happy that you like the projects, have a look at other Pimalaya's projects it moves quite a lot these days. I just released a CLI to manage contacts, a CLI to manage calendars and another one to manage OAuth 2.0 tokens: https://github.com/pimalaya
interesting, I'm still trying to get my emails working on my raspberry pi for now 🤣
So the previous command should work for your OS:
sudo apt update
sudo apt -y install libgpgme-dev
The GPG feature requires this lib otherwise it cannot work. Which error do you have? I can maybe help you.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgpgme-dev : Depends: libgpgme11 (= 1.16.0-1.2ubuntu4) but 1.16.0-1.2ubuntu4.2 is to be installed
E: Unable to correct problems, you have held broken packages.
but then with a sudo apt upgrade
Ign:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 linux-firmware all 20220329.git681281e4-0ubuntu3.40
Get:2 https://packages.mozilla.org/apt mozilla/main amd64 firefox amd64 144.0.2~build1 [81.3 MB]
Ign:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 linux-firmware all 20220329.git681281e4-0ubuntu3.40
Ign:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 linux-firmware all 20220329.git681281e4-0ubuntu3.40
Ign:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 linux-firmware all 20220329.git681281e4-0ubuntu3.40
Err:1 http://security.ubuntu.com/ubuntu jammy-security/main amd64 linux-firmware all 20220329.git681281e4-0ubuntu3.40
429 Too Many Requests [IP: 91.189.91.81 80]
Fetched 81.3 MB in 8s (10.6 MB/s)
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_20220329.git681281e4-0ubuntu3.40_all.deb 429 Too Many Requests [IP: 91.189.91.81 80]
Same with sudo apt update? You don't need an upgrade to be able to install a lib. Have a look at https://askubuntu.com/questions/1260432/unable-to-update-with-apt-get-getting-429-too-many-requests-error, it may help.
yeah, very weird, apt update works but apt install libgpgme-dev does not 🤷
Could you try to install just gpg? It may come with the lib, not sure about it.
mm, what i did is just run cargo install --path . --locked on v1.1.0, so far it's the only method that worked.
[!important] i'm using
cargo install --path .variants because the other commands, from Git or crates.io, recompile everything each time, which takes a loooooong time on a Raspberry Pi 5 :rofl:
[!note] on my raspberry pi, i was able to install
libgpgme-devbutcargo install --path .still gives the sameedition2024error...looks like there is an issue with
Cargo.lock, or rather,Cargo.lockis the correct one because--lockedworks :thinking:
the following command worked as well !
cargo install --git https://github.com/pimalaya/himalaya --tag v1.1.0 --locked
[!important] looks like
--lockedis the trick to solve theedition2024error !
Awesome, so we can close this issue?
Awesome, so we can close this issue?
maybe a note about using --locked should be at least added to the README ?
because that just feels like a hack, doesn't it ?