configure, make, make install

I am not sure if any one area of using a *nix system got to me more than ./configure, make, make install. I finally understand it, and yeah, pretty damn easy. For whatever reason I had a mental block on being able to remember those commands–and even if I did what order they went in. I have to credit the all-knowing The Linux Documentation Project (TLDP) for finally saving me on this one. An article written in 2003 on the subject made things click.

As luck would have it, I happened to need to install a new program, extract_chmLib. This program uses the chmLib library to extract html files from chm files. I had a few books in my personal collection that I wanted to have available online but they were in chm format. While I could boot into my XP install on VMWare and do the extraction, I’d really rather stay on the GNU/Linux side of things .

Not much info was out there on Google, but I did manage to find The Mad Philosopher’s blog that discussed his difficulties with getting extract_chmLib to work. He was able to install 0.35, but the most recent version is 0.39. I followed his steps, which immediately clicked with my reading of the TLDP article. I finally felt like I may be getting somewhere with ./configure, make, make install.

The philosopher’s site had an extra step, though, that got me stumped but made me feel quite victorious by the end of the evening. After “make install” was run, “make examples” was supposed to be run. The “make examples” command was supposed to add a few other programs to give chmLib more functionality. Now, I admit I was quite poor at the configure, make, make install sequence before tonight, but I had never recalled adding additional makes to the list.

At some point I decided to install 0.35 and see how that worked. Well, it didn’t. I got “make examples” to work just fine, but the program didn’t actually do anything. The man page is very straight-forward with no options to give, and no errors were showing up. The program acted like the chm was being converted to html files, but no such files appeared.

I decided a break was in order, so I got a Guinness and started to read about Apache configurations. I really know how to take a break, don’t I? I stop installing programs from source and relax with web server configurations. As I’m reading through a part on installing the mod_ssl library in Apache, I see a part about passing commands to ./configure. The light bulb immediately pops on and I jump back to my terminal.

Enabling examples in the configure step as opposed to adding another make step worked perfectly. So I test the program–which automatically was placed in /usr/local/bin as opposed to the “make examples” version which I had to symlink there–and all things are go. I had html files in seconds and scp’d them to my web directory.

I have made many of those types of connections when using Linux over the past two years. One minute something can feel completely foreign, and the next it is a basic part of your tool-belt that feels like it has been with you for years. Now I’ve got the basics of ./configure, make, make install down, and even added some intermediate usage, too.

Here is the usage to get extract_chmLib working (at least in Fedora Core 5). First download the program from the extract_chmLib link above. Next move the file to the directory of your choosing. Now just type:

$ tar xvf chmLib-0.39.tar.gz

$ cd chmLib-0.39/

$ ./configure –enable-examples

$ make

$ make install

That’s it. The extract_chmLib program is available in the /usr/local/bin directory. It works like this:

$ extract_chmLib <chmfile> <newdirectory>

Enjoy the program and keep making new GNU/Linux discoveries of your own.

Explore posts in the same categories: foss, linux, open source, sysadmin

Comment:

You must be logged in to post a comment.