mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-17 11:33:12 +00:00
ccextractor does not build with rust 1.54.0 #850
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @loz-hurst on GitHub (Nov 17, 2025).
Documentation (and build script) says minimum rust version is 1.54 but building with that version (e.g. installing rust via
apton Debian bookworm) fails with this error:I suspect this just needs the minimum version of rust bumping up, following the integration of
ebd8252b(merge request: #1753) for compatibility with 1.90.@loz-hurst commented on GitHub (Nov 17, 2025):
(Also
-without-rustoption is not recognised by the build script and--without-rustdoesn't work via the configure/make/install route, so I've not been able to workaround that way. I think that the build documentation might need a review by someone who knows how to build ccextractor.)@Atishyy27 commented on GitHub (Nov 18, 2025):
I'd like to work on this issue.
I’m setting up the environment and reproducing the Rust build failure locally.
The error seems to be coming from the use of
is_multiple_of(), which is unstable on Rust 1.54.I’ll investigate whether:
% 2 == 0).Will update soon with findings and open a PR.
@loz-hurst commented on GitHub (Nov 18, 2025):
That commit I linked to (
ebd8252/ merge request #1753) replaced% 2 == 0check with thisis_multiple_of(). The merge request title was "Fix: Rust Clippy failing on 1.90" and this was the only code change, I don't know Rust, but, from that, I infer that the%2 == 0approach doesn't work or breaks something in Rust 1.90?I expect, based on this, bumping the MSRV will be the only solution to not break 1.90 compatibility. But I don't know what the minimum version of Rust should be for the newer code to work.
@Atishyy27 commented on GitHub (Nov 18, 2025):
Thanks for the context, that makes sense.
Given that
is_multiple_of()was introduced specifically to satisfy Clippy on Rust 1.90, reverting to the old% 2 == 0logic would indeed break compatibility with newer Rust releases.In that case, the cleaner solution seems to be:
is_multiple_of()became stable,I'll run some quick checks across Rust versions to determine the lowest compatible one (likely around 1.71+), and then open a PR updating MSRV and related docs.
Will update soon with findings.
@loz-hurst commented on GitHub (Nov 18, 2025):
....just done some Googling - possibly the change needs reverting back to code that works with 1.54 and the Clippy linting (now Google's told me what it is ;) ) MSRV set to the same as this project in which case it shouldn't fail the previous code any more?: https://github.com/rust-lang/rust-clippy?tab=readme-ov-file#specifying-the-minimum-supported-rust-version
Depends on if you want to maintain supporting of the older versions of Rust? (I think in any case, Clippy needs to be configured to match the project's MSRV to avoid problems in the future.)
Edit - bit more research and it seems
is_multiple_of()was added (as stable) in 1.90.0: https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of@Atishyy27 commented on GitHub (Nov 18, 2025):
cool, thanks for running those checks, that clarifies things.!
Given that the build script explicitly checks for MSRV(1.54.0), it makes sense to maintain compatibility with 1.54 rather than rely on an unstable feature from newer Rust versions.
Using
is_multiple_of()to satisfy a Clippy lint seems to be the root cause, so the safer and more consistent approach is likely:This should fix the build failure while preventing similar issues in the future.
I'll test this approach locally and verify that:
If everything checks out, I’ll open a PR with the fix and configuration update.