TkStep issues

"I'm having problems with tkstep..."

Stop! Before you go any further, think about upgrading your TkStep to release 8.0p2, as listed above. It solves almost all of the problems with the earlier versions and adds some great new features.

Next! Have you used RPM distributions of TkStep? If so, please try to build your own. 90% of the problems peaople encounter with TkStep can be traced to incorrect or incompatible RPMs. It really is easy to build your own, so please try it.

If you are unable to get Postilion to work with TkStep, see if it will work with plain Tk. If it will work with Tk but not with TkStep, then your TkStep is broken.

Return to table of contents


How do I install TkStep?

Here are full instructions to getting and installing TkStep4.2-5:

Note: TkStep has been upgraded to 8.0, and I have not yet had time to write updated instructions.

Get the new distribution from Oliver Graff's page,
I got the "patch to tk4.2p2"
and the "extra files for tk4.2p2"
You will also need the JPEG and TIFF and Zlib libraries.
If you don't already have it, get the XPM library.
Get the standard tcl7.6/tk4.2 distribution.

Install the JPEG, TIFF, ZLIB and XPM stuff according to their instructions, they are really straightforward, so I won't repeat them here. The rest of the process is,

  1. Make a directory to untar the packages into, I used ~/src/tcltk
    mkdir ~/src/tcltk
  2. Copy all of the tcl/tk and tkstep files into this new directory, and cd to it.
    cp tk4.2-5-step.patch tk4.2-5-step-extras.tar.gz tcl7.6p2.tar.gz tk4.2p2.tar.gz ~/src/tcltk ; cd ~src/tcltk
  3. Extract the tar files for tcl and tk
    tar -zxvf tcl7.6p2.tar.gz
    tar -zxvf tk4.2p2.tar.gz
  4. Install tcl7.6p2:
    cd tcl7.6/unix; configure --enable-shared ; make ; make install
    (or just read and follow the instructions)
  5. Install tk4.2p2:
    cd tk4.2/unix; configure --enable-shared ; make ; make install
    (or just read the instructions)
  6. Run the test programs that come with tk
  7. For tk4.2, do a make clean from ~/src/tcltk/tk4.2
  8. Apply the tk4.2-5-step.patch like this;
    from the ~/src/tcltk directory run patch -p <tk4.2-5-step.patch
  9. Extract the step-extra files:
    tar -zxvf tk4.2-5-step-extras.tar.gz
  10. Install tkstep:
    cd tk4.2/unix; configure --enable-xpm --enable-tiff --enable-dnd --enable-fullstep --enable-shared ; make ; make install
  11. Copy the tkstepConfig.sh from whatever directory you installed it into (like /usr/local/lib) into the tkstep4.2 subdirectory as tkConfig.sh.
    cp /usr/local/lib/tkstepConfig.sh /usr/local/lib/tkstep4.2/tkConfig.sh
  12. cd to the postilion directory
  13. Install postilion:
    configure; make ; make install

If you must use an older version of TkStep, read on...

From an e-mail I recently sent out:

To all of you having TkStep problems, or problems compiling Postilion, help is on the way! If you are having problems like this:

On 17 Jul, Clarence Washington Jr. wrote:
> Sorry to bug ya but.... I couldn't get it compiled
>
> ratAppInit.o: In function `RatAppInit':
> /home/test/postilion/lib/ratAppInit.c:291: undefined reference to `tkImgFmtXPM'
> make[1]: *** [postilion.exec] Error 1
> make[1]: Leaving directory `/home/test/postilion/lib'
> make: *** [install] Error 2

This is problem with TkStep and Tk (no step) both living on the same system. I didn't notice this problem at first because when I first started the Postilion project I ended up linking libtkstep4.2.so to libtk4.2.so, and linking wishstep4.2 to wish4.2. :<( My apologies!!

The fixes:
1) if you are getting this message:
"/usr/local/lib/libtkstep4.2.so: undefined reference to XpmCreateXpm"

There is a problem with the tkConfig.sh file from TkStep 4.2. I've notified Oliver Graf, and he will change it in his next release. It's a fairly simple fix, find your tkConfig.sh file (mine is in /usr/local/lib) and look for the line that says:

TK_LIBS='-L/usr/X11R6/lib -lX11 -ldl -lm'
and change it to:
TK_LIBS='-L/usr/X11R6/lib -lX11 -ldl -lm -lXpm'

While you're in there, look for the line that says:

TK_LIB_FILE=libtk4.2.so
and change it to:
TK_LIB_FILE=libtkstep4.2.so

and look for the line that says:

TK_LIB_SPEC='-L/usr/lib -ltk4.2'
and change it to:
TK_LIB_SPEC='-L/usr/lib -ltkstep4.2'

Then, save this file as /usr/local/lib/tkstep4.2/tkConfig.sh, (or /usr/lib, or whatever it is on your system) just to keep some sanity. Re-run configure after doing this, or the changes will not take effect!

2) If you're getting this message:

home/test/postilion/lib/ratAppInit.c:291: undefined reference to `tkImgFmtXPM'"

This means that configure is using the wrong tkConfig.sh file, or that you compiled TkStep without the --ENABLE_XPM switch.

Put the tkConfig.sh file from TkStep somewhere other than in the same directory as the standard tkConfig.sh, and use the --with-tk-config=DIR switch with configure.

-AND/OR-

If your tkConfig.sh file is from the original tk installation, rename that to something else, and link your tkConfig.sh file from TkStep to tkConfig.sh.

-AND/OR-

Recompile TkStep using --ENABLE_XPM

3) PRIOR to running configure, set an environment variable "wish" to point to the wishstep binary, such as:
(bash) # export wish="/usr/local/bin/wishstep4.2"
this tells configure to use wishstep4.2, and not the one named wish4.2.

This should help with most problems. I intend to alter the configure scripts for Postilion (as soon as I figure out how!) but this should help until then. This is a generic TkStep vs Tk thing, it should work with other problem compilations people have been experiencing.

I will be providing links and installation intructions for all needed support libraries in due time.

Return to table of contents


Nic Bernstein
Last modified: Sat Feb 21 19:10:49 CST 1998