home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / x11r5pat.zip / README < prev    next >
Text File  |  1992-12-14  |  10KB  |  261 lines

  1. This file contains the patches I made to get X11r5 to work on Solaris 2.0.
  2. This code was originally posted to comp.windows.x at the end of July 1992.
  3. At that time, I was still using the Solaris 2.0 Early Access.
  4.  
  5. You will find the patches I applied to my sources in order to do this
  6. below.
  7.  
  8. Note several things however :
  9.     - this is an incompletely tested port.
  10.     - this is an incomplete port (see Notes: below), because of
  11.         some problems.
  12.  
  13. Notes :
  14.     - for the Imakefile changes (LEX and YACC), I am depending
  15.       on the fact that the default rules for make have the
  16.       following definitions :
  17.         LEX=lex
  18.         YACC=yacc
  19.       because I've e.g. changed "yacc" to "${YACC}" several
  20.       times.
  21.  
  22.     - sockets vs. TLI - there are a couple of places where there
  23.       is something of TLI, but incomplete. E.g. XDM still has
  24.       a call to accept() if you compile with -DSTREAMSCONN.
  25.       I have therefore decided not currently to do anything about
  26.       that.
  27.  
  28.     - Because of not currently getting rid of sockets etc., it
  29.       really makes no sense to try to get rid of libucb either.
  30.       Therefore, the BSD compatibility package must be installed
  31.       for all this to work.
  32.  
  33.     - for all this to work, you better have
  34.         /opt/SUNWspro/bin (the unbundled C compiler)
  35.       in your path, and better before /usr/css/bin.
  36.  
  37.     - it is a good idea to
  38.         setenv TMPDIR /tmp
  39.       which is a SWAP tmp by default, and therefore is bigger
  40.       than /var/tmp which the C compiler uses by default.
  41.  
  42.     - clients/bitmap/bitmap doesn't seem to work.
  43.         aretha!db 467 % bitmap
  44.         Error: Unresolved inheritance operation
  45.  
  46.     - the server doesn't work well. It seems to depend on your
  47.         hardware. It works on a bw2, on a GX (in CG3 emulation)
  48.         but not on a CG3. Advise is more than welcome.
  49.  
  50. clients/twm/Makefile :
  51.     Yacc and lex - don't seem to exist under Solaris 2.0
  52.     Therefore, fell back to the Cygnus development package...
  53.         YACC=    byacc
  54.         LEX=    flex
  55.     Changes to both clients/twm/Imakefile and config/sun.cf to
  56.     make LEX and YACC work.
  57.  
  58. clients/twm/lex.l :
  59.     Definition of yywrap() is not needed - #ifdeffed it out.
  60.         #ifndef yywrap
  61.         yywrap() {return(1);}
  62.         #endif
  63.  
  64.     This may be a Cygnus-only problem.
  65.  
  66. clients/xcalc/math.c :
  67.     In SVR4, xcalc tries to use FPE_INTDIV etc. which are documented
  68.     in siginfo(5) as supposed to be known macros if you
  69.         #include <siginfo.h>
  70.     There seems to be no header file which has these symbols in them...
  71.     Note that I'm still running the "Early Access" (February 1992)
  72.     version of Solaris 2.0.
  73.  
  74. clients/xload/get_load.c :
  75.     Kernel file is not "/stand/unix" but "/kernel/unix".
  76.  
  77. clients/xload/Imakefile :
  78.     Need nlist(3E), and therefore must link with "-L/usr/ucblib -lucb".
  79.     Added this in the Imakefile.
  80.  
  81. clients/xdm/Imakefile :
  82.     socket stuff needs -lsocket
  83.  
  84. demos/xgc/Imakefile :
  85.     needs LEX and YACC.
  86.  
  87. config/sun.cf :
  88.     Added an attempt to support the Cygnus environment.
  89.     LEX and YACC variables.
  90.  
  91.     Do we have to use -DTCPCONN -DUNIXCONN -DSTREAMSCONN ?
  92.         Currently didn't use STREAMSCONN because the
  93.         R5 Release Notes say you're in trouble if you
  94.         don't have sockets.
  95.  
  96.     #define SystemV4 makes a lot of things work - most
  97.         -lnsl are ok after that.
  98.  
  99.     I edited it to always have -lsocket together with -lnsl
  100.  
  101.  
  102. fonts/clients/fsinfo/Imakefile, fonts/clients/fslsfonts/Imakefile,
  103. fonts/clients/fstobdf/Imakefile, fonts/clients/showfont/Imakefile :
  104.     needed -lsocket -lnsl
  105.  
  106. clients/xterm/main.c, clients/xterm/resize.c :
  107.     All places where "#ifdef sun" was found were changed to
  108.         #if defined(sun) && !defined(SVR4)
  109.  
  110.     Also, a couple of lines were added to resize.c to make it
  111.     print something under SVR4 as well. Probably not necessary.
  112.  
  113. clients/xconsole/xconsole.c :
  114.     Added support for wscons(7). Also had to fix the fact that TIOCCONS
  115.     was still #defined in /usr/include/sys/suntty.h, but not working.
  116.  
  117.     Xconsole needs to be setuid to root to work under SVR4.
  118.  
  119. clients/xconsole/Imakefile, clients/xterm/Imakefile, clients/xload/Imakefile :
  120.     All setuid-something programs need to be compiled with LD_RUN_PATH
  121.     set when doing the final link. If not, they will not pick up the
  122.     libraries from (e.g.) /usr/ucblib because that directory is not
  123.     secure.
  124.  
  125.     Note - these patches do NOT implement LD_RUN_PATH. You should recompile
  126.     these three clients yourself after the global build, with LD_RUN_PATH
  127.     set.
  128.  
  129. server/ddx/sun/Imakefile :
  130.     Had to make the GX stuff not happen on Solaris 2.0. Don't have the
  131.     driver yet...
  132.  
  133. server/ddx/sun/sun.h, server/ddx/sun/*.c :
  134.     Changed all #include <sundev/.. or <sun/... to <sys/
  135.     Same thing for <pixrect/...
  136.     Also had to remove all #include <struct.h>
  137.     Added #include <unistd.h> for R_OK and X_OK.
  138.  
  139. server/ddx/sun/kbd_mode.c, server/ddx/sun/constype.c :
  140.     Similar changes.
  141.  
  142.  
  143.  
  144. ===========
  145. Two articles previouly posted about porting X11r5 to ATT SVr4 -
  146.  
  147. >Article 32286 of comp.windows.x:
  148. >>From: steve@ecf.toronto.edu (Steve Kotsopoulos)
  149. >Newsgroups: comp.windows.x,comp.unix.sysv386
  150. >Subject: Building X11R5 under AT&T SVR4
  151. >Message-ID: <1991Sep12.164818.16380@ecf.toronto.edu>
  152. >Date: 12 Sep 91 16:48:18 GMT
  153. >Organization: University of Toronto, Engineering Computing Facility
  154. >Lines: 56
  155. >
  156. >Now that I have the server and clients working, here is a list of
  157. >things people should check if they are having problems building X11R5
  158. >(I run AT&T's SVR4, so I'm not sure how much of this applies
  159. >to DELL, ESIX, ISC or SCO)  :-(
  160. >
  161. >1. You will need lots of disk space! I repartitioned my disk so that
  162. >   I had a 250Meg /X11 area for source and installed binaries.
  163. >   As it turns out, I didn't need that much, but I will probably use
  164. >   it all up once the contrib stuff is released.
  165. >
  166. >2. I had lots of problems trying to use gcc, so I used the standard
  167. >   C compiler. Make sure that you don't have /usr/ucb before /bin
  168. >   in your path, or else you will get a shell script version of cc
  169. >   that set a bunch of parameters (incorrectly, for X11R5) before
  170. >   calling /usr/ccs/bin/cc to do the real work.
  171. >
  172. >3. Follow the advice of Steve Hite (shite@sinkhole.unf.edu):
  173. >     "DON'T use the C shell on Esix 4.0.3a.  The X library is HUGE and
  174. >      csh complains about too long of an argument list.  The Korn shell
  175. >      will work just dandy."
  176. >
  177. >   All my clients were dumping core at first, but after changing to the
  178. >   Korn shell (and also changing several other things at the same time,
  179. >   so I'm not sure if csh was the culprit) they all worked properly. 
  180. >
  181. >   Note: I did not get any complaints about too long of an argument
  182. >     list, so maybe this is only neccessary on Esix.
  183. >
  184. >4. Change the line in server/Imakefile that reads:
  185. >        SYSLIBS = -lm /usr/ucblib/libucb.a
  186. >   to read:
  187. >        SYSLIBS = -lm -lc /usr/ucblib/libucb.a
  188. >
  189. >   This ensures that the directory reading routines from libc.a are
  190. >   used intead of the ones in libucb.a (BSD version of readdir).
  191. >
  192. >5. Go for it, with: make World BOOTSTRAPCFLAGS="-DATT -DSVR4 -DSYSV386"
  193. >   This took 3.5 hours on a 33MHz 486.
  194. >
  195. >6. fix the 2 suid clients (xterm & xload):
  196. >    'export LD_RUN_PATH=/usr/X386/lib'
  197. >    delete mit/clients/xterm/xterm & mit/clients/xload/xload and
  198. >    relink them again.
  199. >
  200. >7. make install
  201. >
  202. >If anyone has problems with the X386 server you should be aware that
  203. >MIT was not able to test it because they do not have a SVGA board.
  204. >
  205. >Also, MANY thanks to mark@zok.sgcs.com and roell@dell.com for all the
  206. >work they put into getting X386 included in X11R5.
  207. >-- 
  208. >Steve Kotsopoulos                   mail:   steve@ecf.toronto.edu
  209. >Systems Analyst                     bitnet: steve@ecf.UTORONTO.BITNET
  210. >Engineering Computing Facility      uucp:   uunet!utai!ecf!steve
  211. >University of Toronto               phone:  (416) 978-5898
  212.  
  213.  
  214. >Article 32398 of comp.windows.x:
  215. >>From: mats@alruna.UUCP (Mats Wichmann)
  216. >Newsgroups: comp.windows.x
  217. >Subject: Re: Building X11R5 under AT&T SVR4
  218. >Message-ID: <24624.9109131444@unisoft.unisoft.com>
  219. >Date: 13 Sep 91 14:43:10 GMT
  220. >Sender: daemon@athena.mit.edu (Mr Background)
  221. >Organization: The Internet
  222. >Lines: 37
  223. >
  224. >On Sep 12,  4:48pm, Steve Kotsopoulos wrote:
  225. >] Now that I have the server and clients working, here is a list of
  226. >] things people should check if they are having problems building X11R5
  227. >] (I run AT&T's SVR4, so I'm not sure how much of this applies
  228. >] to DELL, ESIX, ISC or SCO)  :-(
  229. >] 
  230. >....
  231. >This one for sure applies to all sVr4's:
  232. >] 
  233. >] 4. Change the line in server/Imakefile that reads:
  234. >]         SYSLIBS = -lm /usr/ucblib/libucb.a
  235. >]    to read:
  236. >]         SYSLIBS = -lm -lc /usr/ucblib/libucb.a
  237. >] 
  238. >]    This ensures that the directory reading routines from libc.a are
  239. >]    used intead of the ones in libucb.a (BSD version of readdir).
  240. >
  241. >I haven't seen the x11r5 source yet (still waiting, sigh), but this is a
  242. >problem I've run into many a time in the nine months or so I've been running
  243. >sVr4:  while the ucblib does provide some useful utility, it has a tendency
  244. >to supply routines you don't expect, so unless you are explicitly trying to
  245. >get a BSD-ish program to work without porting (hint: odds are good you won't
  246. >get away with it anyway), you'll need -lc before -lucb to insure you get
  247. >sVr4's "standard" libc versions of things.  The readdir routines are just
  248. >one of many instances of this.  You'll probably also need to make sure that
  249. >-I/usr/include precededs -I/usr/ucbinclude.
  250. >
  251. >For things that use Larry Wall's Shell Script From Hell (Configure), it
  252. >might sometimes even be necessary to take /usr/ucb out of your path before
  253. >running it - or it will go find things in /usr/ucb that you don't want
  254. >it to use!!!
  255. >
  256. >
  257. >-- 
  258. >Mats Wichmann
  259. >Systems Software Consultant
  260. >alruna!mats@unisoft.com
  261.