[SOLVED] Can't compile firefox on debian due to rustc
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Help, I can't compile the browser on debian! I'm using bookworm release
This is what I see in the console:
Code:
0:14.50 checking rustc version... 1.63.0
0:14.54 checking cargo version... 1.65.0
0:14.55 ERROR: Rust compiler 1.63.0 is too old.
0:14.55 To compile Rust language sources please install at least
0:14.55 version 1.70.0 of the 'rustc' toolchain (or, if using nightly,
0:14.56 at least one version newer than 1.70.0) and make sure it is
0:14.56 first in your path.
0:14.56 You can verify this by typing 'rustc --version'.
0:14.56 If you have the 'rustup' tool installed you can upgrade
0:14.56 to the latest release by typing 'rustup update'. The
0:14.56 installer is available from https://rustup.rs/
*** Fix above errors and then restart with "./mach build"
But I have no desire to switch to sid now, I will have to reinstall the system!
Is there any way to compile firefox on debian stable?
You may be able to backport the proper version rustc from sid to stable. Sid shows 1.70 right now. For that matter see if you can just backport firefox directly from sid. Regular firefox is showing 120.0.0.1-1 right now. Not sure if that is the absolute newest.
My first question though is why are you doing this? Do you have an actual reason or do you just think you need the newest? 99% of the time the new changes are of little use to the majority of folks. Any security patches are backported to whatever stable has so that isn't a logical reason either.
Last edited by jmgibson1981; 12-12-2023 at 07:22 PM.
Maybe build firefox-esr, since it's what comes with stable, is probably buildable with stable toolchain, if you're just doing this for fun/experience.
Or if it's just cuz you want to run latest firefox, you can download compiled tarballs from mozilla directly, that'll run on stable, and update itself outside of package manager.
in such cases you can use docker, prepare the environment to build your software inside, and at the end you only need to drop that docker image. You host will remain exactly the same.
You may be able to backport the proper version rustc from sid to stable. Sid shows 1.70 right now. For that matter see if you can just backport firefox directly from sid. Regular firefox is showing 120.0.0.1-1 right now. Not sure if that is the absolute newest.
My first question though is why are you doing this? Do you have an actual reason or do you just think you need the newest? 99% of the time the new changes are of little use to the majority of folks. Any security patches are backported to whatever stable has so that isn't a logical reason either.
The problem is that I'm using bootstrap.py from mozilla, you can't select esr there. If I just download the archive from here https://ftp.mozilla.org/pub/firefox/...5.0esr/source/ then there will be no git history there and I will not be able to normally change the source code and add to it in the future
Select the appropriate version (i.e. bookworm) and follow the VCS link on the right of the resulting page to //salsa.debian.org/mozilla-team/firefox/-/commits/esr115/master - i.e. the repository that includes over a dozen of Debian-specific patches/fixes/workarounds.
One of those Debian-specific changes is "Relax minimum supporter rust version to 1.63" which seems like it would address exactly the issue in post #1...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.