Tclkit AIX notes

2002-11-04


 From: "Adrian Wallaschek" <[email protected]>
 Date: Mon Jan 6, 2003
 To: [email protected]
 Subject: [Starkit] tclkit on AIX with Visual Age C/C++ 5

Hi there,

if anybody is interested, here is the list of changes required to build a TCLkit for AIX using IBM's compiler instead of GNU. (Still the GNU compiler might be not acceptable for some professional projects e.g. in an banking IT environment, etc. - yes I know they are stupid, but they decide ... ;-) ).

After downloading the tar files and copying the genkit script, first untar the files and have a look at the tcl source-tree.

In src/tk/generic/tkMenu.c please change line 1198 (or around there). It contains a C++ comment lead-in (double-slash) while the compiler is a little bit nercous on this, better change to /* ... */ or just delete the line that is commented out.

This is due to the fact that the tk/configure chooses its compiler after its own taste and doesn't follow the configuration in genkit.

Regrettably the double-slash is used in a lot of C source of the kit so we need to specify the compiler in the genkit to swallow this.

Change the genkit in the beginning of the file, where the configurations for the compiler are in a switch statement:

  switch $tcl_platform(os) {
    AIX         { array set Z {tclsuff "-Wl,-bshared -lcrypt" tksuff -lIM}
                  array set X {gcc "xlC -qcpluscmt" g++ "xlC" -static ""} }
  ........

This keeps the array set Z as it was before and changes the compiler to use "xlC" which is the C++ compiler. As even the C++ compiler in Visual Age for C/C++ checks wether its input file is a C source and then limits to C syntax we need to explicitely enable // comments with "-qcpluscmt".

From here on follow the usual paths.

Btw. I was a little bit sad that there is not howto or even README telling a little bit about the design of tclkits, like where the VFS is mounted, how to understand the boot.tcl etc. two or three pages about this would help avoid quite some research.

Anyway it is brilliant. The tclkit will help to jump over a lot of administrative fences using TCL in a rather conservative project ("No we won't install the interpreter on our productive environment because it would be a development platform in the production system possibly compromising security, bla di bla ...", now they won't object: its a closed application and the interpreter is not reusable for anything else anymore!).

Well done!

Regards,

         Adrian Wallaschek