Ah. I was able to fix it by adding cargo update -p time right before the build.
diff --git a/PKGBUILD b/PKGBUILD
index f1fee75..5e86312 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,6 +25,7 @@ options=(!lto)
build() {
cd "$srcdir/$_pkgname-${pkgver}"
+ cargo update -p time
cargo build --release --features no-self-update --bin elan-init
}
I wasn't able to compile this package even in a clean chroot (pkgctl build).
$ git clone https://aur.archlinux.org/elan-lean.git
$ cd elan-lean
$ pkgctl build
==> Updating pacman database cache
:: Synchronizing package databases...
core downloading...
extra downloading...
multilib downloading...
==> Building elan-lean
-> repo: extra
-> arch: x86_64
-> worker: evan-8
==> Building elan-lean for [extra] (x86_64)
... [abridged] ...
Compiling dirs-sys-next v0.1.2
error[E0282]: type annotations needed for `Box<_>`
--> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.20/src/format_description/parse/mod.rs:83:9
|
83 | let items = format_items
| ^^^^^
...
86 | Ok(items.into())
| ---- type must be known at this point
|
help: consider giving `items` an explicit type, where the placeholders `_` are specified
|
83 | let items: Box<_> = format_items
| ++++++++
Compiling filetime v0.2.21
Compiling elan-dist v1.11.0 (/build/elan-lean/src/elan-3.1.1/src/elan-dist)
Compiling same-file v1.0.6
Compiling serde_derive v1.0.160
Compiling either v1.8.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/evan-8/build
Tried to tinker around with the PKGBUILD to see if there's a way to fix it, but I've never used Rust before, so I couldn't figure out what to change. It does seem to be the error in https://users.rust-lang.org/t/time-crate-compilation-error/111789 though.
I had a rust related issue (error[E0635]: unknown feature proc_macro_span_shrink) while building initially. Switching from nightly to stable rust toolchain (via rustup) helped.
I had some trouble using Lean after installing this package, and the Lean community suggested to add "lake" to the list of binaries to be linked, in the PKGBUILD:
_binlinks=('lean' 'leanchecker' 'leanpkg' 'lake')
It would be nice to have the package officially supported on ARM.
There seems already to be no problem building it on android/termux/arch.
That is any strange, and I can't reproduce this bug by any means. Did you try elan toolchain install stable?
I cannot set a default toolchain because I cannot install one, every elan install return "binary package was not provided for 'linux'". I don't read upstram docs very carefully, but the same command works for the official version.
Is there an error message? Did you set the default toolchain? Also, did you consult the upstream docs?
Of course, I would like to place packages where they should be, I just have no idea how to use it to install a toolchain. As
elan install leanprover-community/lean:3.49.1
does not work for me, am I missing something?