[comp.windows.x] libXt problems

brtmac@wyatt.ksux.ksu.edu (Brett McCoy) (02/08/90)

I have been having problems getting programs to run that use the Xt library.
I am using a Sparcstation 1 running SunOS 4.0.3 and the R4 server which
was compiled with cc.  The library is a shared library, and none of the
other X libraries seem to be giving me any problems.  The problem I am
having is that I get the error message:

   ld.so: call to undefined procedure __GetHostname from 0xf776a96c

The address it gives never changes and is the same on all of the Sparc's here,
and a Solbourne 5/600.  I have traced the problem as far as a call to 
XtRealizeWidget, but haven't dug into that routine to see where the problem
is.  Has anyone else had this problem, and if so, did you get it fixed?
Is it a problem only with the SS1, or is it in all of the different flavors?


--
Brett McCoy                 |  Never underestimate the bandwith of
brtmac@ksuvm.bitnet         |  a stationwagon driving down the
brtmac@maverick.ksu.ksu.edu |  highway.

mlandau@bbn.com (Matt Landau) (02/09/90)

brtmac@wyatt.ksux.ksu.edu (Brett McCoy) writes:
>I have been having problems getting programs to run that use the Xt library.
>....The problem I am having is that I get the error message:
>   ld.so: call to undefined procedure __GetHostname from 0xf776a96c

Do you perchance have OpenWindows installed on the same machine?  Have 
you perhaps installed the OpenWindows version of the shared libX in 
/usr/lib, or do you run with LD_LIBRARY_PATH pointing to the OpenWindows 
lib directory?

I got the same complaint, about the same routine, from many of the X11R4 
clients when I first built them with shared libraries on my SparcStation.  
It turned out I'd forgotten to unsetenv LD_LIBRARY_PATH, which pointed at
the *OpenWindows* shared libraries, and so I was getting binaries that 
tried to mix R4 shared libraries with OpenWindows shared libraries at 
runtime.  The internal implementation details of the two systems are such
that this doesn't work.

I unsetenv LD_LIBRARY_PATH and removed any stray links in /usr/lib that 
pointed to OpenWindows libraries, and relinked all my clients.  Voila!
All the __GetHostname complaints vanished...

This raises the whole issue of what software vendors (like us) are going
to have to do to cope with different vendors' shared X libraries.  I'd
love to ship my X11-based products dynamically linked, but does this mean
I have to have two complete sets of products, one for MIT's shared libs
and another for Sun's, and rely on the customer to know which one he
really needs?  Ugh...
--
 Matt Landau		    Broken lover, you can touch me, 
 mlandau@bbn.com	      In the dark the innocent can't see.

pusateri@macbeth.cs.duke.edu (Thomas J. Pusateri) (02/09/90)

In article <1990Feb8.050507.15837@deimos.cis.ksu.edu> brtmac@wyatt.ksux.ksu.edu (Brett McCoy) writes:
>
>I have been having problems getting programs to run that use the Xt library.
>I am using a Sparcstation 1 running SunOS 4.0.3 and the R4 server which
>was compiled with cc.  The library is a shared library, and none of the
>other X libraries seem to be giving me any problems.  The problem I am
>having is that I get the error message:
>
>   ld.so: call to undefined procedure __GetHostname from 0xf776a96c
>

I remember seeing this a few times when compiling and running some X programs
I had written. I had my LD_LIBRARY_PATH still set from running OpenWindows
and the Openwindows X11 shared libraries were being used instead of the
X11R4 shared libraries that the program was compiled with.

Try unsetting your LD_LIBRARY_PATH and recompiling if this is your problem.

Tom Pusateri

National Biomedical Simulation Resource
Duke University Medical Center

pusateri@nbsr.duke.edu