Re: bitmap "icon" " not defined AIX 4.1.4 Scotty 2.1.4

Thomas R. Benjamin (thomasb@austin.ibm.com)
Tue, 15 Oct 1996 11:09:28 -0500 (CDT)

Brian:

The problem below sounds familiar. At least three others including
me have seen it. It appears to be related to dynamic loading on
RS6000 computers running AIX. Look at Juergen's responses (below)
to three of my postings concerning this problem for some background.

I saw the problem on both AIX version 3.X and 4.X, so my "fix" was
to fall back to earlier software releases, namely TCL7.4, TK4.0p3,
SCOTTY2.0.2 , and TKINED1.3.4. Another possibility would be to
compile statically, with no shared libraries in TCL, TK, or
tkined. This may require changing the tkined script; however, I
have not tried this yet.

My intention is to help get this to work on RS6000's , and since I
work in the "belly of the BEAST" at IBM Austin, TX, I may be able
to get some assistance here. I'll post any progress, and welcome
any suggestions for attacking the problem. I'm a systems
integrator/administrator, not a programmer, so please have patience :) .

BTW, if someone has had success with tkined1.4.1 on AIX, please post your
configuration, including, but not limited to:

Makefile
configuration options
tclConfig.sh
tkConfig.sh
compiler version

Tom

Brian Harvell writes:

Brian> Hi I'm having problems geting scotty up and running on an AIX 4.1.4 system
Brian> I had to add -lc -lm -lld -lX11 /opt/lib/libtcl7.5a /opt/lib/tk4.1.a to
Brian> the SHLIB_LD var in the makefile but it still gives a warning about
Brian> ld: 0711-327 WARNING: Entry point not found: __start
Brian>
Brian> It does compile however but after running make install and then
Brian> tkined1.4.4 it says bitmap "icon" not defined.

Brian> I installed it fine on a solaris box. What's wrong with my setup here?

=================================================
Juergen's response to my first message:
=================================================
thomasb@jfite.austin.ibm.com (Thomas) said:

Thomas> When I execute tkined (version 1.4.1) on an IBM RS6000/320 running
Thomas> AIX 4.1.4.0 , I receive the following output:

Thomas> bitmap "icon" not defined

Thomas> The cursor remains at the end of the above line, and the
Thomas> following process hangs until it is interrupted by Ctl-C:

The bitmap "icon" is defined in the tkined dynamic library which is
loaded from the "package require Tkined 1.4" command at the beginning
of the tkined script. This only works correctly if you use the
pgkIndex.tcl file which is created during the installation process.
(No guarantee that it works if you use a different setup since Tcl
delays loading of packages which is IMHO an error.)

Juergen
=================================================
Juergen's response to my second message:
=================================================
thomasb@austin.ibm.com (Thomas R. Benjamin ) said:

Thomas> I'm having the same problem on an RS6000/320 running AIX 4.1.4
Thomas> with tcl7.5 and tk4.1. I posted a note to the list, and will
Thomas> append Juergen's response.

So we have three reports now all coming from AIX machines. Someone out
there with this problem not running AIX?

Note, the icon bitmap (and a couple of other bitmaps) are defined in
the initialization procedure Tkined_Init() in the file tkiInit.c.
There are a couple of calls to Tk_DefineBitmap() and I do not see why
they seem to fail. Can someone please put some code into tkiInit.c to
check the return code of Tk_DefineBitmap(). Or just print out the
contents of interp->result after the call to Tk_DefineBitmap().
(However, my understanding of the implementation of Tk_DefineBitmap()
is that you only get an error if the bitmap is already defined. I am
getting a bit confused.)

BTW, the reason to define bitmaps in the C code is that they are used
as a fallback if there are not bitmap files available at run-time.

Juergen
=================================================
Juergen's response to my third message:
=================================================
thomasb@austin.ibm.com (Thomas R. Benjamin ) said:

Thomas> This is a continuation of an earlier thread regarding tkined
Thomas> hanging after outputting <bitmap "icon" not defined> .

Thomas> I inserted a printf code line in
Thomas> ../scotty-2.1.1/tkined/generic/tkiInit.c, after the first call
Thomas> to Tk_DefineBitmap.

Thomas> --> printf("interp->result = '%s'\n" , interp->result);

Thomas> The result was a null value for interp->result.

A NULL pointer for interp->result or an empty string?

Thomas> I also inserted printf statements in ../tk4.1/generic/tkBitmap.c,
Thomas> within the function Tk_GetBitmap(interp, tkwin, string).

I don't expect a bug here. For me, it looks like if there is something
broken with dynamic loading on AIX. A simple way to prove this would
be to take tkiInit.c and to uncomment everything in TkiInit() that is
not a call to Tk_CreateItemType() or Tk_DefineBitmap(). This will
result in a dynamic loadable module which only registers two new
canvas item types and creates a couple of bitmaps. Start wish4.1, load
the module and type "pack [button .b -bitmap icon]". If you get the
same error message, contact the person who wrote the dynamic loading
code for AIX. If it works (you get a button with the Tkined icon), we
have to look somewhere else.

Thomas> Besides, the fix should go in tkined and not Tk.

Perhaps the fix should go in AIX? :-) Compare the tclLoadAix.c module
with tclLoad*.c modules used by other systems and you will understand
why I expect that this error is indeed AIX specific.

Juergen
=================================================

-- 
Thomas R. Benjamin
Integrated Systems and Solutions Corporation
Phone:  512.823.9359
E-Mail: thomasb@austin.ibm.com