When trying to build 34.2.0 it failed with Unknown option: --enable-jxl. When was this option removed, and why? What are the implications?
Relevant part of the build log:





Yeah, after removing that option from .mozconfig half-time in the build process I noticed libmedia_libjxl being built. Now forgive me for sounding like a Vulcan but breaking the building process due to a redundant option seems... illogical. The logical way would be to add all such redundant/obsolete options to an internal list, and when any of them is encountered just notify the user about its status - do it in bold red font if necessary - and let the build continue normally.jobbautista9 wrote: ↑2026-04-07, 12:06--enable-jxl is no longer a valid mozconfig flag, because JPEG XL support is always built and that flag has been no-op for a pretty long time now. You should remove it.

Configure does exactly that.
it halts the build process at the first stage (very early in the build process) with the message that it's an invalid option.0:10.16 mozbuild.configure.options.InvalidOptionError: Unknown option: --enable-jxl
it's not. And by treating invalid options as fatal, you aren't left guessing if your mozconfig options are actually doing anything or not. If you just let the build continue (most people won't view the compile output) then you get confusion "why is my config option not working...?"

Maybe it's time for certain things to change, seeing the Python environment already is.


Since you asked for my two cents, here it is...




I feel the issue hasn't been understood correctly and completely. It's not about a slight nuisance, or resource constrain or anything - it's about not wasting user's time, it's about not breaking the work flow.athenian200 wrote: ↑2026-04-07, 22:32it was a slight nuisance to have to remove --enable-jxl from all my .mozconfig files [...] You should run the editor from the console window [...] if it's mostly the resource-constrained build environment that makes this an issue [...]
Configuration options can vary so much from user to user (or better said, from environment to environment) that a default .mozconfig would be almost useless.athenian200 wrote: ↑2026-04-07, 22:32it would mean every time we touch the build options, we'd have to make sure we remember to update that default .mozconfig provided with the browser [...] it's something to save for a later date if we do want to change it [...]

Uhh... not to be dismissive or anything, but when programmers start talking about contiguous blocks of memory or fragmentation, that's often a tell that they aren't really sure what the problem is or can't reproduce it themselves. If versions of tools and libraries are verified, and we see nothing is weird, then of course everything shifts to less verifiable concerns like the memory layout or a subtly broken environment that appears fine. I wasn't there when MC said those things, so I don't know for sure... but from what I know of programmers and MC in general, I suspect you might be taking his words in this situation more seriously than he ever intended. I'll go out on a limb and say I really think, personally, that 8GB should be enough to build the browser safely, I just assumed from what you were doing you must be trying to build with 4GB or less. That said, I know you take this seriously, and if you're worried... there's always this option:Drugwash wrote: ↑2026-04-08, 13:45I feel the issue hasn't been understood correctly and completely. It's not about a slight nuisance, or resource constrain or anything - it's about not wasting user's time, it's about not breaking the work flow.
I didn't do all that mumbo-jumbo with clearing memory just because resources are scarce; I could well run a few applications along with building PM, including a text editor. But it's been mentioned so many times by Moonchild that certain crashes could be the result of buiding PM in a fragmented memory environment, like switching to swap etc. And since I'm self-building I don't have the right to complain about various issues, so I've been trying to minimize any and all possible risks - hence starting the build process in a clean, hopefully contiguous memory. I don't think any of us knows precisely how their OS works in this regard, how memory is used by various applications and the OS itself, so we can only do what we think it's right.
To that end, stopping an otherwise sound build process only because a configuration option is no longer valid - without it having any kind of impact on the build process itself - only wastes user's time, having to reiterate the memory safety procedure regardless of whether editing that darn config file is done in console/terminal or in a fancy text editor or whatever.
Code: Select all
mk_add_options MOZ_MAKE_FLAGS="-j1"Yeah, that's the main reason why we haven't done this... it would solve minor inconveniences for the average builder, but then the average user is likely able to use official builds anyway, and it still wouldn't help much in edge cases like yours.Configuration options can vary so much from user to user (or better said, from environment to environment) that a default .mozconfig would be almost useless.
Correct me if I'm wrong, but doesn't the build usually stop very early with an "error processing mozconfig" or something if you use an invalid option? I'm pretty sure it's not supposed to get that far in. Granted, it will just say "invalid build option," but it isn't going to waste your time by pretending it will build and then getting halfway through. It actually shouldn't be getting to code compilation at all in that situation, and if it is that may be a bug/regression. I thought you were just complaining that the error message was too vague.But since any change to the build options would have to be noted somewhere somehow, why not just do as I suggested the first time: whenever an option is deprecated, type its name in a text file, have that text parsed by Python when validating the config, and notify the user about the deprecations without stopping the build. Those who can afford the risk could edit their config file right away upon seeing the notifications, others (like me) would do it only after the build completes - or breaks for whatever other reason - and whoever doesn't care to read the build log and heed the notifications can go to hell, period.
Well, there is one issue with that... essentially, mach has to bootstrap itself in order to read in a .mozconfig file, and the process that ultimately turns the mozconfig into parsable tokens is implemented as a very dumb shell script, not as actual Python code. So there's actually very little we could do given those constraints. Other than just silently ignore all invalid .mozconfig options and treat them as if they were not specified, which would likely annoy other developers in different circumstances.I assume the Python script(s) can remove the invalid options before passing on to a new stage. Or if not, something like that could be implemented. I have not yet gotten to analyze the PM Python environment - neither the old nor the new one.
Code: Select all
cd platform
git log -- build/moz.configure/old.configure
That is to say... every single time we remove or add a configure option, we pretty much have to touch that file due to the way the build system works. So doing a git log on that file is a great way to see what build options were added or removed recently, though there may also be some noise if the file was edited for other reasons.commit 7fca2b8de39e9aaeaa594f814c45c7ae03267ff1
Author: Moonchild <redacted e-mail address>
Date: Sat Mar 21 11:57:15 2026 +0100
Issue #2739 - Follow-up: remove missed configure bits.
We still accepted {en|dis}able-jxl as a valid old-configure option and
there were a few leftover pref conditionals.
Code: Select all
./mach configure
(See if your .mozconfig is valid)
./mach build
(After the build system gives you a thumbs-up and confirms configure is complete.)

Maybe, maybe not, I wouldn't know what other people are thinking. As I read it around this board a few times I took it as a precaution.athenian200 wrote: ↑2026-04-08, 17:53when programmers start talking about contiguous blocks of memory or fragmentation, that's often a tell that they aren't really sure what the problem is or can't reproduce it themselves.
I know, it's present in my .mozconfig with the difference that i allowed for 2 threads instead of one as I saw total RAM usage would reach at most 7GB all in all during build (without other "hungry" apps running). It's already taking more than two hours as is, with a single thread it'd take forever. I'll be 60 in a couple months, don't have much time to spare.athenian200 wrote: ↑2026-04-08, 17:53there's always this option: mk_add_options MOZ_MAKE_FLAGS="-j1"
There is an option to clear memory, at least when run as administrator/root.athenian200 wrote: ↑2026-04-08, 17:53BleachBit only clears up fragmentation in disk space, not RAM.
Yep, that's the main point. And as I mentioned in one of the previous posts, it would be even more annoying and time-consuming if there were more than one deprecated options and the build would stop over and over again N times until all of them are exhausted. A wise person would avoid rebooting after each config edit, but one never knows. That's one more reason to have them singled out in the log all at once so they could be wiped out in one sweep.athenian200 wrote: ↑2026-04-08, 17:53basically reboot the machine [...] Which, if anything, wouldn't make your overall concern less valid if you're having to boot-cycle the machine between build attempts
Well, that's the catch: after 20+ years of MS Windows I can only think of myself as a mouse person, don't quite fancy the Terminal and working in command line. That's why vim, nano and other hotkey-based editors - and any other applications that emphasize on hotkeys - aren't really an option for me (and possibly other users too). My editor of choice is CudaText, and the file manager is Double Commander (considering I've used Total Commander in Windows since before 2000). They both have dozens of tabs open, mainly because my memory is failing day by day and I need reminders. So that makes for some unpredictable RAM usage - hence my memory clearing precaution.
We're back at the beginning. It does stop early indeed, but precisely the fact that it stops and demands editing a file - who knows for how many times in a row! - which in turn requires several operations that may tamper with memory, is what brought this issue up. It doesn't matter much if it stops two seconds or one hour after starting the build, although if it were the latter it would definitely waste much more of user's time.athenian200 wrote: ↑2026-04-08, 17:53doesn't the build usually stop very early with an "error processing mozconfig" or something if you use an invalid option? [...] it isn't going to waste your time by pretending it will build and then getting halfway through.
No, there's no bug or regression, compilation doesn't start when it shouldn't. And the error message is pretty clear. However there's room for improvement, such as catching the exception and presenting a cleaner error message as not everyone may be familiar with Python's errors. That wouldn't solve the current issue though.athenian200 wrote: ↑2026-04-08, 17:53It actually shouldn't be getting to code compilation at all in that situation, and if it is that may be a bug/regression. I thought you were just complaining that the error message was too vague.
That's no wonder, I've always done things somehow differently than most people. How many people do you know that never ever use the Recycle Bin/ Trash Bin? I've set all my systems, in time, starting with Win95 to delete everything directly bypassing the Bin. However, when launching Updater I closely look in the changelog tab of every file before selecting it, and if anything doesn't look right it won't get it. Most people don't even care what has actually changed, and in [current] Windows I'm not even sure it's possible. I never ever used a firewall or a resident antivirus in Windows and never got infected (despite visiting sites like Astalavista - for who remembers it), yet friends of mine using both were coming to me to fix their infected systems.athenian200 wrote: ↑2026-04-08, 17:53The thing that's worth noting is that your concerns are actually inverted from those of the average developer.
Well, that's a bit unfortunate but still not unsolvable. A shell script can still launch a Python script that could take care of the invalid tokens by returning only the valid ones that would then be parsed by the same script:athenian200 wrote: ↑2026-04-08, 17:53[...] the process that ultimately turns the mozconfig into parsable tokens is implemented as a very dumb shell script, not as actual Python code.
Code: Select all
UNPARSED_TOKENS=...
VALID=$(venv/python "/path/to/validating/script.py $UNPARSED_TOKENS")
# process $VALID tokens.I wouldn't agree to that either. A clean config is always best. All I wanted was the ability to clean it after the build is done if I considered it would be OK to let it run - otherwise there's always Ctrl+C to stop the build manually.athenian200 wrote: ↑2026-04-08, 17:53just silently ignore all invalid .mozconfig options and treat them as if they were not specified, which would likely annoy other developers in different circumstances.
Did that and the entry you mentioned looks... ambiguous. Could easily be overlooked or mistaken for something else. It's not like it says cleary: removed enable-jxl and disable-jxl options from .mozconfig. That would've been crystal clear for everyone. And, well, how many of those that build for themselves know to look there and actually understand what it's all about? You must admit those are very obscure operations. I'll probably forget about that command before tomorrow. (mentioned failing memory earlier, my mother died with advanced dementia, I probably inherited it)athenian200 wrote: ↑2026-04-08, 17:53In your terminal, before typing ./mach build, do this:Code: Select all
cd platform git log -- build/moz.configure/old.configure

Ah, I see. It is worth noting that we usually don't deprecate more than one build option at a time, precisely because we know how annoying this would be to deal with too often. For example... when I am bisecting builds and trying to trace down an error. Sometimes I have to add deprecated options back to my .mozconfig and comment out newer ones as I'm going, then reverse the process as I walk back up to see where an issue came up. It's to the point where I just comment out the old options with an # symbol in case I have to roll back to an old build and specify it again during some convoluted test. I just usually don't think about it because am in and out of the editor so fast... but yeah, if I were doing your workflow and I didn't have vim muscle memory, it would upset me more, I admit it.Drugwash wrote: ↑2026-04-08, 23:28]Yep, that's the main point. And as I mentioned in one of the previous posts, it would be even more annoying and time-consuming if there were more than one deprecated options and the build would stop over and over again N times until all of them are exhausted. A wise person would avoid rebooting after each config edit, but one never knows. That's one more reason to have them singled out in the log all at once so they could be wiped out in one sweep.
Good to know, I actually have a VM of that environment laying around already, so I can test it.And by the way, my desktop is Cinnamon 4.2 (in Linux Mint 19.2).
I can relate on this one, I also never use the Recycle Bin and wind up emptying it immediately or disabling it. I don't delete something unless I actually want it gone... the cache is an annoying layer. Didn't mean to suggest the way you do things is inherently wrong, so much as it's imposing a tax on you that no one else building the browser is paying.That's no wonder, I've always done things somehow differently than most people. How many people do you know that never ever use the Recycle Bin/ Trash Bin? I've set all my systems, in time, starting with Win95 to delete everything directly bypassing the Bin. However, when launching Updater I closely look in the changelog tab of every file before selecting it, and if anything doesn't look right it won't get it. Most people don't even care what has actually changed, and in [current] Windows I'm not even sure it's possible. I never ever used a firewall or a resident antivirus in Windows and never got infected (despite visiting sites like Astalavista - for who remembers it), yet friends of mine using both were coming to me to fix their infected systems.
So yeah, I might do things differently but it doesn't necessarily mean it's wrong. If I let things go despite some notification/warning I know what I'm doing, and I'd much like for those things to go smoothly.
Like, I do think that it might make sense to put stuff like that in the release notes for self-builders, but I also think most people wouldn't read that anyway.Did that and the entry you mentioned looks... ambiguous. Could easily be overlooked or mistaken for something else. It's not like it says cleary: removed enable-jxl and disable-jxl options from .mozconfig. That would've been crystal clear for everyone. And, well, how many of those that build for themselves know to look there and actually understand what it's all about? You must admit those are very obscure operations. I'll probably forget about that command before tomorrow. (mentioned failing memory earlier, my mother died with advanced dementia, I probably inherited it)
Anyway, I get it: it's complicated, may or may not be possible to improve at some point in time. I/we will have to live with it as is until further notice.
Thank you all for your input.

Basically yes, but it's understandable considering the evolution over so many years when all that's been done was mainly patchwork (on Mozilla's part).athenian200 wrote: ↑2026-04-09, 00:18Fundamentally, the issue is that our build process is not GUI-friendly at all, and assumes anyone building a UXP application is comfortable with a text editor and familiar with the terminal.
Mind you my system is unofficially updated with third-party backports and a few self-built tools and apps, including changes to some of the system files (Python and JS). You won't find GCC9 officially available for Ubuntu 18.04/Mint 19.x, nor Python 3.8+, Qt5.15, Qt6.2, Gtk4 or others. So mine is not exactly a standard environment.athenian200 wrote: ↑2026-04-09, 00:18Good to know, I actually have a VM of that environment laying around already, so I can test it.
I was thinking of the rare but still valid possibility that a user might get a [very] old config file from someone else or from an older build, maybe a totally incompatible version, so in that case more than one option could pop up as invalid/deprecated. That would indeed trigger repeated editing and retries, with accumulated frustration. User's fault, of course, but still.athenian200 wrote: ↑2026-04-09, 00:18It is worth noting that we usually don't deprecate more than one build option at a time [...]
I do the same, mainly not to forget about it if it's ever needed back. Memory, you know...athenian200 wrote: ↑2026-04-09, 00:18I just comment out the old options with an # symbol in case I have to roll back to an old build [...]

I've considered doing this as I know how to, but the thing is: I only know how to build these things in tools that are Windows-native. And that would entirely miss the mark for where people build from source most, which is Linux. Which in turn would make it less of a priority because of the small percentage of users, even smaller percentage of GUI users building, and even smaller taking into account people preferring to do these things from the CLI. So who would I be building it for then? I hope you get my drift why it's not really been done.
Then what they are doing is already a bad start: blindly copy-pasting a config they most likely don't understand, using it, not l;ooking at the build instructions posted on the website, etc.
Those remarks were primarily for building on hardware configurations that are woefully insufficient, would cause swapping and slow I/O which would trip up compilers and linkers (both on Windows and Linux). The actual cause being outside of our wheelhouse, mentions of fragmentation were "best guess" causes mentioned based on observed behaviour (e.g. build failing or being unstable, but being OK after a fresh restart of the exact same machine and configuration). 8GB is fine if you don't go overboard on parallel compilation tasks. The more of those you use, the more memory you need, but it's not 1:1; a lot depends on the linker as some parts are single-process, high memory link tasks.athenian200 wrote: ↑2026-04-08, 17:53I wasn't there when MC said those things, so I don't know for sure... but from what I know of programmers and MC in general, I suspect you might be taking his words in this situation more seriously than he ever intended. I'll go out on a limb and say I really think, personally, that 8GB should be enough to build the browser safely,
It was understood correctly and completely. But you are talking about "breaking the workflow" while all it would be doing is interrupting when you are assuming zero-maintenance workflows. It just isn't the case here that you would have or can assume zero-maintenance as we continue to develop. As I said already we can't start doing a whole multi-cycle deprecation development flow for each configure option we touch. Instead, if there's a change in recommended config or available options that impacts our documented build process, then those documents will also be updated. IMO you are making an elephant out of a mole hill here, wanting the build process to "never halt" depending on invalid/removed mozconfig options. While that's possible, you don't seem to understand the issue from our end with that correctly and completely: Not doing such a check would have people assume things work and then complain or be confused and want answers if they did not. The incomplete removal of the option in this very case (JXL, my bad for not making it an invalid option right away) caused exactly that as the most recent example (definitely not the only occurrence!).

Someone else could take over the task of building a GUI using a language and tools that allow cross-compiling or are available on both Windows and Linux (and Mac). Such as FreePascal and Lazarus, for example, which is what both CudaText and DoubleCmd - two of my tools of choice - are built with. Or Python and wxWidgets/Qt/Gtk. Or C/C++ and Gtk (like Claws-Mail; what ever happened to them? home page is unreachable). Or whatever.
For everybody.
Granted, but they are probably beginners, and in time they'll learn - if they will be helped to.
Currently the Python2 script breaks with an uncaught error on first invalid option it encounters. If it went through all options and in the end listed all of the invalid ones in a single batch, and then [gracefully] interrupted the build process, then it would have been a one-stop operation; a good lesson for beginners but still annoying in situations like the current where a deprecated/removed option that doesn't affect the build process in any way still stops the process.
As mentioned somewhere in a post above I set the build to two concurrent threads (-j2) which doesn't take memory consumption over 7GB in normal circumstances. But if I were to open other applications - such as a file manager, a text editor - and perform certain operations, would it then be safe to restart the build process after an interruption? Would anyone guarantee that the subsequent build would not be affected by those operations, that it would still have enough memory to not go into swap or do something... abnormal?
This is the part where I don't quite understand what you mean. I didn't ask for pre-notifications or anything for N releases ahead before deprecating some option - just that, once an option was deprecated/removed it would be clearly indicated as such in the build log, allowing the user to remove it from the configuration file only after the build is finished, if no other error creeped in. A simple file holding the names of all [recently] removed options (maybe followed by release version where it happened) would've been enough for the Python script to parse.
I never asked for a no-check, I wouldn't agree to that myself. But at most, comment out that bad option automatically through some script sometime during the build process, together with adding another comment specifying the reason (i.e. # enable-jxl/disable-jxl were deprecated and removed in v34.2.0; do not use). If the user ever checks the config file at a later time they'll acknowledge the change and the reason; if not then next builds will have no reason to complain about that particular option ever again. Would that be feasible and acceptable?
Why not strive to reach as close as possible to that...?



Oh, I think I know exactly what you're talking about now. The linker issues. Linkers in particular are notorious for gobbling up RAM and not being able to make use of swap, doing everything all at once even if it's a huge library.Moonchild wrote: ↑2026-04-09, 05:58Those remarks were primarily for building on hardware configurations that are woefully insufficient, would cause swapping and slow I/O which would trip up compilers and linkers (both on Windows and Linux). The actual cause being outside of our wheelhouse, mentions of fragmentation were "best guess" causes mentioned based on observed behaviour (e.g. build failing or being unstable, but being OK after a fresh restart of the exact same machine and configuration). 8GB is fine if you don't go overboard on parallel compilation tasks. The more of those you use, the more memory you need, but it's not 1:1; a lot depends on the linker as some parts are single-process, high memory link tasks.