[torqueusers] patch for tclx8.4

Martin Siegert siegert at sfu.ca
Sun Mar 5 12:42:12 MST 2006


On Sun, Mar 05, 2006 at 12:23:48AM -0800, Garrick Staples wrote:
> On Sat, Mar 04, 2006 at 01:47:44PM -0800, Martin Siegert alleged:
> > Hi,
> > 
> > attached is a patch intended to make torque work with tclx version 8.4
> > when configured with
> > 
> > --enable-gui --with-tclx
> > 
> > This has been tested on SLES 9 on powerpc64 with tclx 8.4 and on RH 7.3
> > on i686 with tclx 8.3.
> > 
> > [some of the changes in configure are just changes to white space:
> > in order to analyze the configure script I changed the somewhat random
> > indentation in configure to a more regular pattern.]
> Can you submit again without the white space changes?  There's not much
> point in patching configure because it is supposed to be a generated
> files.  Also, 2.1.0 has an entirely new build system now.

Perhaps ... some time later today. "supposed to be" currently means that
configure is not generated, correct? Thus, it does not hurt to make it
[btw., I am not quite convinced of the new build system yet. Anything that
uses libtool makes me shudder ... everybody who tried to compile using
xlc/xlf probably knows what I mean. Fortunately, this is not much of
an issue with torque as I can simply use gcc. I'll test 2.1.0 as soon as
I find the time. Probably somtime next week.]

> > --- torque-2.0.0p8/src/tools/pbsTkInit.c.orig	2006-01-27 10:42:05.000000000 -0800
> > +++ torque-2.0.0p8/src/tools/pbsTkInit.c	2006-03-04 10:36:46.906960773 -0800
> > @@ -120,9 +120,11 @@
> >  #if	TCLX
> >  	if (Tclx_Init(interp) == TCL_ERROR)
> >  		return TCL_ERROR;
> > +#if !defined(CONST84)
> >  	if (Tkx_Init(interp) == TCL_ERROR)
> >  		return TCL_ERROR;
> >  #endif
> > +#endif
> Can you explain this change?  Does 8.4 not have a working tkx?  Why use
> --with-tclx if you are #ifdef'ing out the tkx support?  Just use
> --without-tclx if you don't want it?

8.4 has no tkx. Thus, #ifdef'ing out the tkx stuff enables tclx support.

>From the tclx8.4 docs:
TclX 8.4 differs from its predecessors in that it is based more on the
idea of TclX as an extension to Tcl, and not an alternate environment.
There is no TkX and no stand-alone shells are built. The tkx*8.4 packages
therefore don't exist anymore.

> Other then testing for lib64 on ppc64, what is the specific problem that
> is being solved?

Currently configuring/compiling with --enable-gui --with-tclx is completely 

* there is no string TCLX_VERSION in tclExtend.h (configure looks for
  this and exits when not finding it)
* reference to Tkx_Init breaks the compile
* -ltkx... breaks linking.

And just to reassure you: by now I configured/compiled on x86_64 and the
patch works there as well.

Somewhat unrelated (other than breaking configure/linking of the graphical
tools): configure contains the line


but with_x11 is set nowhere and therefore this produces a -L in the
linking stage with no argument. Effectively this -L interprets whatever
comes after it on the link command line as a library directory with
unwanted results. I replaced this with


Then there is the following section in configure:

    if test "$count" -lt 1; then
        TCLX_LIB_VER=`echo $TCLX_LIB_VER | sed -e 's/\.//'`
        count=`/bin/ls $TCL_DIR/lib$libsuff/libtk${TCLX_LIB_VER}.* | wc -l`
        if test "$count" -lt 1; then
            { echo "configure: error: cannot find a TclX library for version $TCLX_VER" 1>&2; exit 1; }

I left this untouched since I have no way of testing this, but I doubt that
this was meant to be this way. I would expect

        count=`/bin/ls $TCL_DIR/lib$libsuff/libtclx${TCLX_LIB_VER}.* | wc -l`



More information about the torqueusers mailing list