Making Gnash: a well-deserved name?
By Mitch Meyran
Gnash is the Free Software Foundation’s alternative Adobe Flash player. Version 0.8 is the third alpha release, and frankly, it rocks! It is also one of the first projects to be covered by the GPLv3.
Originally based on GameSWF, it is a reimplementation of Macromedia/Adobe Flash version 7, with some stuff from Flash 8/9 added. It is, right now, the most advanced free software implementation of Flash. And, as a matter of fact, it actually works well in many cases.
GNASH 0.8 is out. It is officially the third alpha release of the GNU Flash player. What’s cool about it:
* x86-32, x86-64, PPC (and others) systems are supported
About version 0.8 (overall, alpha 3 of Gnash)
What’s new over Gnash 0.7.2 (alpha 2):
* it can be compiled with ffmpeg+SDL support
What does it mean? Well, basically, users of PPC Debian can now watch YouTube without a virtual machine :D
Jokes aside, Gnash is, right now, the best third-party Flash player and debugger one can get. Coupled with Adobe Flash’s tentative opening (the ActiveScript Virtual Machine 2.0 has actually been freed by Adobe and is now hosted by Mozilla as an ECMAScript 4.0 ongoing implementation, which should come final for Firefox 4.0) this may bring some renewal for Flash, which it needs now that Microsoft is getting serious about hijacking the Web vector authoring market with Silverlight.
Figure 1: Mozinor's 007 hijacking on YouTube on Firefox 64-bit, Sambakza's Cake Dance on the standalone player, version information in terminal window: Gnash is compiled to use OpenGL and Gtk
What you need
Download the latest Gnash tarball in here or you can try a CVS extract if you want the very latest version of the code (but then you probably won’t need this article) with
cvs -z3 -d:pserver:firstname.lastname@example.org:/sources/gnash
Be aware that in that case you’ll need to create ./configure yourself. I won’t cover that in this article though!
The following libraries and headers (more may be necessary, but those are the ones I’ve noticed as missing from my build machine) are needed; for a more complete list, merely run ./configure and check its output, missing/wrong dependencies are explicitly given with their consequences.
The most prominent dependencies are here:
* boost 1.32+ - essential, as Gnash relies heavily on Boost
What decoder should you use?
* ffmpeg+SDL can decode both audio (mp3) and video (flv, On2) in a Flash file
What renderer should you use?
* OpenGL is default and hardware-accelerated (use it for casual browsing with little CPU use) - requires SDL
And about the GUI...?
* Gtk - required if you use Cairo, best supported option
Other dependencies are (complete list):
Since I want to meet a very selfish goal, that of having a standalone player and a video-enabled Firefox plugin without debugger, I built the player with the following options:
./configure --disable-debugger --enable-media=ffmpeg
However, due to my use of a Mandriva 64-bit system, it choked on the 32/64 bit OpenGL dual installation. Thus I first tried pointing configure towards /usr/lib64 with
without success. Then I tried
which should force ld into looking for all libraries and headers in a single directory. It didn’t work either.
So I moved those offending files away and restarted make which resumed from the point it choked on before.
The next step is building Gnash; when configure is successful, it requires a simple make.
The build takes a little while, depending on how fast your system is. If you want to build the test suite too, type: make test
You’d better enable the debugger for such a build. Once all is done, just type (as root) make install.
Please note that this will put the Firefox plugin in an invalid location (such as root's local Firefox directory); you may prefer putting it somewhere else, so that every account on your system can reach it, or merely create symbolic links in user accounts’ local firefox settings.
Personally I put it in /usr/lib64/mozilla/plugins.
Rejoice AMD64 and PPC owners! If you didn’t want to switch to GNU/Linux full-time because you missed your daily shot of YouTube, now you can have your cake and eat it too.
This blog entry is (C) Copyright, Mitch Meyran, 2004-2006. Unless a different license is specified in the entry's body, the following license applies: "Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved and appropriate attribution information (author, original site, original URL) is included".
Mitch Meyran: Mitch is a Management graduate. He fell into computers when he got a 8088-based PC, and soon found out that tinkering with computers is almost as fun as using them - provided the OS lets you do it.