Quantcast
PCWorld.com is upgrading some back-end systems. Some site features, such as user registration, may be temporarily unavailable.

Blogs

    Free Agent

  • Matthew Newton keeps a watchful eye on Open Source and Free Software, and shows that you don't need commercial apps to get the job done.
  • Subscribe to this blog

Free Agent: How to Compile Free Software Apps

Matthew Newton, PC World

Once More Unto the Breach

To have an easier time with Gaim, I installed a whole bunch of common development libraries when I compiled Rhythmbox. Once again, step one was to download the source code to my desktop and extract it into a folder. Then I opened a terminal window and used the cd command to switch to the folder I had just created:

cd Desktop/gaim-2.0.0beta3.1

And then, Magical Incantation 1:

./configure

To my happy surprise, Gaim's configure didn't quit on me at all, instead running straight through to the end and reporting on what I was ready to compile. But I noticed this line:

Build with Audio support...... : no

Well, that wasn't good. I expected my IM client to make noise when a message arrived--that feature was nonnegotiable! So I searched through the rest of configure's messages, looking for a clue as to why audio support was disabled. I noticed that configure was unable to find something called "ao"; when I searched for "ao" in Synaptic, I discovered libao-dev, which has the title "Cross Platform Audio Output Library Development." It sounded like a definite possibility, so I installed that package and ran configure again to find that audio support was now ready to go.

Similarly, I noticed this:

Build with GtkSpell support... : no

GtkSpell support is what allows Gaim to provide on-the-fly spelling checking in my message windows. (GtkSpell is a system component that provides this functionality to any app that requests it. Remember up above where I described Free Software as an ecosystem? Here's a perfect example.) I wanted that, so I searched Synaptic for "gtkspell" and found libgtkspell-dev. I installed it and ran configure again. All looked good. So, it was time for Magical Incantation 2:

make

The compiler did its thing for a good many minutes; myself, I went to mash avocados for guacamole. When I returned, I saw the compiler had finished:

Generating and caching the translation database
WARNING: ./po/my_MM.po is not in UTF-8 but iso-8859-1, converting...
WARNING: ./po/tr.po is not in UTF-8 but ISO-8859-9, converting...
WARNING: ./po/nb.po is not in UTF-8 but ISO-8859-1, converting...
WARNING: ./po/en_GB.po is not in UTF-8 but iso-8859-1, converting...
WARNING: ./po/it.po is not in UTF-8 but iso-8859-1, converting...
WARNING: ./po/pl.po is not in UTF-8 but ISO-8859-2, converting...
Merging translations into gaim.desktop.
make[2]: Leaving directory '/home/mnewton/Desktop/gaim-2.0.0beta3.1'
make[1]: Leaving directory '/home/mnewton/Desktop/gaim-2.0.0beta3.1'

Don't be put off by all the warnings; they're often par for the course with a compiler. As long as you don't see 'error', you're probably okay.

It was time to install my custom-compiled Gaim. But instead of doing so manually with sudo make install, I used a utility that would make the package manager aware of what I was doing. The benefit of this will become apparent in a moment.

First, I needed the utility in question. It's called checkinstall, and it's available in Ubuntu's "Universe" software repositories. I enabled these repositories in Synaptic by selecting Settings, Repositories, checking the box beside all four entries marked 'Community maintained (Universe)', and clicking Close. Then I scrolled to the checkinstall listing and installed the tool. Once I was done, I closed Synaptic, because the command I was about to issue would fail every time if I left the package manager running.

Returning to my terminal window, I entered Alternative Magical Incantation 3:

sudo checkinstall

The checkinstall utility will ask you a yes/no question about technical documentation; go ahead and answer with an N. It will also ask you for a description of the package you're building; in this case, I entered Gaim version 2.0 beta.

Next, checkinstall builds a packaged version of your custom-compiled app, and feeds that to your package manager. When the job is done, you'll see a message in your terminal, including some instructions for removing the package from the command line at a later date. You needn't remember those instructions, however, because the package you just built will show up in Synaptic.

At this point, I opened Synaptic to find that a search for "gaim" turned up the custom package that checkinstall had just built and installed. I can remove that package from the system cleanly at a later date simply by right-clicking it, selecting Mark for Removal, and then clicking Apply.

As far as immediate housekeeping goes, I can move the downloaded source code (both the .tar.gz and the extracted folder) to the trash. And if I'm feeling superconscious of my disk-space usage, I can also fire Synaptic back up and remove all the development libraries I installed to make the compilation work; these packages are not necessary for day-to-day execution of the apps I built.

But the more of them I leave hanging around, the easier my next compilation will be. So if you find yourself needing to stay on the bleeding edge with a couple of apps, leave their development libraries installed after your first successful builds. When your apps are updated, you can just download new source code, extract it, and perform the Three Magical Incantations:

./configure
make
sudo make install OR sudo checkinstall

... and before long, you'll be over Linux's lack of SETUP.EXEs.

Matthew Newton is PC World's QA engineer and unofficial Linux guru. This month's column is a direct response to a question that has cropped up in the Free Agent mailbox from time to time. If you're new to Linux and feeling a bit lost in one way or another, let the Free Agent know what's vexing you. Speak Freely!

  • Recommend this story?
  • 0 Yes
    0 No

"Free Agent: How to Compile Free Software Apps" Comments

Learn more about the Windows Phone PCWorld Gift Guide

Focus on Personal Productivitysponsored by Microsoft

  • Personal Finance 2.0 These free and fee-based Web services not only aggregate data from your online bank accounts, they give you tools for managing your money.
  • High-Tech Travel Tips Plenty of stories provide advice for elite mobile professionals. But what about you, the unproductive traveler?

People who read this also read:

All PC World Blogs

Sponsored Links