root/juggler/tags/1.1_dr_2/INSTALL.txt

Revision 10345, 21.1 kB (checked in by patrickh, 6 years ago)

Regen.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1                   Building and Installing the Juggler Project
2
3   The Juggler Team
4
5    $Date$
6
7      ----------------------------------------------------------------------
8
9    Table of Contents
10
11    Introduction
12
13                 Important Notes for IRIX Users
14
15                 Important Note for Win32 Users
16
17    Getting the Source Code
18
19                 How to get the Juggler Suite and external package
20                 dependencies
21
22                 Using cvs-gather
23
24    Compiling
25
26                 Important Note Regarding Compiling
27
28                 Compiling the Juggler Suite of Tools
29
30                 Compiling individual tools in the Juggler Suite
31
32 Introduction
33
34    This document explains how to build the modules of the Juggler Project
35    from the source code. We begin by explaining some issues related to
36    specific operating systems. We then explain how to get the source code
37    from our CVS repository. (Those users who downloaded a pre-packaged source
38    release can skip ahead to the section called "Using configure.pl"). We
39    conclude with instructions on how to build VR Juggler and its individual
40    components.
41
42    Before reading further, we recommend that readers take a look at the Wiki
43    page relating to building from CVS
44    (http://www.vrjuggler.org/twiki_public/bin/view/Juggler/BuildingFromCvs).
45    It is a supplement to this document containing tips and reminders for
46    those users building the CVS version of VR Juggler. It is not a
47    replacement for this document, nor can it stand on its own as build
48    instructions. You are reading the definitive build instructions; the Wiki
49    page merely provides informal, extra information.
50
51   Important Notes for IRIX Users
52
53    Despite our best efforts, there are some issues related to compiling the
54    Juggler Project on IRIX. We introduce them in this section and explain how
55    to work around them.
56
57     Perl Version
58
59    There are many Perl scripts used as part of getting, configuring, and
60    building the Juggler Suite of tools. In particular, two scripts required
61    for compiling need Perl 5.005 or newer. The version of Perl that ships
62    with IRIX 6.5 is very old (circa 1997) and does not work with many Perl
63    scripts we have written. SGI provides a much newer version of Perl (5.6.1)
64    with their freeware tools (http://freeware.sgi.com/). It will be necessary
65    to install that version for our scripts to work. This version is typically
66    installed as /usr/freeware/bin/perl.
67
68    Once you have a modern Perl installed, you can run various Perl scripts as
69    follows:
70
71  /usr/freeware/bin/perl <script-name>
72
73    The above will be required any time a Perl script fails with an error
74    similar to the following:
75
76  Perl 5.005 required--this is only version 5.00404, stopped at ./configure.pl line 35.
77  BEGIN failed--compilation aborted at ./configure.pl line 35.
78
79     MIPSpro Compiler Version
80
81    Reports have been made on the VR Juggler mailing list regarding compile
82    failures (including segmentation faults within the compiler) occur when
83    using the MIPSpro Compilers Version 7.3.1.1m. We have found upgrading to
84    Version 7.3.1.3m (or newer) fixes the problems.
85
86    A new feature of VR Juggler 1.1 is support for GCC on IRIX. Users who do
87    not have MIPSpro or cannot upgrade can compile and run VR Juggler (without
88    OpenGL Performer support) using the version of GCC distributed by SGI. It
89    can be downloaded from http://freeware.sgi.com/index-by-alpha.html for
90    free. When configuring the source with configure.pl (described later), use
91    the option --with-gcc.
92
93   Important Note for Win32 Users
94
95    VR Juggler 1.1 uses a lot of C++ templates. Some components of the system
96    will not compile with MS Visual Studio 6.0, and as a result, we currently
97    require the use of Visual Studio 7 (.NET) to compile the source code. We
98    understand that this is an inconvenience, and we are interested in methods
99    for compiling the code with Visual Studio 6. However, due to VC6's poor
100    support for templates and the C++ standard in general, users need to be
101    aware that it may not be possible.
102
103 Getting the Source Code
104
105    This section is for those users who want to get the Juggler Project source
106    code from the CVS repository on SourceForge. Those users who have
107    downloaded a pre-packaged version of the source can skip ahead to the
108    section called "Using configure.pl".
109
110    Getting the source code takes a few steps. You have to first download or
111    check out the Juggler Project source code and some external packages such
112    as GMTL, CppDOM, Boost, and possibly NSPR. The steps are listed in the
113    following subsections. The current list of required software packages is
114    as follows:
115
116      o GMTL (http://ggt.sf.net/): A generic math library that makes use of
117        C++ templates and STL paradigms
118
119      o CppDOM (http://www.sf.net/projects/xml-cppdom/): A lightweight,
120        easy-to-use XML parser written in C++
121
122      o Boost (http://www.boost.org/): A C++ library providing many powerful
123        tools
124
125      o Doozer++ (http://www.sf.net/projects/doozer/): A foundation the
126        development of complex build systems using Autoconf and GNU make. This
127        is the basis for the entire VR Juggler build system.
128
129      o Doozer (http://www.sf.net/projects/doozer/): A foundation for rapid
130        makefile development based on GNU make. This is needed for building
131        the sample VR Juggler applications.
132
133    The following lists semi-optional packages:
134
135      o NSPR (http://www.mozilla.org/projects/nspr/): The Netscape Portable
136        Runtime, which can be used by VPR for threading and sockets (required
137        on Win32)
138
139      o JDOM (http://www.jdom.org/): An XML parser for Java (required only for
140        VjControl, the GUI for editing VR Juggler configuration files)
141
142    The following describes how to get all of the above except JDOM and NSPR.
143    These must be downloaded separately.
144
145   How to get the Juggler Suite and external package dependencies
146
147    You can optionally get the Juggler Project as a source code tarball from
148    the website (http://www.vrjuggler.org/) or you can follow these steps to
149    get the code from our CVS repository.
150
151    1. Check out the 'juggler' module using CVS.
152
153  cvs -d :pserver:anonymous@cvs.vrjuggler.sourceforge.net:/cvsroot/vrjuggler login
154  cvs -z3 -d :pserver:anonymous@cvs.vrjuggler.sourceforge.net:/cvsroot/vrjuggler co juggler
155
156    2. Get external packages that Juggler depends on. Typically you will run
157        cvs-gather.pl, found in the top-level juggler directory. For most
158        users, the follow command will do the job:
159
160  ./cvs-gather.pl --verbose
161
162        Ideally, users can just let the command run, but sometimes a password
163        must be entered. The CVS password prompt will appear at such times.
164        Each of the projects downloaded using cvs-gather come from
165        SourceForge, and for anonymous CVS access there is no password. Hence,
166        simply pressing the ENTER key will allow the download to continue.
167
168        You can use the cvs-gather tool, or you can read the file Gatherrc and
169        get the packages manually. If you choose not to use cvs-gather, you
170        must be familiar with CVS and with the use of CVS tags to check out
171        code. For more details about cvs-gather, see the section called "Using
172        cvs-gather". If you choose to follow this step as shown above, you may
173        skip ahead to the section called "Compiling".
174
175   Using cvs-gather
176
177    cvs-gather is a utility we include in the base juggler source directory to
178    help you collect third-party (external) source code that the Juggler
179    Project needs in order to build. To get help on using this tool, use one
180    of the following (the second version gives much more detailed output):
181
182  ./cvs-gather.pl --help
183  ./cvs-gather.pl --manual
184
185     Standard use of cvs-gather
186
187    In most cases, cvs-gather can be used as follows:
188
189  ./cvs-gather.pl
190
191    All the output will be written to the file gather.log. If you would like
192    to see the progress of CVS as it checks out files, run the command this
193    way:
194
195  ./cvs-gather.pl --verbose
196
197     Advanced use of cvs-gather
198
199    Use of cvs-gather is not required. You can limit what packages are
200    downloaded. You can even skip cvs-gather altogether if you already have
201    all the necessary packages in your system or if you feel like getting
202    these packages manually. For a list of the package dependencies, refer to
203    the file juggler/Gatherrc. For more information about the file format,
204    refer to the cvs-gather manual.
205
206    To limit which packages get downloaded through cvs-gather, use the
207    --target option, as shown below:
208
209  ./cvs-gather --target Boost,Doozer++
210
211    or
212
213  ./cvs-gather --target Boost --target Doozer++
214
215    The names given as arguments to --target are the module names listed in
216    juggler/Gatherrc. Any number of target module names may be listed.
217
218    For cvs-gather to work, it uses a "gather rc" file. This file specifies
219    the external project CVS locations. cvs-gather reads these CVS locations
220    and then checks each one out locally for use in building the Juggler
221    Project. There are three possible default names for a "gather rc" file:
222
223    1. Gatherrc (in the working directory)
224
225    2. .gatherrc (in the working directory)
226
227    3. $HOME/.gatherrc
228
229    cvs-gather searches for these three files by default in the order shown
230    above. Alternatively, a user-defined file (deps.gatherrc, for example) can
231    be named on the command line as follows:
232
233  ./cvs-gather.pl --cfg=deps.gatherrc
234
235    To simplify shared use of a single configuration file, the contents of the
236    file may be overridden on the command line or through the use of an
237    "overrides" file. The following shows such a file that overrides the
238    CVSROOT settings in juggler/Gatherrc:
239
240        #JugglerBaseStuff.CVSROOT=patrickh@cvs.vrjuggler.sourceforge.net:/cvsroot/vrjuggler
241        Doozer.CVSROOT = patrickh@cvs.doozer.sourceforge.net:/cvsroot/doozer
242        Doozer++.CVSROOT = patrickh@cvs.doozer.sourceforge.net:/cvsroot/doozer
243        GMTL.CVSROOT = patrickh@cvs.ggt.sourceforge.net:/cvsroot/ggt                 
244
245    The current Gatherrc only allows anonymous CVS access. To override that,
246    we suggest making per-user override files. To use the override file, just
247    add the argument --override=<filename> when running cvs-gather.
248
249    The following shows how to run cvs-gather with your own overrides file
250    (called my_gatheroverride):
251
252  cvs-gather.pl --override=my_gatheroverride
253
254    If all goes well, you'll get everything you need to compile.
255
256 Compiling
257
258    In this section, we describe how to compile the Juggler Project. We focus
259    on VR Juggler as a whole, but information about some of the individual
260    components is provided later.
261
262   Important Note Regarding Compiling
263
264    You have downloaded developmental code. It may not be stable, and it may
265    not even compile. Compiling VR Juggler itself can be a little complicated
266    for anyone who does not have some background in Autoconf, C++, and make.
267
268   Compiling the Juggler Suite of Tools
269
270    This section explains how to get, configure, and compile all of the tools
271    that make up VR Juggler. Each tool compiles to its own library and can be
272    installed individually. (Refer to the README file in this directory for
273    more information about the specific modules.)
274
275     Configuring VR Juggler
276
277    Every time you update the source code acquired from CVS and cvs-gather, it
278    is recommended that you run autogen.sh. This script is found in the
279    top-level juggler directory, and it is run as follows:
280
281  ./autogen.sh
282
283   Note
284
285    On Win32, recent versions of Cygwin install Autoconf 2.13 and Autoconf
286    2.5x. Similarly, Automake 1.4 and Automake 1.5 are installed. The former
287    versions (2.13 and 1.4) are considered "stable" while the latter are
288    "developmental". While the VR Juggler build system does work with either
289    set on UNIX-based systems, the build system does not work with Automake
290    1.5 on Win32. At this time, it is unclear why it does not work, but the
291    following provides a workaround for running autogen.sh on Win32 using the
292    default BASH environment:
293
294  ACLOCAL=/usr/autotool/stable/bin/aclocal ./autogen.sh
295
296    If you are using tcsh, use the following command instead:
297
298  env ACLOCAL=/usr/autotool/stable/bin/aclocal ./autogen.sh
299
300       Using configure.pl
301
302    In the base juggler source directory, we have a "global" configure script
303    written in Perl called configure.pl. To get the command-line options for
304    this script, use one of the following (the second being much more
305    detailed):
306
307  ./configure.pl --help
308  ./configure.pl --manual
309
310    To configure your system, you will need to see what options all the
311    Autoconf-based configure scripts in VR Juggler need. To get this text,
312    enter:
313
314  ./configure.pl --all-help
315
316    configure.pl can run in a different "build" directory or in the directory
317    where it resides. Here is how we (the Juggler Team) have been using it:
318
319    1. Make a directory for compiling. There are many good reasons to do this
320        away from the main source tree (though they will not be listed here).
321
322  mkdir build.linux.posix
323
324        This example using an ad hoc naming convention based on operating
325        system and threading subsystem. Other examples could be
326        build.irix.sproc, build.solaris.nspr, etc.
327
328    2. Enter the new build directory.
329
330  cd build.linux.posix
331
332    3. Configure all the modules making up VR Juggler. This is when you must
333        tell the module configure scripts where all the package dependencies
334        are found. For this description, we will use the term <JDOMPATH> to
335        refer to the JDOM installation. Assume that this is an absolute path
336        (e.g., <JDOMPATH> = /home/user1/pkgs/jdom).
337
338  ../configure.pl --prefix=$HOME/vrjuggler-2.0 --with-jdom="<JDOMPATH>/build/jdom.jar:<JDOMPATH>/lib/xerces.jar"
339
340        On Win32, remember that the path is given as the full DOS drive path,
341        but / should be used instead of \ as the path separator.
342
343    By default, the configuration process will configure VR Juggler and all of
344    its dependencies. This includes Sonix, which is an interesting special
345    case. Sonix can make use of OpenAL or AudioWorks to provide spatialized
346    sound in VR Juggler applications. If neither of those packages is found,
347    Sonix will "stub out" its sound APIs. This means that Sonix and the VR
348    Juggler Sound Manager can still be used in applications, but no audio will
349    be heard at run time. See the section called "Sonix (individual)" for more
350    information about how to configure Sonix to use OpenAL or AudioWorks.
351
352    For example uses of configure.pl, take a look at the Wiki page relating to
353    building from CVS
354    (http://www.vrjuggler.org/twiki_public/bin/view/Juggler/BuildingFromCvs).
355    It is not a replacement for this document, but it shows how some members
356    of the Juggler team configure VR Juggler. It also has information on more
357    advanced uses of configure.pl that are beyond the scope of this document.
358
359       Using locally installed software
360
361    As noted in the section called "Getting the Source Code", VR Juggler
362    depends on several external software packages. The cvs-gather tool
363    collects the source code for those packages into the directory
364    juggler/external, but some users may already have one or more of these
365    installed locally. For those users, they have the option of referring to
366    the local installation(s) and limiting the work done by cvs-gather (see
367    the section called "Advanced use of cvs-gather" for more details).
368
369    As an example, consider the case where the Boost C++ library is installed
370    in /usr/local with the headers in /usr/local/include. To use this instead
371    of the version downloaded into juggler/external, run configure.pl as
372    follows:
373
374  ../configure.pl --with-boostroot=/usr/local
375
376    This option could of course be mixed in with those shown in the previous
377    section. In this situation, all paths for the Boost headers will reference
378    /usr/local/include; everything in juggler/external/boost will be ignored.
379
380    There are similar options for GMTL and CppDOM. Other external dependencies
381    not downloaded with cvs-gather, such as NSPR and JDOM, require the use of
382    such command-line arguments. Refer to the output from running configure.pl
383    --all-help for more detailed information.
384
385     Compiling VR Juggler
386
387    Once the configuration process is complete, the code can be compiled.
388    Remember that we require the use of GNU make 3.78 or newer.
389
390    1. Compile the source tree using GNU make.
391
392  gmake build
393
394    2. Once this completes, you will have a full build of VR Juggler. For
395        those who are not interested in developing VR Juggler or its component
396        modules, it is recommended that you install the software and use the
397        installed version for application development. Do this as follows:
398
399  gmake install
400
401   Compiling individual tools in the Juggler Suite
402
403    Sometimes you do not want to build everything in the Juggler Suite. Here
404    are steps for configuring/building each package individually.
405
406     VPR (individual)
407
408    VPR can be configured a number of ways. Except when building on Win32, no
409    external packages are required. For Win32, NSPR (www.mozilla.org) is
410    required. To build VPR, do the following from the top-level juggler
411    directory:
412
413    1. mkdir build.vpr
414  cd build.vpr
415
416    2. ../configure.pl --module=VPR --prefix=$HOME/vpr-inst
417
418    3. gmake debug install-debug
419
420    4. setenv VPR_BASE_DIR $HOME/vpr-inst
421
422    If you want to use NSPR, make sure a binary version is installed. In step
423    2, add the arguments --enable-subsystem=NSPR and --with-nspr=<path to
424    NSPR>. Once that is done, proceed with steps 3 and 4 as normal.
425
426     Sonix (individual)
427
428    Sonix requires a third-party software package called GMTL (ggt.sf.net).
429    Sonix wraps other audio subsystems such as OpenAL (www.openal.org) or
430    AudioWorks (multigen.com). One of these subsystems are required in order
431    to hear sound. Once you have all the necessary source code and third-party
432    package installations, to the following from the top-level juggler
433    directory:
434
435    1. mkdir build.sonix
436  cd build.sonix
437
438    2. Choose one of the following depending on which subsystem (or both) you
439        want to enable in sonix...
440
441  ../configure.pl --module=Sonix --prefix=$HOME/sonix-inst --enable-openal --with-oalroot=/usr/local
442  ../configure.pl --module=Sonix --prefix=$HOME/sonix-inst --enable-audioworks
443
444    3. gmake debug install-debug
445
446    4. setenv SNX_BASE_DIR $HOME/sonix-inst
447
448     JCCL (individual)
449
450    JCCL requires VPR, CppDOM (http://www.sf.net/projects/xml-cppdom/), and
451    JDOM B7 or newer (http://www.jdom.org/). To build JCCL, do the following
452    from the top-level juggler directory:
453
454    1. mkdir build.jccl
455  cd build.jccl
456
457    2. ../configure.pl --module=JCCL --prefix=$HOME/jccl-inst --with-jdom="<JDOMPATH>/build/jdom.jar:<JDOMPATH>/lib/xerces.jar"
458
459    3. gmake debug install-debug
460
461    4. setenv JCCL_BASE_DIR $HOME/jccl-inst
462
463     Gadgeteer (individual)
464
465    Gadgeteer depends on JCCL and on VPR. It also needs the third-party math
466    library GMTL (http://ggt.sf.net/). Assuming you have all the source code,
467    do the following from the top-level juggler directory:
468
469    1. mkdir build.gadgeteer
470  cd build.gadgeteer
471
472    2. ../configure.pl --module=Gadgeteer --prefix=$HOME/gadgeteer-inst --with-jdom="<JDOMPATH>/build/jdom.jar:<JDOMPATH>/lib/xerces.jar"
473
474    3. gmake debug install-debug
475
476    4. setenv GADGET_BASE_DIR $HOME/gadgeteer-inst
477
478     Tweek (individual)
479
480    Tweek depends on VPR. It needs JDK 1.3.1, JDOM B7 or newer, and the
481    third-party CORBA implementations omniORB 3.0.4 or newer (C++) and OpenORB
482    1.2.0 or newer (Java). These packages can be downloaded from the following
483    websites:
484
485      o JDOM: http://www.jdom.org/
486
487      o omniORB: http://www.omniorb.org/ or http://omniorb.sourceforge.net/
488
489      o OpenORB: http://openorb.exolab.org/ or http://openorb.sourceforge.net/
490
491    For the following steps, assume that you have omniORB installed in
492    <OMNIORBPATH>, OpenORB is installed in <OPENORBPATH>, and JDOM is
493    installed in <JDOMPATH>.
494
495    IRIX users must configure Tweek (and its VPR dependency) to use the POSIX
496    subsystem or the NSPR subsystem. omniORB will not work with SPROC threads.
497    To configure VPR to use either POSIX threads or NSPR threads, pass either
498    --enable-subsystem=POSIX or --enable-subsystem=NSPR to configure.pl
499    respectively.
500
501    Assuming you have the external packages installed, do the following from
502    the top-level juggler directory:
503
504    1. mkdir build.tweek
505  cd build.tweek
506
507    2. ../configure.pl --module=Tweek --prefix=$HOME/tweek-inst --with-jdom=<JDOMPATH>/jdom.jar:<JDOMPATH>/xerces.jar --with-cxx-orb=omniORB3 --with-cxx-orb-root=<OMNIORBPATH> --with-java-orb=OpenORB --with-java-orb-jar=<OPENORBPATH>/lib/openorb-1.2.0.jar
508
509    3. gmake debug install-debug
510
511    4. setenv TWEEK_BASE_DIR $HOME/tweek-inst
512
513    If JDK 1.4.0 is used, you do not need OpenORB (or any other third-party
514    CORBA implementation for Java). In that case, pass --with-java-orb=JDK to
515    configure.pl.
516
517    Depending on your omniORB installation, you may have to pass extra
518    arguments to configure.pl so that the configuration process can find the
519    omniidl binary and the omniORB libraries. For example, on RedHat Linux
520    7.2, the following arguments must be specified in addition to the above:
521
522  --with-cxx-orb-bin=<OMNIORBPATH>/bin/i586_linux_2.0_glibc --with-cxx-orb-lib=<OMNIORBPATH>/lib/i586_linux_2.0_glibc
Note: See TracBrowser for help on using the browser.