Building All the Major Open-Source Web Browsers 106
An anonymous reader writes: Cristophe de Dinechin, long-time software developer, has an interesting article on the processes involved in building the major browsers. From the article:
"Mozilla Firefox, Chromium (the open-source variant of Chrome) and WebKit (the basis for Safari) are all great examples of open-source software. The Qt project has a simple webkit-based web browser in their examples. So that's at least four different open-source web browsers to choose from. But what does it take to actually build them? The TL;DR answer is that these are complex pieces of software, each of them with rather idiosyncratic build systems, and that you should consider 100GB of disk space to build all the browsers, a few hours of download, and be prepared to learn lots of new, rather specific tools."
"Mozilla Firefox, Chromium (the open-source variant of Chrome) and WebKit (the basis for Safari) are all great examples of open-source software. The Qt project has a simple webkit-based web browser in their examples. So that's at least four different open-source web browsers to choose from. But what does it take to actually build them? The TL;DR answer is that these are complex pieces of software, each of them with rather idiosyncratic build systems, and that you should consider 100GB of disk space to build all the browsers, a few hours of download, and be prepared to learn lots of new, rather specific tools."
Re: So the STL:DR version... (Score:1)
Let's hear from a frequent contributor first
Re: (Score:3, Informative)
Are you a frequent contributor? No? Okay, well shut the fuck up and let Bennett weigh in on this.
Re: (Score:1)
Re: (Score:3)
File it under "stuff that matters".
A lot of arguments for open source are based on things which people outside the project could in principle accomplish, but in practice seldom do. So it's reassuring at least that an experienced developer can build the two most popular browsers from scratch. It means the arguments aren't hollow. I've seen closed source projects that were purchased by companies, only to find out that getting them to build on any computer but the one it was developed on is a serious engin
Re: (Score:3)
That the process of building these browsers from scratch is somewhat arcane will come as no surprise to any experienced developer. But that it's not so arcane that it's impractical to figure out is good news.
it sounded very impractical. FTFS: "these are complex pieces of software, each of them with rather idiosyncratic build systems, and that you should consider 100GB of disk space to build all the browsers, a few hours of download, and be prepared to learn lots of new, rather specific tools."" I'd say it's good that open source browsers are not impossible to build. But this is no apt-get or whatever people say.
Re: (Score:2)
If there isn't a well-documented, repeatable build process, then it's not "engineering" AT ALL.
Re: (Score:2)
Is it just me or isn't there hardly an content in that blog-post? What is the significance?
The significance is that Open Source doesn't automatically mean not bloated. Just see Mozilla, Open/Libre Office etc.
Re: (Score:2)
Well, as the author of the blog post, I did not intend this post to go on Slashdot. It was just a note-to-self about the various commands and build steps involved. Because they are, well, complicated.
In the grand scheme of things, the significance behind this is that I plan to open-source Tao, the 3D document description language invented by Taodyne, with the intent to be able to integrate it into at least one web browser. More details about why Tao would make a difference for the web here: http://www.taody [taodyne.com]
Build (Score:1)
cd /usr/ports/www/firefox && make install clean /usr/ports/www/chromium && make install clean /usr/ports/www/webkit-gtk3 && make install clean
cd
cd
Wasn't that hard.
Re: (Score:3)
The system cannot find the path specified.
I guess those of us using Windows still aren't going to be contributing much any time soon. :-(
Re: (Score:2)
You have to install the compiler repos just like a Linux user would.
You also might be interested in Cygwin:
http://cygwin.com/ [cygwin.com]
and Windows Services for UNIX:
http://www.microsoft.com/en-us... [microsoft.com]
Re:Build (Score:5, Interesting)
Unfortunately, like too many OSS projects, Mozilla seems to think it will have the only cygwin instance on my system. It therefore assumes it's OK for me to just reconfigure the entire universe according to its preferences, redefine all my paths so the MozillaBuild version of everything takes precedence over anything else that's already installed, and so on.
In reality, I have various other tools installed that bridge the Windows and Linux worlds, including things fundamental to using various version control systems and other everyday needs. As much as I'd like to support Mozilla and be willing to contribute a bit here and there, I'm not going to compromise the development machine I also use to earn my pay cheque just to get their esoteric build system to work.
Re: Build (Score:4, Interesting)
Maybe, but unless you condone software piracy, that would require either buying a second Windows licence (unless you have one of the SA schemes that covers using Windows as both host and guest OS) or running something like Linux as your guest OS and figuring out the cross-compilation issues (if that's possible).
With today's software and licensing landscape, I just don't think setting up a custom VM for every project you work on is viable, nor that imposing burdens on that kind of level is the way to encourage skilled but casual/irregular contributors to help your project.
Re: (Score:2)
VM's make excellent DEV and QA testing environments and can be used as many times as needed under most development only licensing options. VM's are good in production environments but this is where distribution licenses need to be taken into account. During development and testing VM's provide the ability to reset the entire environment back to the pre-testing state. Testing applications can end up creating and leaving behind invalid registries, assemblies, old installs, and event logs that make debugging e
Re: (Score:2)
I'm well aware of the advantages of using VMs for creating a controlled environment. Unfortunately, that doesn't make my previous observations about licensing any less true.
I don't know what you mean by "development only licensing options" as far as Windows is concerned. There are different rules if you use Software Assurance to sort out your licensing, but that's the only exception to the one VM/one licensed copy rule as far as I'm aware. If you know better, please cite accordingly, as I'm sure plenty of u
Re: (Score:2)
I wasn't disputing your observations. I just added my observation of being able to use development only licences across multiple VM's or desktops provides a good app testing environment without the hassle of dealing with licensing costs in the development area. The MS development licenses I require are provided and managed through an MSDN subscription in conjunction with an MS Partner agreement which expands the number of developer only licenses. I have also obtained libraries built by non-MS vendors with
Re: (Score:3)
Fair enough. I would agree that the strategy you're describing could be an option in a software development shop where volume licensing is routine, and that given that ability it could well make sense to set up different standardised VMs for working on different projects.
Unfortunately, the average developer who might contribute to Firefox in their spare time isn't likely to have those kinds of professional-grade agreements in place for their own private projects, so I still don't think VMs are a general sol
Re: (Score:2)
One more observation. If a company wants to increase their market share in both applications along with the corresponding hardware the applications run under they should go out of their way to make the barrier for developers as low as possible. The more developers they can attract means more applications are created for a particular OS or environment resulting in an increase in OS sales and overall system buy in. VB is probably the top reason of how MS gained it's overall dominance in the 90's. Regardless o
Re: (Score:1)
Realistically speaking, almost nobody is going to cough up $100-$200 to the Great Redmond Overlord every time they want to throw together a VM, and almost nobody is going to stop themselves from setting up a VM because they don't want Microsoft's stockholders to be denied their ivory backscratchers. This includes people who already paid for a Windows license.
Re: (Score:3)
If you don't need the VM for long term, you can download an evaluation version of Windows that expires after a bit. There's currently a 8.1 evaluation that's good for 90 days, and a technical preview for 10 that's good until (I think) April. You can also just reuse your Vista or later Windows disk, skip typing in the key, and it'll run for a few days before demanding a key though I don't know if this would technically be a license violation. Finally, with some versions of Windows 7 you can install XP mod
Re: (Score:3)
It's your fault for using Windows, the platform where building cross-platform software is always black magic.
Yes, silly me, using the same platform for building and testing as approximately 100% of my customers do.
Sadly, the platforms that we geeks like to use aren't particularly relevant to a discussion about software for a mainstream audience, because that mainstream audience isn't running Linux and most of it isn't running OS X either.
Re: (Score:2)
How hard is it to write a script to adjust your path, open a cmd window and type in mozenv.cmd?
Re: (Score:2)
If it were just one little thing like a path that needed to be customised, obviously it would be trivial to do so. Unfortunately, with the kind of project that has a whole custom build system and wants its exact required version of everything under the sun installed, it is rarely so simple. For example, the consequences of having two different versions of a VCS installed on your system could be horrible if there had been a change in the internal source repository representation from one to the other and you
Re: (Score:2)
According to https://developer.mozilla.org/... [mozilla.org] you just need to make sure that c:\mozilla-build comes before cygwin on the PATH and run something like start-shell-msvc2013.bat (various bat files depending on msvc version). Pretty simple.
Mozilla doesn't require exact versions of everything, it just needs working versions of everything and if you're worried about problems with Mercurial, just use your default Python 2.7 and corresponding hg.exe.
Best to start by following their exact instructions then pruning
Re: (Score:2)
No doubt it is possible set it all up and get it working eventually. I've worked on projects with much more complicated set-ups than what you describe that build on a lot more different platforms than Firefox, and once you've figured out the details things generally run OK.
That said, there are quite a few statements even on the page you linked to (which is also the one I'd read last time I looked into this) that suggest requirements and dependencies beyond a single PATH update. An obvious example is that pr
Re: (Score:1)
Re: (Score:2)
I use VMs all the time, but they won't solve this particular problem for most people. Please read the other posts before you reply, as we've already covered this elsewhere in the thread.
Re: (Score:2)
Yes, in a sense I am too lazy to compile it. I have several businesses to run, family commitments, and so on. That leaves limited time for helping with volunteer efforts, and I choose to spend it helping projects where I can make what seems like the most valuable contribution in that time.
Sometimes that includes doing things for FOSS projects, but right now Mozilla's projects are not among them. The point is that they might have been if they had a better build process on Windows and/or better documentation
apt-get: bad command or file name (Score:2)
What's the command to download and install a desktop application package (in this case Visual Studio Express) from Microsoft's repository?
Re: (Score:3)
C:\> choco install VisualStudioExpress2013WindowsDesktop
http://www.pcworld.com/article... [pcworld.com]
Re: (Score:2)
Re: Build (Score:1)
Re: (Score:2)
2) create a FreeBSD VM
3) ????
4) Profit
Re: (Score:3)
Unfortunately, in this case that '????' is something like "develop several years' worth of cross-compilation infrastructure so you can build on your guest OS but run on the host".
Re: (Score:2)
Building Firefox (the only one I have experience with) will never work that way unless there has been a lot of patching to the official source. Firefox isn't designed to be installed with make install and install isn't even a target and building means "make -f client.mk"
From client.mk
# Build a mozilla application. .mozconfig file with
#
# To build a tree,
# 1. hg clone ssh://hg.mozilla.org/mozilla-central mozilla
# 2. cd mozilla
# 3. create your
# ac_add_options --enable-application=browser
# 4. gmake -f client.mk
#
# Other targets (gmake -f client.mk [targets...]),
# build
# clean (realclean is now the same as clean)
# distclean
Re: (Score:2)
The grandparent's example was not made up. It was how it's actually done on FreeBSD. Invoking make there downloads the sources, patches them, and then invokes the standard build procedure you quoted. So yes, somebody had to do some work to wrap the build process in a uniform interface, but it's no more work than what's needed for maintaining binary packages like Debian's apt packages. And once that work is done, anybody else using that operating system distribution can do it as simply as the grandparent sho
Re: (Score:2)
You are not building the latest, only whatever patched version exists in your ports. And did you actually run the commands and verify that your machine is powerful enough to do it?
Easy with Gentoo (Score:5, Informative)
Of course, if you use a source-based distribution, it's easy, but that's not the point. If you download the source and build it yourself, you'll have to learn a bit about how they manage the build environment. You'll have to handle being sure all the dependencies are installed. You'll have to figure out any configuration options.
That's exactly what people who make distributions do. If you want to see how complicated the build is for any piece of software, just look at how complicated the build scripts are for various distributions. I expect you can find these for the binary distributions. With Gentoo, just look at the ebuild file.
Re: (Score:3)
That's exactly what people who make distributions do. If you want to see how complicated the build is for any piece of software, just look at how complicated the build scripts are for various distributions.
I think it's a bad idea to rely on distributors to do this work. With my projects, I always try to make the build process as simple as possible.
If somebody is thinking about maybe contributing to the project, I want it to be completely painless.
It doesn't always work out, especially with third party dependencies, but I try to keep the build process as simple as checkout source code, and build it. No configuration at all. Obviously you can configure stuff, but there should be a default that will work for alm
Re: (Score:3)
I agree that it should be easy. My point wasn't to rely on distributors for building. It was that the work has already been done for major projects like the ones listed, so you can get a sense of their build complexity by looking at what they had to do.
For example, here are some ebuild sizes:
gcc-4.9.1 1556 bytes
mythtv-0.27.4 9796 bytes
firefox-33.0 11698 bytes
libreoffice-4.3.1.2 18473 bytes
chromium-40.0.2194.2 18610 bytes
netbeans-ide-8.0 29367 bytes
That's a rough approximation of complexity. Sure, you ca
Re: (Score:2)
Heck, the whole process to build Qt and its browser-du-jour (webkit then, chromium now) amounts to configure followed by make, and that's whether you're on Windows or Unix.
I run Gentoo (Score:4, Interesting)
*Actually, it's: emerge -v --deep --newuse --with-bdeps=y --update world 2>&1 | tee update-world-deeper-`date +%F`.log, but that's just me.
Re: (Score:2)
Yeah, I'm in the same boat; it's approaching the point where I'm debating just unmerging the damn thing as I mostly use FF. It's gotten to the point that I've masked* Chromium and am now only updating it monthly when I manually unmask it. I'm on a fairly recent laptop CPU (i5-3230M) and building Chromium takes so long it reminds me of emerging gnome2 back when I had a Pentium3 800MHz.
* for non-Gentoo users, masking a package basically hides it from future updates. You can mask specific versions or anythi
Re: (Score:2)
I thought there were options to install pre-compiled versions of the packages. Are they not all available, or am I just mistaken?
(Obviously I'm not a Gentoo user. Mostly Debian).
Re: (Score:1)
The entire point of Gentoo is literally to compile the entire system on your system, custom-built for your hardware, for maximum efficiency for your specs. For instance, you might have the latest Intel i7 Whizbang with the added XYZ super-fast instruction set, but it'll be many years before that ends up being compiled by default into binaries. There are still binaries being built that are 386 compatible, for instance! Even when you get those instructions compiled in a lot of time there's conditional code
Re: (Score:2)
"The entire point of Gentoo is literally to compile the entire system on your system, custom-built for your hardware, for maximum efficiency for your specs."
Not necessarily. It's also good just for general customization that doesn' t necessarily HAVE to be about hardware fitting.
I used to use Gentoo because I liked to turn on every feature of every package that I possibly could without causing conflicts. There were all sorts of features that could be en/disabled at compile time in various desktop environme
Re: (Score:2)
I too use Gentoo and have since 2003. I started using it because it was the only one that had all my hardware working "out of the box" so to speak. Besides, it is a really good way to learn Linux under the hood.
Having said that, you can get some really messed up crap especially if you setup your use flags or compiler options wrong. What I do hate about Gentoo is the seemingly random masking of packages that knocks out other packages that are working just fine. Yes, you can unmask them but that is a PITA. So
Re: (Score:2)
"I thought there were options to install pre-compiled versions of the packages."
Gentoo does support that although the repositories only have binaries for a few really big packages like web browsers and desktop managers that would otherwise take a long time to compile. Those are probably the things you benefit the most from compiling though.
You can set up third party repositories. I think there might be some pre-compiled ones out there. I think there is even a way to set up one build server that builds pac
Re: (Score:3)
Pre-compiled binaries do exist as ebuilds in portage for some very large apps (i.e. libreoffice, firefox, seamonkey, etc.) however they are not very common (only ~100 ebuilds out of ~17K available on my laptop running unstable aka ~amd64) however there's another option called BINHOST that lets you take prebuild packages on one system and distribute just the binaries to other clients.
There are both public and private binhosts, however Gentoo doesn't officially provide any so you're somehwhat using them at yo
Re:I run Gentoo (Score:5, Informative)
I use Gentoo too. Most things compile in minutes. Some things such as browsers can take hours. Big Desktop environments like KDE/Gnome and also LibreOffice can take over a day each. Some people can't imagine how a Gentoo user can stand it. It's really not a problem though.
The build process never prompts you for anything, all options are chosen before it starts. It also does not require a GUI. (There are GUIs available if you want one) It's just pretty simple commands like (emerge chromium). Emerge handles the whole process, downloading source, compiling, installing and does all the dependencies too.
So... the answer to long build times is easy. Just start the build in a screen session. Then you can close the window and forget about it. It will be done when it is done, feel free to continue using your computer in the mean time. Or, not. You CAN walk away. If you are concerned about the build process running in the background slowing down your computer when you are using it for other things that's no problem either. You can just raise the nice level. It might take longer to finish but you never even have to know that the build is running.
Re: (Score:2)
I just run my updates in screen terminals and I have turned portage's nice level up a bit so I can keep doing other things. It finishes when it finishes, I don' t watch it. I don't have Chromium though and have pretty much gotten rid of everything that updates constantly and is big like that.
I do groan when I see libreoffice on the list though. But.. again, it runs in the background so no real time loss to me.
Re: (Score:2)
Potering? Is that you?
Building should not be complex. (Score:2)
There's software for auto-detection of necessary libraries (cmake is probably the best, since it's more portable than autoconf).
If you've the source tree, then you should require one single platform-dependent package containing cmake, gnu make, curl or wget, grep, cut and associated libraries, along with a text file containing a list of dependencies, where to get them and where to put them.
Your build system then scans for everything needed. If you've got it, it uses it. If you don't, it fetches the source,
Re: (Score:1)
If only someone would come along and write a new, unified make system. Perhaps "systemm" would be a nice name. As it would replace a lot of outdated and clunky UNIX tools, it could, with time, also replace all compilers (systemm.gcc, systemm.clang, etc), file system management (systemm.mv, systemm.cp, and systemm.rm) and date/time functions (systemm.time).
Re:Building should not be complex. (Score:4, Insightful)
If only someone would come along and write a new, unified make system.
This has been done. A thousand times over.
And now we have a thousand unified make systems.
Re: (Score:2)
Great idea! And in time it could be seamlessly integrated with the init system, providing an accross-the-board synergetic user experience!
Re: (Score:2)
(cmake is probably the best, since it's more portable than autoconf).
As a user of autoconfed packages, I find autoconf superior to cmake. Packages built with autoconf have standardized mechanisms for uninstallation (a cmake package may generate an install-manifest file, an uninstall target, or none of the two), to specify where to put documentation, for cross-compilation, and to fine-tune the build and the installation. With cmake, I can't even tell the package where to install libraries (most packages will allow you to do it, but each package has a different standard about
People who do this (Score:5, Informative)
There are some really great distros that are based on said sources:
Pale Moon is an open source alternative to FireFox:
http://www.palemoon.org/ [palemoon.org]
SRWare Iron is a Chromium project:
http://www.srware.net/en/softw... [srware.net]
Re: (Score:2, Informative)
SRWare Iron is not a Chromium project - it's a closed-source fork of the open-source Chromium codebase. I find it interesting that there are people who are concerned enough about privacy to switch away from Chrome/Chromium, but are still happy to use a closed-source browser which has had unknown modifications done to it.
http://www.insanitybit.com/201... [insanitybit.com]
Re: (Score:3)
I have to say, as what people here would probably regard as only an amateur programmer, the setup of a build environment and initial compiles suck up way, way more time than they need to.
It's extremely frustrating. C is a wonderful language that I love to program in. There are compilers on every platform. There are cross-platform libraries for anything I need and my favourite IDE is cross-platform.
But actually getting basic shit to work is an absolute nightmare. And that's the stuff that I'm familiar wi
Re: Well, no kidding (Score:2)
I absolutely agree.
The solution necessarily involves three mechanisms:
* Determining what is present
* Fetching what is absent
* Isolating everything that is build-specific
The "tradition" established by CPAN, CPyAN and CTAN is that source packages should specify dependencies - not only the software name, but the range of versions permitted. Archives should then permit requests for specific versions.
Isolation (such as by root jailing) deals with file path issues, software interactions, etc. All the build system
idiosyncratic is understatement (Score:5, Insightful)
Idiosyncratic builds is not limited to just browsers and is probably the biggest problem faced by Open Source projects today.
I use open source tools daily and yet with 20 years development experience I have yet to fine one open source project that straightforward to build.
Re: (Score:3)
I've always been curious about nixos.
Has anyone ever used it?
http://nixos.org/ [nixos.org]
I used to build and use Firefox nightlies on OS X (Score:2)
Funny thing is, I don't actually remember why - other than there was some feature that wasn't available in the default build back then (Keychain integration, perhaps?)
Anyway, there were a number of libraries and other packages that had to be added to the system in order for the build process to succeed... but I don't remember it being all that difficult to do. Time consuming, yes - but not difficult.
It's not that complicated (Score:1)
Just type:
emerge conkeror && emerge links && emerge lynx && emerge w3m && emerge emacs && emerge google-chrome && emerge chromium && emerge firefox && emerge wget && emerge opera
Now walk away and go make some tea.
See, not complicated at all!
Of course, that last one really just downloads a binary. But.. might as well include it too just for the completeness;
Lightweight Entry Missing (Score:2)
The Surf webkit browser source is 96kb (788kb with the full commit revision history).
Good luck with your bloat.
surf.suckless.org
Re: (Score:1)
Re: (Score:2)
Interesting. Actually, the Qt web browser is small too (but Qt itself is big). Same thing here, it uses WebKit behind the scene.
Unfortunately, does not build on OSX:
Not a Gentoo user here but... (Score:1)
...last time I tried
apt-get source --build iceweasel
apt-get source --build chromium
apt-get source --build webkitgtk
it worked perfectly fine - what's the issue?