Subject: Xfree-2.1 questions
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Greg Cronau <gregc@edi.com>
List: current-users
Date: 04/29/1994 16:37:07
	I am currently using a system built entirely from the 4/6 source
tar files. About 2 weeks ago I built the entire X distribution using
this system. My procedure was:

1.) Downloaded the complete X11R5 tar files from ftp.x.org and installed
    that code in /usr/local/src/X11R5/mit.
2.) Installed patches 01 through 26.
3.) Installed the Xfree86-2.1 patchfile that I obtained from the ftp
    site in austrailia.
4.) In addition, I installed the following patch that appeared on the
    current-users mailing list:

-------------------<beginning of patch>------------------------------
Date: Fri, 8 Apr 1994 09:20:49 --100
From: matthieu@laas.fr (Matthieu Herrb)
To: current-users@sun-lamp.cs.berkeley.edu
Subject: XFree86 2.1 and new stuff

Some good news:

1. I made a new binary distribution on XFree86-2.1. Available from:
   ftp.laas.fr:/pub/NetBSD/XFree86-2.1.

   WARNING: the shared libraries version numbers are now 3.0.

2. Here are the patches I needed to build it with the 4 April's
   binaries (They mostly come from Mark Weaver).

*** mit/config/imake.c.orig	Sat Jan 15 13:57:38 1994
--- mit/config/imake.c	Thu Apr  7 20:32:36 1994
[body of patch removed for brevity]

*** mit/server/ddx/x386/os-support/bsd/bsd_video.c.orig	Sat Jan 15 13:57:26 1994
--- mit/server/ddx/x386/os-support/bsd/bsd_video.c	Thu Apr  7 20:35:33 1994
[body of patch removed for brevity]

*** mit/config/bsdLib.tmpl.orig	Thu Apr  7 20:53:09 1994
--- mit/config/bsdLib.tmpl	Thu Apr  7 20:56:27 1994

[most of patch removed for brevity. The patch changed the shared lib
 library numbers like the example fragment below.]

  #ifndef SharedPexRev
  #define SharedPexRev 2.0
  #endif
+ #else /* __NetBSD__ */
+ #ifndef SharedXlibRev
+ #define SharedXlibRev 3.0
+ #endif
+ #ifndef SharedOldXRev
+ #define SharedOldXRev 3.0
+ #endif
+ #ifndef SharedXtRev
+ #define SharedXtRev 3.0
+ #endif
+ #ifndef SharedXawRev
+ #define SharedXawRev 3.0
+ #endif
+ #ifndef SharedXmuRev
+ #define SharedXmuRev 3.0
+ #endif
+ #ifndef SharedXextRev
+ #define SharedXextRev 3.0
+ #endif
+ #ifndef SharedXinputRev
+ #define SharedXinputRev 3.0
+ #endif
+ #ifndef SharedXTrapRev
+ #define SharedXTrapRev 3.0
+ #endif
+ #ifndef SharedPexRev
+ #define SharedPexRev 3.0
+ #endif
+ #endif /* __NetBSD__ */
  
*** mit/server/ddx/x386/SuperProbe/OS_386BSD.c.orig	Fri Apr  8 08:28:16 1994
--- mit/server/ddx/x386/SuperProbe/OS_386BSD.c	Fri Apr  8 07:40:20 1994
[body of patch removed for brevity]

-------------------<end of patch>------------------------------

The only problem I experienced during the build was that the x386 server
code expected the files mit/server/ddx/x386/etc/{console.h,ioctl.h} to be
in /usr/include/machine. I couldn't figure out how to change the make
around, so I just copied the 2 include files to /usr/include/machine and
everything was happy. Anybody got any ideas here?

Once I was done and all the code was installed, everything seemd to run
fine. However, all of my X shared libraries were named lib*.so.2.0, not
3.0 as the patch seemed to indicate they should be.

My mit/config/bsdLib.tmpl file appeared to have been patched correctly:

-------------------------<begin>---------------------------------
XCOMM $XFree86: mit/config/bsdLib.tmpl,v 2.1 1993/12/17 10:57:09 dawes Exp $
XCOMM $XConsortium: sunLib.tmpl,v 1.14.1.2 92/11/11 09:52.02 rws Exp $

/*
 * Free/NetBSD shared library template
 */

#ifndef __NetBSD__
#ifndef SharedXlibRev
#define SharedXlibRev 2.0
#endif

[fragment removed for brevity]

#ifndef SharedPexRev
#define SharedPexRev 2.0
#endif
#else /* __NetBSD__ */
#ifndef SharedXlibRev
#define SharedXlibRev 3.0
#endif

[fragment removed for brevity]

#ifndef SharedPexRev
#define SharedPexRev 3.0
#endif
#endif /* __NetBSD__ */

[Remainder of file Removed]
------------------------<End>------------------------------

	From additional experimentation, It appears that xmkmf does not
automatically define "__NetBSD__". I tried putting a few:
	#ifdef __NetBSD__
in a couple of Imakefiles that I was working with and they didn't work.

So:
1.) Is xmkmf built wrong?
2.) Who includes bsdLib.tmpl and why isn't __NetBSD__ being defined if
    xmkmf is ok?
3.) All my code appears to run fine, all my binaries call the 2.0 libs
    and all my libs are named 2.0. Why does it need to be 3.0?
4.) Who decides what a library's number should be?
5.) *Why* was it raised to 3.0?
6.) Is this going to cause me grief in the future?

Thanks
Gregc@edi.com


------------------------------------------------------------------------------