CentosCompileXlhtml

How to compile xlhtml and ppthtml under Centos

Yes, it's that time of the year again, when a stupid freaking IDIOT whines: ''But, but... I really need xlhtml and ppthtml to index the content of my web site!! Bwaaahaaaa! Mommy! The mean system administrator is mean with me!!''.

To which I can only reply: ''SHUT UP!! I am PAID to be mean to intellectual midgets like you!!''.

Once the calm has returned to the open space, it is now time to compile this piece of sh____ that is xlhtml. Sheesh. Kids these days.

And what on earth is xlhtml and ppthtml, I hear you say? Well, kind Sir, just two little pieces of sh____ that extract text contained in .XLS (Microsft Excel) and .PPT (Microsoft Powerpoint) files and allow other software to index them - at least, based partially on their content. In other words, totally useless. Or, said otherwise: Microsoft, when you thought you had finally gotten rid of them...

OK, anyway, here is how to compile both under Centos 6.2 - please make sure you follow every step:

1. Run configure

Should be simple, right? WRONG.

[root@galactus xlhtml-0.5]# ./configure
checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
configure: error: /bin/sh ./config.sub x86_64-unknown-linux-gnu failed.

Oh, brother.

Essentially, this is due to the fact that xlhtml piece of sh__, is severely out-of-date and does not understand the output of the latest version of uname:

[root@galactus ~]# uname -a
Linux galactus.example.com 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux

Ah, OK, no x86_64 existed way back in 2002...

The solution is not that hard to figure out, but it does require a bit of searching (see below, the section titled "See Also"):

[root@galactus ~]# ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu

The GNU configuration should now proceed correctly.

2. Run make

OK, now GNU Make should be able to work correctly, right? Right?

WRONG!

[... lots of make stuff here ...]
checking for strip... strip
configure: creating ./config.status
 cd @top_builddir@ && /bin/sh ./config.status Makefile
/bin/sh: line 6: cd: @top_builddir@: No such file or directory
make: *** [Makefile] Error 1

Ouch! Now is the time for vim to come to the rescue! Look into the top source directory and edit the ''Makefile'' as follows:

You should simply edit the following line:

top_builddir = @top_builddir@

And replace it with this one:

top_builddir = .

Yes, that is a dot ''.'' at the end of the line. How stupid is that? Very.

Now, make should be able to proceed... Right?

3. Missing cole dependencies

Oh yuck, yet another problem:

[... lots of make stuff here ...]
cd .. && automake-1.11 --gnu cole/Makefile
cole/Makefile.am: required file `./depcomp' not found
cole/Makefile.am:   `automake --add-missing' can install `depcomp'
make[2]: *** [Makefile.in] Error 1
make[2]: Leaving directory `/root/xlhtml-0.5/cole'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/xlhtml-0.5'
make: *** [all] Error 2

Thankfully, this is a lot easier to solve, since the message above contains the solution! Simply type the following in the top xlhtml directory:

[root@galactus xlhtml-0.5]# automake --add-missing
cole/Makefile.am: installing `./depcomp'

And now, and only, now, you can go through the entire ./configure && make && make install which will install the whole thing on your machine.

Victory, at last! ;-)

4. The summary (aka: TL;DR)

Do the following:

[root@galactus ~]# ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu

Then, edit the Makefile as noted above.

Then:

[root@galactus xlhtml-0.5]# automake --add-missing

And run:

[root@galactus xlhtml-0.5]# ./configure && make && make install

All right, there you go you idiot user, here is your xlhtml:

[root@galactus xlhtml-0.5]# xlhtml --version
xlhtml 0.4.9.3 
Copyright (c) 1999-2002, Charles Wyble
Released under GPL.

(Way back from 2002 - Sheesh...)

I hope this helps someone out there...

See Also: