Building All the Major Open-Source Web Browsers
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."
" 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."
This is still a yawn of a summary.
Is it just me or isn't there hardly an content in that blog-post? What is the significance?
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.
frequent contributors.
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.
One of the things I like about the Qupzilla web browser is it is fairly easy to build. Assuming you have the Qt development libraries installed and a C compiler, the build process is very simple. With Qupzilla it's a matter of downloading the source, running "qmake" and "make" to build the source code. No weird build systems or exotic libraries required.
So it's simply emerge --update world* but I always groan when I see Chromium has a new version, which it does almost weekly, because it takes approximately FOREVER to compile. Firefox and Seamonkey take a long time, sure, but Chromium, yikes, come back tomorrow.
*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.
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, builds it and installs it.
This is not rocket science. Gentoo has been doing something similar for a very long time, so has Perl, so has Cygwin and Cygwin-based packages like OSGEO4W.
Yes, it's slow. Yes, it means the browser maintainer has to have a text editor. Yes, it's going to be as painful and agonizing as installing X11R4 or GateD. I did both. On a 386SX-16. Uphill. Both ways. In the snow. If you can't write your code properly to begin with, get off my lawn!
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
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/
SRWare Iron is a Chromium project:
http://www.srware.net/en/softw...
This highlights something I've been saying for literally decades: Just because some project is 1005 open source doesn't mean that it's reasonable to tell someone they can get whatever change they want in a piece of software by coding it themselves. And no, I'm not talking about the painfully obvious fact that most software users aren't programmers.
I've been an active programmer (as a professional, hobbyist, or both) since the late 1970's, and I've run into this problem in one form or another more times than I can count. Sometimes it's an open source project, sometimes it's closed source that someone inside the developing company needs/wants to change. All too often getting and using the right tools is a horribly difficult, bordering on impossible, task for anyone but the original developers.
To borrow a term from economics, this hurdle creates a high barrier to entry in terms of the education and time investment needed for people who often want to make very minor changes to software.
What's the command to download and install a desktop application package (in this case Visual Studio Express) from Microsoft's repository?
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.
Thats the way the NSA likes it, hard to compile, complex make systems allow stuffing 'hidden' code/links in, if noones 'sure' all the code is even there correctly they just celebrate when it builds and don't dig too deep into all the little icy fingers in the pie.
Git builds fine. Tcl does too. Many, many things work with nothing more than tar xvf..; ./configure; make; make install.
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.
#DeleteChrome
A long time ago I think it was called Services For Unix or SFU for short, except that everytime I saw SFU being brought up as a "Unix" compatibility layer for Windows, I always read it as "STFU" or "Shut The F*&^@ about Unix!"
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;
The Surf webkit browser source is 96kb (788kb with the full commit revision history).
Good luck with your bloat.
surf.suckless.org
The blog author was actually trying to build on a supported platform (Mac OS X) for those browsers. If you're on the big three (windows, mac, linux), it's actually possible to checkout the source and attempt to build provided all the magic libraries and versions of things are there. However, for the rest of us, it's a nightmare of patches and hacks to get chromium or firefox to build. Worse yet, they're not good about taking upstream patches. Consider that it took a significant effort to get chromium even running on FreeBSD and there's a big patchset floating around for it. The actual code isn't that bad, but the build system is a piece of shit.
Then in firefox land, they decided it would be fun to embed os version checks through all the source. Particularly bad is the "security manager" as it is a nightmare to find all the magic references. They also have broken switches to turn on and off features in Firefox. You can't build without html5 video support and that source has it's own crazy os version handling too.
...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?