Created attachment 235098 [details] Patch Remove bogus rust minimal version requirement which needlessly breaks build which goes perfectly fine otherwise, such as when rust is installed from packages or when it's unfeasible to rebuild rust right away.
This check is in place because we can't guarantee that a random rust version will be able to compile our rust dependents ports.
(In reply to Mikael Urankar from comment #1) > This check is in place because we can't guarantee that a random rust version will be able to compile our rust dependents ports. "Not being able to guarantee" and "having a check which is guaranteed to break the build" are not really related to each other. In fact, we don't support any configuration which involves building from ports with any package version different from that in the ports tree, but we don't put version requirements on each dependency line, I don't see why rust should be an exception. It won't be very important in most other cases, but in this specific case a maintainer's workflow is broken by the check, because after rust update a maintainer of rust-consuming port is forced to rebuild rust (multiple times, since ports are tested on multiple arches and multiple FreeBSD versions) just to test a leaf port update, and that may take days on an average machine. There are tools like reprise which -could- use prebuilt packages for testing, but are prohibited from doing that by the check.
So you've just ignored my arguments?
(In reply to Dmitry Marakasov from comment #3) I'm not ignoring them but as I said I can't guarantee that a random rust version will be able to compile our rust dependents ports
(In reply to Mikael Urankar from comment #4) To which I've replied that "not being able to guarantee" has nothing to do with deliberately breaking the build.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4b500674d50988b7ce3585914be27ef74fea3c1d commit 4b500674d50988b7ce3585914be27ef74fea3c1d Author: Tobias Kortkamp <tobik@FreeBSD.org> AuthorDate: 2022-08-25 21:16:22 +0000 Commit: Tobias Kortkamp <tobik@FreeBSD.org> CommitDate: 2022-08-25 21:16:22 +0000 Uses/cargo: Allow using any Rust version if requested Skip the Rust version check when CARGO_BUILDDEP=any-version The current version check is justified by USES=cargo making use of newer toolchain features that not all Cargo versions support and the fact that Rust binaries are statically linked against libstd (and others) which have been vulnerable in the past. We can enforce the use of the correct toolchain only with the version check. Together with revision bumps of all ports that have lang/rust as input we can ensure that they are kept "fresh" and relinked whenever lang/rust is updated. According to amdmi3@ skipping the check might be useful for build testing in some cases. Individual ports should not set CARGO_BUILDDEP=any-version. It can be set in make.conf or on the command line by users. PR: 265062 Reported by: amdmi3 Mk/Uses/cargo.mk | 2 ++ 1 file changed, 2 insertions(+)