After writing something yesterday that might be construed as less-than-complimentary to Amarok (alternative interpretation: “delivering a revolutionary platform that forms the basis for further innovation”) I hung out on the Amarok IRC channel for a while to double-check compilation requirements and chat about gcc-isms.

Yes, you really need MySQL embedded; Solaris ships with the plain old server, but not embedded, so get the 5.1 GA (Generally Available or Grotesquely Awful, depending on whose blogs you read) package from and install it so that you get /opt/mysql. Install the KDE4 bits as well, such as KDEbase-workspace, and then you can build Amarok. Now that there’s a SysV specfile for it, it’s a straightforward build; as always the patches are available from our Mercurial repository.

No, I’m not publishing binary packages just now. No, there are no IPS packages planned. But know that Amarok on OpenSolaris is possible and works, too – works as well as I ever got it to work on FreeBSD, at least, which means it will play songs; none of the collection scanning does anything useful, though, as it rattles through 22GB of music and movies and finds nothing . Adding the files one by one by hand does work. That’s something to debug some other day. I haven’t tried any other features of it, as my normal music player is ogg123.

Let’s take a moment to consider the patches themselves, since they’re typical of what gets changed in any large chunk of KDE code when it’s ported to another compiler and another platform.<ul><li>Three const-match patches fix the difference in constness between the declaration of a method and its definition; this is needed because Sun Studio mangles the constness into the name and gcc doesn’t. Also, being consistent is important.</li><li>Finding MySQL on Solaris needs an extra directory to be searched; this might be handled better by me following Alex Neundorf’s advice</a>.</li><li>free() is declared in stdlib.h, so remember to include it because not every set of system headers is so accomodating as the Linux ones. Similarly, gcc ignores a ; in some locations that other compilers are not so lenient, and Linux defines u_int types where the standard is uint.</li><li>One happy constructory (calling the constructor of class A as A::A() instead of A()), one extern placed inside a namespace (so the externed name is in the namespace and not outside it), not sure how gcc is supposed to handle this.</li><li>The scriptengine gets one micro-optimization from me and lots of massaging for declaring nested anonymous types, which gcc accepts and which SS12 doesn’t – I have a similar gigantic patch for KInfoCenter’s PCI module.</li><li>And there’s a “rest” which is “all the patches that are really crude hacks around broken bits elsewhere.”</li></ul>

So there you have it: the killer audio application on Solaris, in under 20k of patches. Congratulations, Amarok team.

The Wayback Machine does not archive everything. Broken links are marked with a 💔.