Monday, March 20, 2006

Fun and games with WebDot and Fedora Core 4


Well, that was fun. I've just installed AT&T's WebDot, a Tcl CGI program for generating images of graphs on the fly using Graphviz. Although there are RPMs for Fedora Core 4 available from AT&T's site, they didn't work. Here's what I did to get this working:


  • Installed Graphviz from the RPM.

  • Installed WebDot from the source tarball, not the RPM.

  • Failing to read the instructions (like, who does that?) I neglected to install graphviz-tcl-2.8-1.fc4.i386.rpm (Graphviz Tcl). I tried to do this but it complained about a lack of Tk

  • For reasons unbeknownst to me, I didn't have Tk installed (but did have Tcl), so off to the Fedora Core FTP server to grab tk-8.4.9-3.i386.rpm.

  • Now graphviz-tcl-2.8-1.fc4.i386.rpm installs happily, but still no joy.

  • Running Webdot from the command line

    cd /var/www/cgi-bin
    ./webdot

    produced some meaningful error messages at last. The script couldn't find a Tcl shell because the script was looking for Tcl 8.3, and Fedora Core 4 has 8.4. Hence, I edited the first line of the script accordingly. Then it complained about not finding libtcldot.so.0.0.0. Turned out the script thought this library was in /usr/lib/graphviz/, whereas the RPM had put it in /usr/lib/graphviz/tcl (sigh). So, the first two lines now look like this:

    #!/usr/bin/tclsh8.4
    set LIBTCLDOT /usr/lib/graphviz/tcl/libtcldot.so.0.0.0


  • OK, the webdot script now runs, but no images of graphs. One useful hint is to try and view the images WebDot generates, even if they look like missing images (i.e., there doesn't seem to be anything there). Sometimes useful error messages are displayed, in this case I saw a message about missing fonts.

  • Having gone through this particular version of hell a while ago when putting WebDot on a RedHat 8 box, I remembered we need some TrueType fonts. AT&T have these on the Graphviz web site, but as a tarball with no instructions what to do with them. I still had the RPM I used on the RedHat 8 box (you can grab it here), so installed this (which puts the fonts into /usr/X11R6/lib/X11/fonts/truetype/).

  • Now, it works (yay!).


Isn't software fun? By the way, the nice icon in this post comes from pixelglow's wonderful port of Graphviz to Mac OS X. After the fun with Fedora, it's back to my Mac...

1 comment:

Anonymous said...

Just wanted to say thanks for saving me some time today :)