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

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