AIX work around to tkined hang with <bitmap "icon" not defined>

Scott Danielson (danielss@uhc.com)
Wed, 1 Jan 1997 20:51:28 -0600 (CST)

First of all I don't claim to be a programmer so the corrections I made here to get scotty to work should first be reviewed by a qualified programmer. Like many others I ran into a few problems when compiling and running scotty on AIX, such as:
1. Many compiling errors, do to missing libraries.
2. A linking warning, "ld: 0711-327 WARNING: Entry point not found: __start".
3. The biggy: 'bitmap "icon" not defined', causing tkined to hang, i.e. no window.

The following is a brief description of how I worked around these problems on my AIX 4.1.4 system. I used the gcc 2.7.2.1and is ld to get around the __start error, however there may also be a work around with the AIX ld, I just don't know what it would be.

----------------------------------- TCL SECTION ------------------------------------------
1. The ld which came with gcc worked for tk where /bin/ld didn't
2. Added the flag -bnoentry to correct the "ld: 0711-327 WARNING: Entry point not found: __start" error.
3. Changed the TCL_SHARED_LIB_SUFFIX from .a to .so, THIS WAS THE ACTUAL FIX TOO: 'bitmap "icon" not defined'. When compiling tcl, no libtcl7.x.so was being created.
SEE below diff of configure

$diff tcl7.6/unix/configure tcl7.6-working/unix/configure
3177c3176
< SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -
T512"

---
>       SHLIB_LD="$fullSrcDir/ldAix /usr/local/bin/ld -bhalt:4 -bM:SRE -
bE:lib.exp -H512 -T512 -bnoentry"
3185c3184
<       TCL_SHARED_LIB_SUFFIX='${VERSION}.a'
---
>       TCL_SHARED_LIB_SUFFIX='${VERSION}.so'

Note about changes:

Configure options $./configure --enable-gcc --enable-shared

------------------------------------------ TK SECTION ---------------------------------------- NO CHANGES MADE to TK

Configure options $./configure --enable-gcc --enable-shared

-------------------------------------------- Scotty 2.1.5 SECTION --------------------------------

Scotty required extra libraries in two places tnm and tkined.

1. I added "-lm -lld -lc" the LIBS entry in the configure script, See diff below:

$diff scotty2.1.5/unix/Makefile.in working-scotty2.1.5/unix/Makefile.in 1758c1758 < LIBS="-lrpcsvc $LIBS"

---
> LIBS="-lrpcsvc -lm -lld -lc $LIBS" # NOT AIX
1781c1781
<   LIBS="$LIBS -lrpcsvc"
---
>   LIBS="$LIBS -lrpcsvc -lm -lld -lc"

2. I added additional library variables to the Makefile.in; tnm needed $(TCL_LIB_SPEC) added and tkined needed $(TCL_LIB_SPEC), $(TK_LIB_SPEC), and -lX11added, see diff below.

$diff scotty2.1.5/unix/Makefile.in working-scotty2.1.5/unix/Makefile.in 378c378 < $(SHLIB_LD) $(TNM_OBJS) -o tnm$(SHLIB_SUFFIX) $(LIBS) $(OSIMIS_LIBS) $(M SQL_LIBS) $(GDMO_LIBS)

---
>       $(SHLIB_LD) $(TNM_OBJS) -o tnm$(SHLIB_SUFFIX) $(LIBS) $(TCL_LIB_SPEC) $(
OSIMIS_LIBS) $(MSQL_LIBS) $(GDMO_LIBS)
383c383
<       $(SHLIB_LD) $(TKI_GENERIC_OBJS) -o tkined$(SHLIB_SUFFIX) $(LIBS)
---
>       $(SHLIB_LD) $(TKI_GENERIC_OBJS) -o tkined$(SHLIB_SUFFIX) $(TCL_LIB_SPEC)
 $(TK_LIB_SPEC) $(LIBS) -lX11

Configure options $./configure --enable-gcc

-------------------------------- TO CHANGE FROM TCL7.5 to TCL7.6 and TK4.1 to TK4.2 -------------- In addition to the above changes I also changed all referances to tk 4.1 to 4.2 and tcl 7.5 to 7.6 in the following files, to get scotty to work with the new TCL and TK versions: scotty-2.1.5/tkined/generic/tkiInit.c scotty-2.1.5/unix/configure scotty-2.1.5/unix/tkined

I've not tested this though and I know scotty dosn't support these versions yet, but what the hey, I can always go back.

I hope this can help others trying to run tkined on AIX and ultimatily in a distributed fix. Thanks

-- 

Scott J. Danielson

Unix Services & Consulting _/ _/ _/ _/ _/_/_/ United HealthCare Corp. _/ _/ _/ _/ _/ _/ E-Mail: danielss@uhc.com _/ _/ _/_/_/_/ _/ AT&T: (612) 797-4269 _/ _/ _/ _/ _/ _/ Fax: (612) 797-4333 _/_/_/ _/ _/ _/_/_/ Route: MN10-W116