Skip to content
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

[bug]: rust compile error: inference error on crate time caused by an API change in Rust 1.80.0 #2801

Open
1 task done
yojoe opened this issue Dec 15, 2024 · 0 comments
Open
1 task done
Assignees
Labels
Bug Something isn't working

Comments

@yojoe
Copy link

yojoe commented Dec 15, 2024

Prerequisites

Server Hardware

aarch64, x86_64

StartOS Version

0.3.5.1

Client OS

Linux

Client OS Version

Ubuntu 24.04.01 LTS

Browser

Other

Browser Version

irrelevant

Current Behavior

I'm trying to build the StartOS Debian package. During the build-prod.sh stage the following compilation error occurs:

error[E0282]: type annotations needed for `Box<_>`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.30/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
   = note: this is an inference error on crate `time` caused by an API change in Rust 1.80.0; update `time` to version `>=0.3.35` by calling `cargo update`

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...
make[1]: *** [Makefile:189: core/target/aarch64-unknown-linux-gnu/release/startbox] Error 1
make[1]: *** Deleting file 'core/target/aarch64-unknown-linux-gnu/release/startbox'
make[1]: Leaving directory '/home/ubuntu/start-os'

Expected Behavior

Since the Rust code is compiled via docker using the start9/rust-arm-cross image, the above error should occur on every build system. It can be fixed by calling cargo update on the source code, but this then breaks the emver dependency in core/models and core/startos.

I guess StartOS 0.3.5.1 was originally compiled with a docker image that had a Rust version lower than 1.8.0, so there were no issues over a year ago. However, https://hub.docker.com/r/start9/rust-arm-cross:aarch64 was updated 6 months ago and probably contains a Rust version now which is equal or higher than 1.8.0, which breaks the existing (tagged) code. Unfortunately, there are no older/previous tags on docker hub for the :aarch64 tag one could easily switch to.

Steps to Reproduce

  1. git clone --recursive https://github.com/Start9Labs/start-os.git --branch latest
    or
    git clone --recursive https://github.com/Start9Labs/start-os.git --branch v0.3.5.1
  2. cd start-os
  3. npm --prefix web install
  4. PLATFORM=armbian make deb ARCH=aarch64

Anything else?

No response

@yojoe yojoe added Bug Something isn't working Needs Triage Needs to be assigned a priority labels Dec 15, 2024
@MattDHill MattDHill removed the Needs Triage Needs to be assigned a priority label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants