Gnash on OpenSolaris

Gnash running on OpenSolaris

It took about a day to get Gnash built and more or less running on OpenSolaris. Surprisingly few dependencies are missing, but the ones that are (mainly the Boost C++ libraries) aren't that easy to build.

So the packages I needed to build were:

  1. bazaar (for retrieving Gnash trunk)
  2. bjam (for building boost)
  3. boost 1.37
  4. AGG 2.5 (Anti-Grain Geometry renderer)
  5. libgif

Only three compiled libraries are necessary from Boost: serialization, date_time, and thread. The rest are header-only. After hacking the bjam gcc toolset to work with the ancient OpenSolaris gcc (3.4), it built and installed.

For AGG, it's crucial that pkg-config is installed. If not, the configure script won't complete. This is in the SUNWgnome-common-devel package. Also necessary is the package FSWxorg-headers for the X11 layer.

The minor changes to Gnash sources needed for building on OpenSolaris are now in the repository, so Gnash should build out of the box. The remaining problem is linking, which right now still requires manual tweaking of Makefiles.

For reasons that aren't entirely clear to me, the mallinfo() symbol is needed but missing when compiling executables. Adding -lmalloc to the relevant LDFLAGS fixes that. For gtk-gnash, -lgdk_pixbuf-2.0 is missing. That seems like an OpenSolaris bug. Worse, -lgio-2.0 also isn't added to the linker flag, and this causes a segfault during gtk initialization. Edit 2009-03-03: install the SUNWxorg-headers package to fix the gtk linker flags. Without it, pkg-config lacks xrandr.pc and for whatever reason doesn't add all the necessary libraries.

But once Gnash is built with those tweaks, the standalone builds and runs. I still have problems due to a missing audio device (running OpenSolaris under VirtualBox), and the Mozilla plugin isn't yet working well. These are probably minor issues.

Gnash configure options: configure --enable-media=gst --enable-renderer=agg --enable-gui=gtk

Tip: make sure pkg-config is installed during Gnash configure. If it's not present, configure will still succeed, but compiler flags needed by dependencies will be missing.

mallinfo fixed

Gnash's memory statistics gathering code uses mallinfo() and is built whenever it is available on the system. That was the reason for the linking error. I've updated to search properly for the mallinfo symbol instead of assuming it's in libc, so building and linking is now out-of-the-box.