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 >
Wrap
Text File
|
1992-12-14
|
10KB
|
261 lines
This file contains the patches I made to get X11r5 to work on Solaris 2.0.
This code was originally posted to comp.windows.x at the end of July 1992.
At that time, I was still using the Solaris 2.0 Early Access.
You will find the patches I applied to my sources in order to do this
below.
Note several things however :
- this is an incompletely tested port.
- this is an incomplete port (see Notes: below), because of
some problems.
Notes :
- for the Imakefile changes (LEX and YACC), I am depending
on the fact that the default rules for make have the
following definitions :
LEX=lex
YACC=yacc
because I've e.g. changed "yacc" to "${YACC}" several
times.
- sockets vs. TLI - there are a couple of places where there
is something of TLI, but incomplete. E.g. XDM still has
a call to accept() if you compile with -DSTREAMSCONN.
I have therefore decided not currently to do anything about
that.
- Because of not currently getting rid of sockets etc., it
really makes no sense to try to get rid of libucb either.
Therefore, the BSD compatibility package must be installed
for all this to work.
- for all this to work, you better have
/opt/SUNWspro/bin (the unbundled C compiler)
in your path, and better before /usr/css/bin.
- it is a good idea to
setenv TMPDIR /tmp
which is a SWAP tmp by default, and therefore is bigger
than /var/tmp which the C compiler uses by default.
- clients/bitmap/bitmap doesn't seem to work.
aretha!db 467 % bitmap
Error: Unresolved inheritance operation
- the server doesn't work well. It seems to depend on your
hardware. It works on a bw2, on a GX (in CG3 emulation)
but not on a CG3. Advise is more than welcome.
clients/twm/Makefile :
Yacc and lex - don't seem to exist under Solaris 2.0
Therefore, fell back to the Cygnus development package...
YACC= byacc
LEX= flex
Changes to both clients/twm/Imakefile and config/sun.cf to
make LEX and YACC work.
clients/twm/lex.l :
Definition of yywrap() is not needed - #ifdeffed it out.
#ifndef yywrap
yywrap() {return(1);}
#endif
This may be a Cygnus-only problem.
clients/xcalc/math.c :
In SVR4, xcalc tries to use FPE_INTDIV etc. which are documented
in siginfo(5) as supposed to be known macros if you
#include <siginfo.h>
There seems to be no header file which has these symbols in them...
Note that I'm still running the "Early Access" (February 1992)
version of Solaris 2.0.
clients/xload/get_load.c :
Kernel file is not "/stand/unix" but "/kernel/unix".
clients/xload/Imakefile :
Need nlist(3E), and therefore must link with "-L/usr/ucblib -lucb".
Added this in the Imakefile.
clients/xdm/Imakefile :
socket stuff needs -lsocket
demos/xgc/Imakefile :
needs LEX and YACC.
config/sun.cf :
Added an attempt to support the Cygnus environment.
LEX and YACC variables.
Do we have to use -DTCPCONN -DUNIXCONN -DSTREAMSCONN ?
Currently didn't use STREAMSCONN because the
R5 Release Notes say you're in trouble if you
don't have sockets.
#define SystemV4 makes a lot of things work - most
-lnsl are ok after that.
I edited it to always have -lsocket together with -lnsl
fonts/clients/fsinfo/Imakefile, fonts/clients/fslsfonts/Imakefile,
fonts/clients/fstobdf/Imakefile, fonts/clients/showfont/Imakefile :
needed -lsocket -lnsl
clients/xterm/main.c, clients/xterm/resize.c :
All places where "#ifdef sun" was found were changed to
#if defined(sun) && !defined(SVR4)
Also, a couple of lines were added to resize.c to make it
print something under SVR4 as well. Probably not necessary.
clients/xconsole/xconsole.c :
Added support for wscons(7). Also had to fix the fact that TIOCCONS
was still #defined in /usr/include/sys/suntty.h, but not working.
Xconsole needs to be setuid to root to work under SVR4.
clients/xconsole/Imakefile, clients/xterm/Imakefile, clients/xload/Imakefile :
All setuid-something programs need to be compiled with LD_RUN_PATH
set when doing the final link. If not, they will not pick up the
libraries from (e.g.) /usr/ucblib because that directory is not
secure.
Note - these patches do NOT implement LD_RUN_PATH. You should recompile
these three clients yourself after the global build, with LD_RUN_PATH
set.
server/ddx/sun/Imakefile :
Had to make the GX stuff not happen on Solaris 2.0. Don't have the
driver yet...
server/ddx/sun/sun.h, server/ddx/sun/*.c :
Changed all #include <sundev/.. or <sun/... to <sys/
Same thing for <pixrect/...
Also had to remove all #include <struct.h>
Added #include <unistd.h> for R_OK and X_OK.
server/ddx/sun/kbd_mode.c, server/ddx/sun/constype.c :
Similar changes.
===========
Two articles previouly posted about porting X11r5 to ATT SVr4 -
>Article 32286 of comp.windows.x:
>>From: steve@ecf.toronto.edu (Steve Kotsopoulos)
>Newsgroups: comp.windows.x,comp.unix.sysv386
>Subject: Building X11R5 under AT&T SVR4
>Message-ID: <1991Sep12.164818.16380@ecf.toronto.edu>
>Date: 12 Sep 91 16:48:18 GMT
>Organization: University of Toronto, Engineering Computing Facility
>Lines: 56
>
>Now that I have the server and clients working, here is a list of
>things people should check if they are having problems building X11R5
>(I run AT&T's SVR4, so I'm not sure how much of this applies
>to DELL, ESIX, ISC or SCO) :-(
>
>1. You will need lots of disk space! I repartitioned my disk so that
> I had a 250Meg /X11 area for source and installed binaries.
> As it turns out, I didn't need that much, but I will probably use
> it all up once the contrib stuff is released.
>
>2. I had lots of problems trying to use gcc, so I used the standard
> C compiler. Make sure that you don't have /usr/ucb before /bin
> in your path, or else you will get a shell script version of cc
> that set a bunch of parameters (incorrectly, for X11R5) before
> calling /usr/ccs/bin/cc to do the real work.
>
>3. Follow the advice of Steve Hite (shite@sinkhole.unf.edu):
> "DON'T use the C shell on Esix 4.0.3a. The X library is HUGE and
> csh complains about too long of an argument list. The Korn shell
> will work just dandy."
>
> All my clients were dumping core at first, but after changing to the
> Korn shell (and also changing several other things at the same time,
> so I'm not sure if csh was the culprit) they all worked properly.
>
> Note: I did not get any complaints about too long of an argument
> list, so maybe this is only neccessary on Esix.
>
>4. Change the line in server/Imakefile that reads:
> SYSLIBS = -lm /usr/ucblib/libucb.a
> to read:
> SYSLIBS = -lm -lc /usr/ucblib/libucb.a
>
> This ensures that the directory reading routines from libc.a are
> used intead of the ones in libucb.a (BSD version of readdir).
>
>5. Go for it, with: make World BOOTSTRAPCFLAGS="-DATT -DSVR4 -DSYSV386"
> This took 3.5 hours on a 33MHz 486.
>
>6. fix the 2 suid clients (xterm & xload):
> 'export LD_RUN_PATH=/usr/X386/lib'
> delete mit/clients/xterm/xterm & mit/clients/xload/xload and
> relink them again.
>
>7. make install
>
>If anyone has problems with the X386 server you should be aware that
>MIT was not able to test it because they do not have a SVGA board.
>
>Also, MANY thanks to mark@zok.sgcs.com and roell@dell.com for all the
>work they put into getting X386 included in X11R5.
>--
>Steve Kotsopoulos mail: steve@ecf.toronto.edu
>Systems Analyst bitnet: steve@ecf.UTORONTO.BITNET
>Engineering Computing Facility uucp: uunet!utai!ecf!steve
>University of Toronto phone: (416) 978-5898
>Article 32398 of comp.windows.x:
>>From: mats@alruna.UUCP (Mats Wichmann)
>Newsgroups: comp.windows.x
>Subject: Re: Building X11R5 under AT&T SVR4
>Message-ID: <24624.9109131444@unisoft.unisoft.com>
>Date: 13 Sep 91 14:43:10 GMT
>Sender: daemon@athena.mit.edu (Mr Background)
>Organization: The Internet
>Lines: 37
>
>On Sep 12, 4:48pm, Steve Kotsopoulos wrote:
>] Now that I have the server and clients working, here is a list of
>] things people should check if they are having problems building X11R5
>] (I run AT&T's SVR4, so I'm not sure how much of this applies
>] to DELL, ESIX, ISC or SCO) :-(
>]
>....
>This one for sure applies to all sVr4's:
>]
>] 4. Change the line in server/Imakefile that reads:
>] SYSLIBS = -lm /usr/ucblib/libucb.a
>] to read:
>] SYSLIBS = -lm -lc /usr/ucblib/libucb.a
>]
>] This ensures that the directory reading routines from libc.a are
>] used intead of the ones in libucb.a (BSD version of readdir).
>
>I haven't seen the x11r5 source yet (still waiting, sigh), but this is a
>problem I've run into many a time in the nine months or so I've been running
>sVr4: while the ucblib does provide some useful utility, it has a tendency
>to supply routines you don't expect, so unless you are explicitly trying to
>get a BSD-ish program to work without porting (hint: odds are good you won't
>get away with it anyway), you'll need -lc before -lucb to insure you get
>sVr4's "standard" libc versions of things. The readdir routines are just
>one of many instances of this. You'll probably also need to make sure that
>-I/usr/include precededs -I/usr/ucbinclude.
>
>For things that use Larry Wall's Shell Script From Hell (Configure), it
>might sometimes even be necessary to take /usr/ucb out of your path before
>running it - or it will go find things in /usr/ucb that you don't want
>it to use!!!
>
>
>--
>Mats Wichmann
>Systems Software Consultant
>alruna!mats@unisoft.com