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

Release 1.41.0 fails to build on NetBSD #925

Closed
0323pin opened this issue Aug 4, 2024 · 17 comments
Closed

Release 1.41.0 fails to build on NetBSD #925

0323pin opened this issue Aug 4, 2024 · 17 comments
Labels
bug Something isn't working

Comments

@0323pin
Copy link

0323pin commented Aug 4, 2024

Hi,

NetBSD package maintainer here. While trying to upgrade our package to the newly release 1.41.0, I'm hitting the following compilation error:

error[E0277]: `&Box<[char]>` is not an iterator
  --> src/pattern/fuzzy_pattern.rs:33:19
   |
33 |         for &c in &self.chars {
   |                   ^^^^^^^^^^^ `&Box<[char]>` is not an iterator
   |
   = help: the trait `Iterator` is not implemented for `&Box<[char]>`, which is required by `&Box<[char]>: IntoIterator`
   = help: the trait `Iterator` is implemented for `Box<I, A>`
   = note: required for `&Box<[char]>` to implement `IntoIterator`

error[E0277]: `[tree_line::TreeLine]` is not an iterator
   --> src/tree_build/builder.rs:569:25
    |
569 |             for line in &mut tree.lines {
    |                         ^^^^^^^^^^^^^^^ `[tree_line::TreeLine]` is not an iterator
    |
    = help: the trait `Iterator` is not implemented for `[tree_line::TreeLine]`, which is required by `&mut Box<[tree_line::TreeLine]>: IntoIterator`
    = help: the following other types implement trait `IntoIterator`:
              Box<indexmap::map::slice::Slice<K, V>>
              Box<indexmap::set::slice::Slice<T>>
    = note: required for `Box<[tree_line::TreeLine]>` to implement `Iterator`
    = note: 1 redundant requirement hidden
    = note: required for `&mut Box<[tree_line::TreeLine]>` to implement `Iterator`
    = note: required for `&mut Box<[tree_line::TreeLine]>` to implement `IntoIterator`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `broot` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
*** Error code 101

Stop.

OS: NetBSD-10.99.11 (development version)
Rust: 1.79.0

@0323pin 0323pin added the bug Something isn't working label Aug 4, 2024
@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

It compiles fine on Void Linux (musl) with Rust-1.80

Any hints?

@creideiki
Copy link
Contributor

I'm seeing the same error trying to upgrade the Gentoo Linux package (which I maintain). Also on Rust 1.79.0, and we don't have 1.80.0 packaged yet.

@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

So, I've fetched x86_64-unknown-netbsd using rustup and kicked a build with Rust-1.80. It compiles just fine

~> /home/pin/.cargo/bin/rustc -V
rustc 1.80.0 (051478957 2024-07-21)
~> tar -xf broot-1.41.0.tar.gz
~> cd broot-1.41.0/
~> /home/pin/.cargo/bin/cargo build --release
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.155
   Compiling autocfg v1.3.0
   Compiling cfg-if v1.0.0
   [...]
   Building [=======================> ] 299/300: broot(bin)
   Finished `release` profile [optimized] target(s) in 16m 40s

Now, I guess Cargo.toml needs to reflect this,

rust-version = "1.65"

right now it says rust-version = "1.65" which, is obviously not the case.

@Canop
Copy link
Owner

Canop commented Aug 4, 2024

If rustc 1.80 isn't available everywhere, I may revert the iteration on &Box<[char]>.

@creideiki Do you confirm a dependency to rustc 1.80 looks like a problem to you ?

@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

@Canop we (NetBSD) had some serious issues with Rust on aarch64, rust-lang/rust#123551

This means, we currently have two versions of Rust, 1.76 for the troubled platforms and 1.79 for x86_64.

It will take sometime to sort everything up and be up-to-date with the current Rust releases. So, 1.80 won't be available for sometime.

@creideiki
Copy link
Contributor

@creideiki Do you confirm a dependency to rustc 1.80 looks like a problem to you ?

Yes. Looking at gentoo/gentoo#37727 it seems Rust 1.80 isn't appearing in Gentoo until the packages that fail to build with it are fixed, which could take a while.

@Canop
Copy link
Owner

Canop commented Aug 4, 2024

So I should aim for 1.76 ?

@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

So I should aim for 1.76 ?

If you would like broot to be installable on aarch64, yes. But, I'm fine with 1.79 as nothing depends on broot.

@creideiki
Copy link
Contributor

So I should aim for 1.76 ?

Gentoo ships 1.79 for all architectures that have any stable version (amd64 arm arm64 ppc ppc64 sparc x86). RiscV, MIPS and Loongson are marked unstable for all versions of Rust. So 1.79 or anything older works for me.

@Canop Canop closed this as completed in 6462365 Aug 4, 2024
@Canop
Copy link
Owner

Canop commented Aug 4, 2024

If you confirm it looks OK, I'll release 1.41.1

@creideiki
Copy link
Contributor

Look good. 6462365 builds and runs for me on Gentoo on AMD64 with Rust 1.79.

@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

Merci 👍

I can confirm that git-HEAD builds fine on x86_64 NetBSD with Rust-1.79

@Canop
Copy link
Owner

Canop commented Aug 4, 2024

https://github.com/Canop/broot/releases/tag/v1.41.1

@0323pin
Copy link
Author

0323pin commented Aug 4, 2024

@Canop
Copy link
Owner

Canop commented Oct 24, 2024

@0323pin Is changing the minimal rustc version from 1.76 to 1.79 a problem today ?

@0323pin
Copy link
Author

0323pin commented Oct 24, 2024

@Canop Thanks for asking. No, this is not a problem, we currently have 1.80.1 in tree. The only issue is that anything requiring Rust > 1.76 won't build on 32 bits ARM. But, that's the way it is.

@0323pin
Copy link
Author

0323pin commented Oct 24, 2024

Please go ahead and bump it according to your needs. As long as it's not > 1.80.1 that's fine. For the record, I'm still using 1.81 (not available for users yet).

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