🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #5433

Re: SUN and XBoard query

#5433
From: Tim Mann
Date: Thu, 23 Sep 1993 19:16
246 lines
10664 bytes
There are many different versions of Sun's operating system and window
system software in use, and the recipe for building xboard varies
depending on which one you have.  Since you didn't say which one you
have, I can't give exact instructions.  However, here are updated
copies of the INSTALL file and the Imakefile.  They contains some
additional information that I didn't have when making the 3.0.pl8 or
3.0.pl9 releases.

My guess is that following the instructions for SunOS 4.1.3 below will
solve your problem.

	--Tim

----------
Imakefile
----------
#
# Imakefile -- for instructions on generating a Makefile
#   for xboard from this file, see the file INSTALL
#

   SYS_LIBRARIES = -lm
 LOCAL_LIBRARIES = XawClientLibs
         DEPLIBS = XawClientDepLibs
         DEFINES = -DHAS_GETTIMEOFDAY
#    CDEBUGFLAGS = -g
#             CC = gcc -Wall -pedantic -ansi -Wno-implicit -Wno-comment
#             CC = gcc -Wall -traditional
       MANSUFFIX = 6

#ifdef HPArchitecture
       CCOPTIONS = -Aa -D_HPUX_SOURCE
#endif

# Uncomment the next line for Sun's Solaris 2.x, per Mark Silver:
#  SYS_LIBRARIES =  -lsocket -lnsl -lelf -lm -L/usr/ucblib -lucb
# Solaris users also need to add /usr/ucblib to their LD_LIBRARY_PATH
# environment variable to run the resulting binary.  To do this,
# add the following line (or something like it) to your .login file,
# then log out and back in:
#	setenv LD_LIBRARY_PATH ${OPENWINHOME}/lib:/usr/lib:/usr/ucblib
# Thanks to Arik Klingensmith for the "setenv" information.

# If you get the following linker error messages on SunOS, you have
# hit a known bug in the SunOS linker (ld).
#	ld: Undefined symbol 
#	  _get_wmShellWidgetClass 
#	  _get_applicationShellWidgetClass 
# To work around it,  try uncommenting this:
#         XMULIB = -Bstatic -lXmu -Bdynamic
# Ask Sun for patches 100512-02 and 100573-03 to get the real fix.

# Try uncommenting this if you use gcc and xboard crashes in sscanf.
# Probably needed on VAX Ultrix 3.1 and on IBM PS/2 AIX.
#      CCOPTIONS = -fwritable-strings

SRCS = parser.c xboard.c backend.c
OBJS = parser.o xboard.o backend.o
#SRCS = parser.c xboard.c backend.c zippy.c
#OBJS = parser.o xboard.o backend.o zippy.o

AllTarget(xboard)
AllTarget(cmail)

depend:: parser.c

clean::
	$(RM) parser.c chess.lst CLp*

ComplexProgramTarget(xboard)
InstallProgram(cmail,$(BINDIR))
InstallManPage(cmail,$(MANDIR))


----------
INSTALL
----------
How to build and install XBoard
-------------------------------

To build and install xboard on your system, you will need to generate
a properly customized Makefile for it, probably using imake, a program
that comes with the X Window System.

Before you do this, you may need to edit the Imakefile.  xboard has
special code for certain systems that is enabled or disabled by ifdefs
in xboard.c.  A few systems do not automatically define a symbol that 
can be used to select the right ifdef, so you have to define it yourself
in the Imakefile.  Here is a list of ifdef symbols used in xboard.  To
add one of these, for example FOO, to your Imakefile, add the string -DFOO
to the end of the DEFINES line, separated by a space from what's already
there.

IRIX			-- Silicon Graphics IRIX.
IRIS			-- Old version of Silicon Graphics Iris code; try
			     IRIX first.
AIXV3			-- IBM AIX, version 3.
IBMRTAIX		-- AIX for the IBM RT.  I don't know how this
			     differs from AIXV3.  Use what works for you.
ESIX			-- The ESIX operating system.
SYSTEM_FIVE		-- Unix System V.
SYSV			-- Unix System V.
SVR4			-- Unix System V, release 4.
HPUX or hpux		-- Hewlett-Packard HPUX.
UNIPLUS			-- Uniplus Unix.
sun			-- SUN Microsystems. (**see below**)
RTU			-- I don't know what this is for!
__STDC__		-- Automatically defined by ANSI C compilers.
ATTENTION		-- Define this if your version of gnuchess
			     requires you to get its attention by
			     hitting ^C when you want to move while it
			     is thinking on your time.
HAS_GETTIMEOFDAY	-- Remove this if you don't have the getttimeofday()
			     system call.
HAS_FTIME		-- Add this if you don't have gettimeofday() but you
			     do have ftime().  If you don't define either
			     HAS_GETTIMEOFDAY or HAS_FTIME, xboard will keep
			     time only to the nearest second.
FLEX			-- Add this if you are using "flex" instead of Unix
			     "lex" to process parser.l.  Needed by linux.
OMIT_SOCKETS		-- Add this if you want to omit the code in
			     xboard that uses sockets.  If you do so,
			     xboard will not be able to communicate with
                             the ICS by opening a direct TCP connection,
                             but the -useTelnet and -gateway options will
                             still work.

After editing the Imakefile, you should be able to generate a correct
Makefile by typing the command "xmkmf" in the xboard source directory.
This command is supposed to run imake with the right flags for your
site.  If you get "Command not found," make sure the directory
containing xmkmf is on your search path.  (It is /usr/local/X11/bin on
many systems.)  If xmkmf doesn't work, you can try the following
command, editing the pathnames first if the X release is installed in
a different place on your system:

	/usr/local/X11/mit/config/imake \
	        -I/usr/local/X11/mit/config \
	        -DTOPDIR=/usr/local/X11/mit

