Updated 2012-09-20 23:47:45 by LkpPo

Traditional installation of Tcl programs, libraries, etc. on Unix hosts is from sources. Users download sources, then "configure; make".

It's almost equally traditional for HP-UX, SCO, Unixware, ... users to complain that Tk doesn't generate properly. Often, this presents itself first as a compilation diagnostic like
    ../generic/tk.h:74: X11/Xlib.h: No such file or directory

Briefly, this suggests that the installed development system does not include X11 header files.

There are generally three responses to this challenge:

  • Install binary executables and libraries for Tk. The Wiki page on "binary distributions" explains more about this.
  • Install the standard X11 header files for the platform. Proprietary Unix vendors all make these available, generally on CD-ROM, although they're inconsistent both in their location and whether they're installed by default. For Unixware 7, for example, it's necessary to ask explicitly for package xdevsys (or perhaps xserver and xdrivers?) from the UDK CD-ROM. On Open Suse it's xorg-x11-devel-6.8.2-100.i586.rpm Once these are in place, generation should proceed as normal.
  • Redirection of the Tk generation to the X11 headers included with the standard Tk distribution. These files, in the xlib/X11 subdirectory, are not intended for this purpose; instead, they're a legacy item, descended from old Macintosh issues. Moreover, they still included a couple of errors last time CL looked. However, the typos are easily corrected, and it's often possible to "cd unix; ./configure --x-includes=pwd/../xlib/X11; make; ..." (season to taste) successfully. Anyone who has difficulties with this is welcome to contact CL.

Also note that recent versions of Critcl include Tk and X11 headers sufficient to build Tk extensions. Use the "critcl::tk" command to make them available - stevel