1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
This file contains instructions for compiling the `xgobi' and `xgvis'
executables.
This release is dated November, 1999. If you want to get a newer
distribution before starting, try this URL, and see if the
distribution there is newer:
//////////////////////////////////////////////////////////////
// http://www.research.att.com/areas/stat/xgobi/
//////////////////////////////////////////////////////////////
* Documentation: two papers that are the closest thing to manuals
- for XGobi:
http://www.research.att.com/areas/stat/xgobi/index.html#xgobi
- for XGvis:
http://www.research.att.com/areas/stat/xgobi/index.html#xgvis
* Statlib: We used to keep the latest distribution on statlib
(http://www.stat.cmu.edu/general/XGobi/), but it's quite old at the
moment and will be removed.
* S users: If you wish to use XGobi in conjunction with S, read
Readme.S.
* RPC: If you wish to use XGobi in conjunction with RPC, study the
Imakefile or the Makefile it generates; if necessary ask
symanzik@galaxy.gmu.edu.
//////////////////////////////////////////////////////////////
// Install xgobi and xgvis
//////////////////////////////////////////////////////////////
In the best case, all you need to do is the following:
Unpack the shar file `xgobi.sh' which creates a subdirectory
`xgobi', go to `xgobi/src', create `Makefile' automatically from
`Imakefile' by executing `xmkmf', compile by executing `make', and
finally run by typing `xgobi filename' or `xgvis filename'.
For example:
////////////////////////////////////////////////////////////////
// /bin/sh xgobi.sh # unpack the shar file
// cd xgobi # go to the newly created subdirectory
// cd src # go to the source files
// xmkmf # create `Makefile' from `Imakefile'
// make # compile xgobi and xgvis
//
// # make the xgobi and xgvis executables available,
// # eg, by adding this directory to your path:
// set path = ($path `pwd`) # csh, tcsh, ... users
// export PATH=$PATH:`pwd` # ksh, bash, ... users
// # The above will work for this session; for later
// # sessions, add the appropriate line to your startup
// # file, replacing "`pwd`" with the full pathname of the
// # `src' directory
//
// # finally run two examples:
// # the places rated data and the morsecode data
// xgobi ../data_xgobi/places
// xgvis ../data_xgvis/morsecodes
////////////////////////////////////////////////////////////////
If something doesn't work, read on.
* Most likely something went wrong in `make', in which case you may
have to edit `Imakefile' and recreate `Makefile'. A typical
problem is that the random number generator is misspecified in
`Imakefile'.
* If `xmkmf' just doesn't work, copy a `Makefile*' from the
directory `makefiles' and tailor it; see below.
////////////////////////////////////////////////////////////////
// Editing the Imakefile
These are the lines in the Imakefile you might want to edit:
* to prepare to install xgobi somewhere other than where
you're compiling it,
* to specify a C compiler
* to turning debugging off (to generate smaller binaries)
* to reset the random number generator in case drand48()
isn't present on your machine
////////////////////////////////////////////////////////////////
// XGOBID = $(PWD)/..
// CC = cc
// LD =
// CDEBUGFLAGS = -g
//
///**/# Choose a random number generator, random or drand48
// #R = USE_RANDOM
// R = USE_DRAND48
////////////////////////////////////////////////////////////////
If you know how `xmkmf' works, you can further edit the Imakefile to
make it work, but we don't know enough about it to tell you how.
////////////////////////////////////////////////////////////////
// Editing or hand-crafting the Makefile
// Editing the Makefile
Using Sun's CDE
One xgobi user says that he simply replaced /usr/openwin/bin and
/usr/openwin/lib with /usr/dt/bin /usr/dt/lib in the Makefile
that was generated by 'xmkmf.' After that, his compile was
successful.
// Hand-crafting a Makefile
If you can't figure out how to edit the xmkmf-generated Makefile,
you can work with the example in the directory 'makefiles'
Find the X libraries and include files:
First determine where the X libraries and include files live on your
system. The top-level X11 directory might be called /usr/X11 or
/usr/local/X11, with subdirectories include and lib; alternatively, the X
libraries and include files may be merged with other system files in
/usr/include and /usr/lib.
Edit the Makefile to point to X:
Edit the XGobi Makefile, changing the following two lines to point to the
X11 include files and libraries on your machines:
IDIR= -I/usr/local/pkg/X11/include
LDIR= -L/usr/local/pkg/X11/lib
Other editing that might be required:
In order to use the XGobi help and print facilities, you need to
choose a parent directory in which the help and ps subdirectories
can be found and then edit the Makefile so that the variable
XGOBID points to that directory.
You may also want to change the setting for the random number
generator to be used. Some machines have both drand48 and
random, but some have only one or the other.
////////////////////////////////////////////////////////////////
// Notes
//
// Resources
!! WARNING !! :
If you had an older version of XGobi on your system, then you
should make sure that there is no system XGobi resource file
-- it's no longer needed, and it will now interfere with the
layout. It might be in a system directory named app-defaults
under X's home directory, in a subdirectory named lib or
Xlib. Or it might be that you've put it somewhere else and
set up shell variables to point to it: check the values of
$XFILESEARCHPATH, $XUSERFILESEARCHPATH, and $XAPPLRESDIR.
We've included a file named XGobi.ex as an example of the
resources you'd be most likely to want to tailor in your own
resource file (which you would name XGobi). You (Here you are a
user, not a system administrator.) may want to adjust some
colors, for example, or change the size of the variable labels,
or use a different font. If you do, then choose a place to put
that file -- one custom is to use the directory
$HOME/app-defaults -- and then define XUSERFILESEARCHPATH to be
$HOME/app-defaults/%N.
!! WARNING !! :
A couple of people have had a strange problem with resources,
where just by creating a resource file and putting one or two
lines in it, they've ended up with an XGobi window with its
resources completely haywire. The solution seems to be to
make certain that XFILESEARCHPATH does not include any
reference the the private resource files. Only
XUSERFILESEARCHPATH can be safely used for that purpose.
// Space requirements
Nearly all arrays in XGobi are dynamically allocated, so the only
limitations you should encounter will be the result of space
limitations on your machine. XGobi processes I have observed are
between 1Mb and 2Mb in size -- X programs run large.
There are a few arrays whose length is NCOLS: if you plan to read in
a matrix with more than 200 columns, change the definition of NCOLS
in xgobitypes.h and recompile.
// Sun bug
Thanks to Brian Fitzgerald for the following comment:
Due to a bug in Sun's ld and/or libXmu.s[ao].4.0, some people
get this error message:
ld: Undefined symbol
_get_wmShellWidgetClass
_get_applicationShellWidgetClass
*** Error code 2
This is described in comp.windows.x FAQ 94. Sun patches 100170,
100512, and 100573 fix these bugs.
Linking with ... -Bstatic -lXmu -Bdynamic ... is a known
workaround.
// Compiling under Solaris
Some folks have told me that setting OPENWINHOME in the
Makefile (or even the Imakefile?) solves a lot of problems,
including the mysterious menu12 bug (see below).
If you want to compile xgobi under Solaris, and you can't get
the Imakefile's Makefile to work, change the LIBS line in the
Makefile to
LIBS= -L$(LDIR) -R$(LDIR) -lXaw -lXt -lXmu -lXext -lX11 -lsocket -lnsl -lm
Somebody told me that, in order to run xgobi under Solaris,
he had to set LD_LIBRARY_PATH to /opt/SUNWspro/lib:/usr/openwin/lib.
Somebody else said that using the -R option above eliminates the
need to tinker with LD_LIBRARY_PATH.
// Optimization in compiling
We've experimented a bit with optimization; it's certainly
possible to optimize the compilation of XGobi, using either
cc or gcc, but we've never seen it make a difference in
execution speed because usually it's the graphics operations
that limit XGobi's speed.
// Missing menu12
We don't know why some X Window System installations don't have
the 'menu12' bitmap readily available when most do. For us, the
file menu12 is installed as
/usr/include/X11/bitmaps/menu12
We include a copy of the file in the bitmaps directory in
case you can't find it.
|