[comp.windows.x] XFILESEARCHPATH

rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (01/05/90)

        Due to minor bugs in the configuration control, if you are trying to 
        install library files into a directory other than /usr/lib/X11, you'll 
        need to set XFILESEARCHPATHDEFAULT and ERRORDB in mit/config/site.def:

    that doesn't seem to do any good.

Yup, the ERRATA is wrong (too much of a hurry), the Xt Imakefile doesn't
propagate the file search path.

tom@ICASE.EDU (Tom Crockett) (01/05/90)

> *Excerpts from xpert: 5-Jan-90 Re: XFILESEARCHPATH Bob Scheifler@expo.lcs.m*
> *(383)*

> Yup, the ERRATA is wrong (too much of a hurry), the Xt Imakefile doesn't
> propagate the file search path.

Assuming I've already built R4 using the instructions from the ERRATA file, how
much do I need to rebuild (using the previously posted changes instead) to get
things to work right?  The whole release, or just lib/Xt, or somewhere in
between?

casey@gauss.llnl.gov (Casey Leedom) (01/07/90)

/ From: salzman@rand.org (Isaac J. Salzman)
| 
| [[Isaac finds that the notes in the ERRATA FILE REGARDING
| XFILESEARCHPATHDEFAULT AND ERRORDB don't work.  Isaac offers a fix to
\ mit/lib/Xt/Imakefile.]]

/ From: rws@EXPO.LCS.MIT.EDU (Bob Scheifler)
| 
| [[Bob acknowledges that the ERRATA file is itself in error: ``(too much
\ of a hurry)'']]

  Here I offer what I think is a better fix.  Note however that I really
can't see any need to override the choices for these values relative to
the value of $(LIBDIR).  I provide the code that does allow their
supersession in site.def simply because the ERRATA file intended this.  I
expect that if an official fix is forthcoming, it will not include the
ability to override these values from site.def.

*** mit/lib/Xt/Imakefile-dist	Mon Dec 18 13:03:06 1989
--- mit/lib/Xt/Imakefile	Sat Jan  6 11:03:10 1990
***************
*** 7,15 ****
  #if UnalignedReferencesAllowed
    ALIGN_DEFINES = -DUNALIGNED
  #endif
!         DEFINES = AllocateLocalDefines $(ALIGN_DEFINES)
      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
!      DB_DEFINES = -DERRORDB=\"$(LIBDIR)/XtErrorDB\"
     INSTALLFLAGS = $(INSTINCFLAGS)
         LINTLIBS = $(LINTXLIB)
  
--- 7,30 ----
  #if UnalignedReferencesAllowed
    ALIGN_DEFINES = -DUNALIGNED
  #endif
! 
! #ifdef XtFileSearchPathDefault
! XFILESEARCHPATH = XtFileSearchPathDefault
! #else
! XFILESEARCHPATH = $(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S
! #endif
! #ifdef XtErrorDB
!         ERRORDB = XtErrorDB
! #else
!         ERRORDB = $(LIBDIR)/XtErrorDB
! #endif
! 
!   XFSP_DEFINES  = -DXFILESEARCHPATHDEFAULT=\"$(XFILESEARCHPATH)\"
!  ERRDB_DEFINES  = -DERRORDB=\"$(ERRORDB)\"
!         DEFINES = AllocateLocalDefines $(ALIGN_DEFINES) \
! 		$(XFSP_DEFINES) $(ERRDB_DEFINES)
      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
!      DB_DEFINES = $(ERRDB_DEFINES)
     INSTALLFLAGS = $(INSTINCFLAGS)
         LINTLIBS = $(LINTXLIB)
  

merworth@cs.utexas.edu (Boyd Merworth) (08/15/90)

I'm have a bit of a problem getting XFILESEARCHPATH to follow a new
path to the libraries under X11R4.  In lib/Xt/Intrinsic.c the
following code seems to be where XFILESEARCHPATH is checked and if it is
non-null use it otherwise use XFILESEARCHPATHDEFAULT:

	#ifndef VMS
        	if (defaultPath == NULL) {
            	defaultPath = getenv("XFILESEARCHPATH");
            	if (defaultPath == NULL) defaultPath = XFILESEARCHPATHDEFAULT;
        	}
        	path = defaultPath;
	#else
        	path = "";      /* NULL would kill us later */
	#endif /* VMS */

But, when I set the environment variable XFILESEARCHPATH to the
location of my installed libraries, the path is not followed, only the
default location is checked.  Am I missing something here?  I'm
running X11R4 on HPs under HPUX 7.0 and on Suns under OS 4.0.3.  I am
in the process of recompiling the code with XFILESEARCHPATHDEFAULT
redefined per the notes in the ERRATA file to see if the new location for
the libraries can be accessed.  I'll know soon.

On the Suns, I've even run ldconfig and added the new shared libraries
but they still cannot be accessed.  If, on the Suns I set
LD_LIBRARY_PATH to the library location, then they are found at
run-time execution by the clients.  Any suggestions?

On the HPs, I've got additional problems, like trying to locate
/lusr/include/X11/bitmaps instead of the default
/usr/include/X11/bitmaps.  We have an X11R4 release from HP installed
on our systems.  I discovered this problem when trying to run xbiff with:

	XBiff*fullPixmap:  mailfull
	XBiff*emptyPixmap:  mailempty

defined in my .Xdefaults file.  If I add the full pathname to the
bitmaps, then everyting is fine.

On both OS's I modified site.def to use the /lusr path for BinDIr,
UsrLibDir, IncDir, AdmDir, and IncRoot.

Any help will be greatly appreciated.
-- 
Boyd Merworth
The University of Texas at Austin
Department of Computer Sciences, TAY 2.124, Austin, Texas 78712
merworth@cs.utexas.edu		{harvard,gatech,uunet}!cs.utexas.edu!merworth