Once you have a working Makefile, if you need to make further changes
to the Imakefile, you can use the command "make Makefile" to update
the Makefile after you edit the Imakefile.

After you have a working Makefile, you of course need to type "make"
to build xboard.

Typing "make install" will try to install xboard, cmail, and their
manual pages for public use on your system.  (If you aren't a system
administrator, you may not have the necessary privileges to do this.)

If you want to read the manual pages without actually installing them
where the "man" command can find them, type the command "nroff -man
xboard.man | more" or "nroff -man cmail.man | more"


********** Information for linux users **************************************
If you have problems building and running xboard on linux, be sure you
have defined FLEX in the Imakefile (see above), and be sure you have
the latest versions of linux and its X package.  xboard is known to
work with "the SLS 1.03 package with the linux 0.99pl12 kernel and
Xfree 1.3".  (This is Greek to me; hope it makes sense to you.)


********** Information for Sun users ****************************************
There are lots of different kinds of Suns with different operating
system and window system versions that run on them.  I don't
personally have access to any of them, but xboard is known to work on
at least some.  I would like to collect more information about what
has to be put in the Imakefile to build xboard for each type of Sun
and each operating system/window system, so please send mail if these
instructions don't work for you---especially if you find out how to
fix them!  (See the READ_ME file for the mail address to use.)

** Solaris 2.x *************************
For Solaris 2.x (SunOS 5.x) you need to uncomment a line in the
Imakefile, as shown just below:

# Uncomment the next line for Sun's Solaris 2.x, per Mark Silver:
   SYS_LIBRARIES =  -lsocket -lnsl -lelf -lm -L/usr/ucblib -lucb

Solaris users also need to add /usr/ucblib to their LD_LIBRARY_PATH
environment variable.  To do this, add the following line (or
something like it) to your .login file, then log out and back in:

	setenv LD_LIBRARY_PATH ${OPENWINHOME}/lib:/usr/lib:/usr/ucblib

Thanks to Arik Klingensmith for the "setenv" information.

Also, ignore any compiler messages you get that start with the word
"warning."  I try to eliminate those, but there is only so much I can
do to accomodate the many different C compilers in the world.  Sun's
ANSI C compiler is especially picky.

** SunOS 4.x (Solaris 1.x) ***************************
On SunOS 4.1.3 with OpenWindows, you need to do the following:

1) Edit the Imakefile to add -Dsun to the DEFINES and (if necessary)
to uncomment the XMULIB line (delete the # at the front of the line):

         DEFINES = -DHAS_GETTIMEOFDAY -Dsun

...

# If you get the following linker error messages on SunOS, you have
# hit a known bug in the SunOS linker (ld).
#	ld: Undefined symbol 
#	  _get_wmShellWidgetClass 
#	  _get_applicationShellWidgetClass 
# To work around it,  try uncommenting this:
         XMULIB = -Bstatic -lXmu -Bdynamic
# Ask Sun for patches 100512-02 and 100573-03 to get the real fix.


2) The xmkmf in at least some versions of OpenWindows is broken.
Instead of running xmkmf, try this:

  /usr/openwin/bin/imake -DStandardIncludes=-I/usr/openwin/include \
	-DUseInstalled -I/usr/openwin/lib/config \
	-DDefaultCCOptions=-L/usr/openwin/lib

Without this, the Makefile will not know about the include files and
libraries in /usr/openwin.

Thanks to Ed Hanway for some of this information, and thanks to Jim
Daly for letting me log onto his machine and figure out the rest of it
myself.

********** Information for Convex users ONLY ********************************
From: Richard Mathar <mathar@fz-rossendorf.de>
Date: Sun, 13 Jun 1993 16:52:37 +0200

xboard-2.0 patchlevel 21 could be compiled using
	imake -I/usr/X11/lib/config -DTOPDIR=/usr/X11/lib
and editing some lines in the Makefile to read afterwards

        CONFIGSRC = $(LIBSRC)/config
     EXTENSIONSRC = $(INCDIR)/extensions
         XILIBSRC = $(EXTENSIONSRC)/Xinput
      PHIGSLIBSRC = $(EXTENSIONSRC)/PEX
  DEPEXTENSIONLIB =  $(LIBSRC)/libXext.a
          DEPXLIB = $(DEPEXTENSIONLIB)  $(LIBSRC)/libX11.a
             XLIB = $(EXTENSIONLIB)   $(LIBSRC)/libX11.a
        DEPXMULIB =  $(LIBSRC)/libXmu.a
      DEPXTOOLLIB =  $(LIBSRC)/libXt.a
************************************************************************
Technical Details
Message-ID: <27ssmj$1b2@src-news.pa.dec.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!olivea!hal.com!decwrl!src.dec.com!mann
References: <1993Sep23.124636.27288@bradford.ac.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,9121fef8352d4ae9
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 1993-09-23 12:58:41 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!spool.mu.edu!olivea!hal.com!decwrl!src.dec.com!mann
From: mann@src.dec.com (Tim Mann)
Newsgroups: gnu.chess
Subject: Re: SUN and XBoard query
Date: 23 Sep 1993 19:16:35 GMT
Organization: DEC Systems Research Center
Lines: 248
Message-ID: <27ssmj$1b2@src-news.pa.dec.com>
References: <1993Sep23.124636.27288@bradford.ac.uk>
NNTP-Posting-Host: cypress.pa.dec.com