Re: [ROOT] Root on Solaris 2.8 with thread-support

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Apr 19 2004 - 17:23:40 MEST


Hi Andreas,

  the thread safe version of XFree86 has the function XInitThreads.
Clearly the Sun version does not seem to have this. To see if it works
comment out the XInitThreads call in x11/src/GX11Gui.cxx:

//______________________________________________________________________________
Int_t TGX11::OpenDisplay(const char *dpyName)
{
   // Open connection to display server (if such a thing exist on the
   // current platform). On X11 this method returns on success the X
   // display socket descriptor (> 0), 0 in case of batch mode and < 0
   // in case of failure (cannot connect to display dpyName). It also
   // initializes the TGX11 class via Init(). Called from TGClient ctor.

#ifdef _REENTRANT
      // very first call before any X-call !!
      if (!XInitThreads())
         Warning("OpenDisplay", "system has no X11 thread support");
#endif

Let me know if this works for you. Better is to read up on if and how
Sun's X11 supports threads, maybe there is an alternative to
XInitThreads.

Cheers, Fons.




On Mon, 2004-04-19 at 16:43, Andreas Zoglauer wrote:
> Hello Rooters,
> 
> I try to port my programs to Solaris 2.8.
> To do so, I have to recompile ROOT with thread-support enabled.
> Everything compiles, but when I try to start ROOT, I get the following 
> problem:
> 
> ld.so.1: (skip)/analysis/Software/root/bin/root.exe: fatal: relocation 
> error: file (skip)/analysis/Software/root/lib/libGX11.so: symbol 
> XInitThreads: referenced symbol not found
> 
> The start screen of ROOT shows up but then ROOT hangs.
> 
> Any ideas? Are there any general problems with ROOT, Solaris and thread 
> support? Or have I simply forgot to include some special library??
> 
> ROOT  : 4.00/03
> CC -V : CC: Forte Developer 7 C++ 5.4 Patch 111715-07 2003/04/13
> 
> 
> Thanks in advance,
> Andreas
> 
> 
> PS:
> Bye the way I had to do one modification to get it compiling:
> 
> CC -O  -o bin/root rootx/src/rootx.o rootx/src/rootxx.o -L. -lXpm  -lX11
> Undefined                       first referenced
>   symbol                             in file
> setsockopt 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> authdes_create 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> socket 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> inet_addr 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> getsockname 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> xdrmem_create 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> connect 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> gethostbyname 
> /afs/ipp-garching.mpg.de/sun4x_58/lib/libX11.so
> ld: fatal: Symbol referencing errors. No output written to bin/root
> gmake: *** [bin/root] Error 1
> 
> Adding -lsocket to the last line solved the problem:
>   CC -O  -o bin/root rootx/src/rootx.o rootx/src/rootxx.o -L. -lXpm 
> -lX11 -lsocket
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET