Newsgroups: comp.windows.x.motif
Path: utzoo!utgpu!watserv1!watdragon!watsol.waterloo.edu!tbray
From: tbray@watsol.waterloo.edu (Tim Bray)
Subject: Xt not calling not calling Motif Vendor Initialize on RS/6000?
Message-ID: <1991Feb25.212018.6232@watdragon.waterloo.edu>
Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes)
Organization: University of Waterloo
Date: Mon, 25 Feb 1991 21:20:18 GMT
Lines: 40

I just finished building Motif 1.1 for an RS/6000, which required rebuilding
Xt and R4 Xlib from scratch.  Am having quite a bit of trouble getting
the apps to run.  To avoid static, I am running only the clients on the IBM
against a known-to-be-OK server on a Sparc.  

Here's the symptom:

Warning: Virtual bindings Initialize hasn't been called
Memory fault (core dumped)

So I checked with dbx, and sure'nuff, the Virtual Bindings Initialize, a.k.a.
_XmVirtKeysInitialize, isn't getting called.  Well, so I ran the same program
under dbx on a machine where it works, and it turns out that _XmVirtKeys...
is supposed to be called in the Vendor Shell initialization, right out
of the Xt code.  Here's a stack trace of how it gets there:

_XmVirtKeysInitialize() 
VendorExtInitialize() <-from Xm/Vendor.c
`Vendor`Initialize() <-from Xm/Vendor.c
CallInitialize() <- All Xt from here up
CallInitialize()
CallInitialize()
_XtCreate()
_XtAppCreateShell()
XtAppCreateShell()
XtAppInitialize()
XtInitialize()
main()

But on the IBM, it's not getting to VendorExtInitialize, because it's not
getting to the Xm/Vendor.c's Initialize.  However, it is getting the
requisite 3 levels deep in Xt CallInitialize.  I am starting to realize that
I don't understand ShellWidgets and the Vendor code very well - apparently Xt
just doesn't realize that it needs to call the Motif init code.  Uh, how's
it supposed to know?  Is it a simple matter of -lXm being first on the
command line & hence those Vendor.o symbols winning the race?  If so, could
the IBM linker be doing me a dirty?

Thanks in advance for any rays of light...
Tim Bray, University of Waterloo (tbray@watsol.waterloo.edu)
