root/juggler/tags/2.0.1/INSTALL.txt

Revision 18056, 21.1 kB (checked in by anonymous, 3 years ago)

This commit was manufactured by cvs2svn to create tag
'VRJ_RELENG_2_0_1_RELEASE'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1
2
3 Building and Installing the Juggler Project (Version 2.0)
4
5
6 The Juggler Team
7
8  $Date$
9
10 ----------------------------------------------------------------------------
11  Table of Contents
12
13
14
15   Introduction
16
17
18         Important Notes for IRIX Users
19
20         Important Note for Win32 Users
21
22
23   Getting the Source Code and the Dependencies
24
25
26         How to Get the Juggler Suite from CVS
27
28         Downloading Third-Party Dependencies
29
30
31   Compiling
32
33
34         Important Note Regarding Compiling
35
36         Compiling the Juggler Suite of Tools
37
38         Tips for Compiling Individual Tools in the Juggler Suite
39
40
41
42 Introduction
43
44  You have downloaded the source code for Version 2.0 of the Juggler Project.
45  This document explains how to build the modules of the Juggler Project from
46  the source code. We begin by explaining some issues related to specific
47  operating systems. We then explain how to get the source code from our CVS
48  repository. (Those users who downloaded a pre-packaged source release can
49  skip ahead to the section called "Using configure.pl"). We
50  conclude with instructions on how to build VR Juggler and its individual
51  components.
52
53  Before reading further, we recommend that readers take a look at the Wiki
54  page relating to building from CVS (http://www.vrjuggler.org/twiki_public/
55  bin/view/Juggler/BuildingFromCvs). It is a supplement to this document
56  containing tips and reminders for those users building the CVS version of
57  VR Juggler. It is not a replacement for this document, nor can it stand on
58  its own as build instructions. You are reading the definitive build
59  instructions; the Wiki page merely provides informal, extra information.
60
61
62 Important Notes for IRIX Users
63
64  Despite our best efforts, there are some issues related to compiling the
65  Juggler Project on IRIX. We introduce them in this section and explain how
66  to work around them.
67
68
69 Perl Version
70
71  There are many Perl scripts used as part of getting, configuring, and
72  building the Juggler Suite of tools. In particular, two scripts required
73  for compiling need Perl 5.005 or newer. The version of Perl that ships with
74  IRIX 6.5 is very old (circa 1997) and does not work with many Perl scripts
75  we have written. SGI provides a much newer version of Perl (5.6.1) with
76  their freeware tools (http://freeware.sgi.com/). It will be necessary to
77  install that version for our scripts to work. This version is typically
78  installed as /usr/freeware/bin/perl.
79
80  Once you have a modern Perl installed, you can run various Perl scripts as
81  follows:
82
83
84   /usr/freeware/bin/perl <script-name>
85
86  The above will be required any time a Perl script fails with an error
87  similar to the following:
88
89
90   Perl 5.005 required--this is only version 5.00404, stopped at ./
91   configure.pl line 35.
92   BEGIN failed--compilation aborted at ./configure.pl line 35.
93
94  Furthermore, it is highly recommended that the --with-perl argument be
95  passed to configure.pl. This argument gives all the Autoconf-based
96  configure scripts a hint about where the preferred version of Perl lives.
97  If using /usr/freeware/bin/perl to run configure.pl, we recommend that the
98  configure.pl command line appear similar to the following:
99
100
101   /usr/freeware/bin/perl configure.pl --with-perl=/usr/freeware/bin
102
103  Note that the value given to --with-perl is the directory where the perl
104  executable can be found. The configure scripts will add this directory to
105  the front of the search path when trying to find a suitable perl
106  executable. Once it is found, all the Perl scripts used for configuration,
107  compilation, and installation will use that executable.
108
109  To simplify command execution somewhat, it can help to have /usr/freeware/
110  bin (or whatever path is appropriate) in your path before /bin or /usr/bin
111  or any of the other myriad directories where Perl might exist on IRIX. In
112  such a situation, none of the above extra steps should be necessary. The
113  correct version of Perl will be found simply by virtue of it being early in
114  your path.
115
116
117 MIPSpro Compiler Version
118
119  Reports have been made on the VR Juggler mailing list regarding compile
120  failures (including segmentation faults within the compiler) occur when
121  using the MIPSpro Compilers Version 7.3.1.1m. We have found upgrading to
122  Version 7.3.1.3m (or newer) fixes the problems.
123
124  A new feature of VR Juggler 1.1 and newer is support for GCC on IRIX. Users
125  who do not have MIPSpro or cannot upgrade can compile and run VR Juggler
126  (without OpenGL Performer support) using the version of GCC distributed by
127  SGI. It can be downloaded from http://freeware.sgi.com/index-by-alpha.html
128  for free. When configuring the source with configure.pl (described later),
129  use the option --with-gcc.
130
131
132 Important Note for Win32 Users
133
134  VR Juggler 1.1 and newer use a lot of C++ features not supported by Visual
135  Studio 6.0. Microsoft acknowledges the issues concerning noncompliance to
136  the C++ Standard with Visual Studio 6.0, and it appears that they have no
137  plans to fix these problems. Therefore, we require the use of Visual Studio
138  7.x (.NET 2002 or 2003) to compile the source code.
139
140
141 Getting the Source Code and the Dependencies
142
143  In this section, we explain how to get the Juggler Project source code and
144  the dependencies required to build Juggler. There are two ways to get the
145  source code: from a pre-packaged source release archive or from the CVS
146  repository on SourceForge. If you got the code from a pre-packaged source
147  archive, that code is a complete "snapshot" of the CVS
148  repository at the time of release. It contains all dependencies that would
149  otherwise have been acquired using CVS. It does not contain binary
150  dependencies that must be downloaded separately (such as NSPR, the Java
151  Developer Kit, a C++ compiler, etc.).
152
153  The current list of required software packages is as follows:
154
155
156 *  CppDOM (http://www.sf.net/projects/xml-cppdom/): A lightweight, easy-to-
157    use XML parser written in C++. CppDOM must be compiled and installed for
158    use with VR Juggler.
159
160 *  Boost (http://www.boost.org/): A C++ library providing many powerful
161    utility classes and libraries. Boost must be compiled and installed for
162    use with VR Juggler.
163
164 *  GMTL (http://ggt.sf.net/): A generic math library that makes use of C++
165    templates and STL paradigms. GMTL must be installed for use with VR
166    Juggler.
167
168
169  The following lists semi-optional packages:
170
171
172 *  NSPR (http://www.mozilla.org/projects/nspr/): The Netscape Portable
173    Runtime, which can be used by VPR for threading and sockets (required on
174    Win32 and Solaris).
175
176 *  Java Developer Kit (http://java.sun.com/): The J2SE SDK (or JDK) is used
177    to compile all the Java code used in the Juggler Project. Without it,
178    none of the Java code can be built. We require version 1.4 or newer. The
179    Java Standard Edition (J2SE) can be downloaded from http://java.sun.com/
180    j2se/.
181
182 *  omniORB (http://omniorb.sourceforge.net/): A C++ implementation of CORBA
183    2.3, required for the Tweek C++ API.
184
185
186  The following are fully optional packages that are primarily of interest
187  only to people doing development on the Juggler Suite itself:
188
189
190 *  JUnit (http://www.junit.org/): A unit testing framework for Java.
191
192 *  CppUnit (http://cppunit.sourceforge.net/): A unit testing framework for
193    C++. The Juggler C++ test suties make use of extensions to CppUnit. An
194    extended version of the CppUnit source that includes these extensions can
195    be acquired from the Juggler CVS repository in the module cppunit. Refer
196    to the section called "How to Get the Juggler Suite from CVS"
197    for instructions about accessing the Juggler CVS repository.
198
199
200  The third-party dependencies must be downloaded from the sites listed above
201  and installed manually. You may also have to compile one or more of the
202  packages if binary distributions are not available. Which packages you
203  download depends on what you already have installed. Note carefully which
204  packages are needed based on the software you have installed and what
205  versions of tools (such as the JDK) that you download.
206
207
208 How to Get the Juggler Suite from CVS
209
210  You can optionally get the Juggler Project as a source code tarball from
211  the website (http://www.vrjuggler.org/) or you can execute the following
212  commands from a shell to get the code from our CVS repository:
213
214
215   cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/vrjuggler login
216   cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/vrjuggler co
217   juggler
218
219
220 Downloading Third-Party Dependencies
221
222  In addition to source the dependencies acquired through CVS, there are some
223  third-party dependencies that must be installed separately. Remember that
224  no Java code in VR Juggler can be used without the JDK and a working Java
225  version of CORBA.
226
227
228 Boost
229
230  The minimum required version of Boost, as of this writing, is 1.31.0. The
231  Boost source can be downloaded from http://www.sf.net/projects/boost/. To
232  compile and install Boost, refer to its installation documentation (http://
233  www.boost.org/more/getting_started.html#Build_Install). Note that you need
234  the command bjam (referred to as "boost-jam" on the Boost
235  download page) to build Boost.
236
237
238 CppDOM
239
240  For XML processing, we use CppDOM 0.3.2 or newer. The source and binary
241  distributions for some platforms can be downloaded from http://www.sf.net/
242  projects/xml-cppdom/. If a binary version is not available for your
243  operating system you must compile and install CppDOM yourself. Note that
244  you need SCons (http://scons.sourceforge.net/) to build and install CppDOM.
245
246
247 GMTL
248
249  For high-level mathematical operations, we use GMTL 0.3.2 or newer. The
250  source distribution can be downloaded from http://www.sf.net/projects/ggt/.
251  Note that you need SCons (http://scons.sourceforge.net/) to build and
252  install GMTL.
253
254
255 Netscape Portable Runtime (NSPR)
256
257  Our operating system abstraction, VPR, can make use of NSPR for operating
258  system primitives. On some platforms (IRIX, FreeBSD, Linux, Mac OS X), the
259  use of NSPR is strictly optional. On others (Win32, HP-UX, and Solaris), it
260  is required. Based on your local system, you should decide whether you need
261  NSPR. Binary versions of NSPR can be downloaded from ftp://ftp.mozilla.org/
262  pub/mozilla.org/nspr/releases. At this time, we recommend the use of
263  version 4.2 or newer.
264
265
266 Java Developer Kit (also called the J2SE SDK)
267
268  We make use of the Java programming language in addition to C++. Java is
269  used exclusively for GUIs such as Tweek and VRJConfig (which is a JavaBean
270  that is loaded into Tweek). To compile the Java code, a JDK is necessary.
271  We currently require version 1.4 or newer. The Java Standard Edition can be
272  downloaded from http://java.sun.com/j2se/. More information can be found at
273  http://java.sun.com/.
274
275
276 omniORB
277
278  omniORB is a C++ implementation of CORBA 2.3. It is required in order to
279  compile the Tweek C++ API. At this time, the Tweek C++ API is not required
280  for VR Juggler, but this situation will change in the near future. At this
281  time, we primarily use omniORB 4.0.x. omniORB can be downloaded from http:/
282  /omniorb.sourceforge.net/.
283
284  omniORB 3.0 has strange conventions for how installations are made. Within
285  the bin and lib directories, there are platform-specific subdirectories
286  that contain the actual binaries (except when installed on FreeBSD via the
287  Ports Collection). Because of this, several extra options must be specified
288  in order to tell the Tweek configure script where to find everything.
289  Please refer to the section called "Tweek" for more details on
290  this.
291
292
293 Compiling
294
295  In this section, we describe how to compile the Juggler Project. We focus
296  on VR Juggler as a whole, but information about some of the individual
297  components is provided later.
298
299
300 Important Note Regarding Compiling
301
302  You have downloaded developmental code. It may not be stable, and it may
303  not even compile. Compiling VR Juggler itself can be a little complicated
304  for anyone who does not have some background in using CVS, Autoconf, C++,
305  and make or Visual Studio.
306
307
308 Compiling the Juggler Suite of Tools
309
310  This section explains how to get, configure, and compile all of the tools
311  that make up VR Juggler. Each tool compiles to its own library and can be
312  installed individually. (Refer to the README file in this directory for
313  more information about the specific modules.)
314
315  To build VR Juggler on Windows, you must use the Visual Studio solution.
316  After getting the dependencies needed to compile VR Juggler (see the next
317  section), refer to the README.html file located in the vc7 subdirectory of
318  this directory. Do not bother to the rest of this document.
319
320
321 Configuring the Juggler Build
322
323  We now explain the process by which the Juggler build is configured. The
324  Juggler Suite makes use of the well-known, widely used GNU tools Autoconf
325  and GNU Make. We provide a wrapper script written in Perl called
326  configure.pl that gets the process started.
327
328  The Juggler build is highly automated. The trickiest part is telling the
329  build where to find the third-party dependencies. This part can be
330  simplified, however, by installing the third-party dependencies in the
331  default location where the search will be performed. In most cases, this is
332  /usr/local, but in others it is /usr. The default search location is
333  determined by whether the dependency is considered to be a fundamental part
334  of the operating system installation (such as OpenGL) or if it is an
335  "add-on" package (such as Boost, GMTL, CppDOM, or omniORB).
336
337  The distinction between /usr/local and /usr is complicated by the fact that
338  most Linux distributions have everything installed in /usr. While Linux may
339  be popular, it should not (yet) be considered a model example of how to do
340  things. In traditional UN*X distributions (BSD and System V), /usr is only
341  used for the fundamental operating system pieces; /usr/local is used for
342  extra bits. The Juggler build is based on these assumptions. Furthermore,
343  most open source software packages (e.g., Boost, omniORB, Perl, Python)
344  default to installing themselves in /usr/local, which suggests that the
345  authors of those tools generally expect their software to be in /usr/local.
346
347
348 Using configure.pl
349
350  In the base juggler source directory, we have a "global"
351  configure script written in Perl called configure.pl. To get the command-
352  line options for this script, use one of the following (the second being
353  much more detailed):
354
355
356   ./configure.pl --help
357   ./configure.pl --manual
358
359  To configure your system, you will need to see what options all the
360  Autoconf-based configure scripts in VR Juggler need. To get this text,
361  enter:
362
363
364   ./configure.pl --all-help
365
366
367 Important
368
369  In order for this to work, the configure script for each of the Juggler
370  modules must be generated. This can be done manually by running autogen.sh
371  in the top-level juggler directory. It use is simple:
372
373
374   ./autogen.sh
375
376  This autogen.sh script must be run from the directory where it exists. Do
377  not try to run it from a build directory or any other place in the Juggler
378  source tree. The same holds for the individual autogen.sh scripts in the
379  various modules, should you need to run one individually.
380
381  configure.pl can run in a unique "build" directory or in the
382  directory where it resides. Here is how we (the Juggler Team) have been
383  using it:
384
385
386   1.  Make a directory for compiling. There are many good reasons to do this
387       away from the main source tree (though they will not be listed here).
388
389
390        mkdir build.linux.posix
391
392       This example using an ad hoc naming convention based on operating
393       system and threading subsystem. Other examples could be
394       build.irix.sproc, build.solaris.nspr, etc.
395
396   2.  Enter the new build directory.
397
398
399        cd build.linux.posix
400
401   3.  Configure all the modules making up VR Juggler. This is when you must
402       tell the module configure scripts where all the package dependencies
403       are found.
404
405
406        ../configure.pl --prefix=$HOME/vrjuggler-2.0 --with-java-orb=JDK
407
408
409      Important
410
411       You will probably have to specify the paths to your local CppDOM,
412       GMTL, and Boost installations using the options --with-cppdom, --with-
413       gmtl, and --with-boost unless they are installed in the default
414       location (/usr/local). By default, Boost 1.31 installs its header
415       files in a subdirectory of include called boost-1_31. That is, if
416       Boost is installed in /home/user1/pkgs/boost, the header files will be
417       in /home/user1/pkgs/boost/include/boost-1_31. In this case, you must
418       also specify the option --with-boost-includes=/home/user1/pkgs/boost/
419       include/boost-1_31 when running configure.pl.
420
421
422  By default, the configuration process will configure VR Juggler and all of
423  its dependencies. This includes Sonix, which is an interesting special
424  case. Sonix can make use of Aaudiere, OpenAL, or AudioWorks to add sound to
425  VR Juggler applications. If none of those packages is found, Sonix will
426  "stub out" its sound APIs. This means that Sonix and the VR
427  Juggler Sound Manager can still be used in applications, but no audio will
428  be heard at run time. See the section called "Sonix" for more
429  information about how to configure Sonix to use Audiere, OpenAL, or
430  AudioWorks.
431
432  For example uses of configure.pl, take a look at the Wiki page relating to
433  building from CVS (http://www.vrjuggler.org/twiki_public/bin/view/Juggler/
434  BuildingFromCvs). It is not a replacement for this document, but it shows
435  how some members of the Juggler team configure VR Juggler. It also has
436  information on more advanced uses of configure.pl that are beyond the scope
437  of this document.
438
439
440 Using Locally Installed Software
441
442  As noted in the section called "Getting the Source Code and the
443  Dependencies", VR Juggler depends on several external software
444  packages. As an example, consider the case where the GMTL library is
445  installed in /home/user1/pkgs/GMTL with the headers in /home/user1/pkgs/
446  GMTL/include. To use this installation, run configure.pl as follows:
447
448
449   ../configure.pl --with-gmtl=/home/user1/pkgs/GMTL
450
451  The --with-gmtl option could of course be mixed in with those shown in the
452  previous section.
453
454
455 Compiling VR Juggler
456
457  Once the configuration process is complete, the code can be compiled.
458  Remember that we require the use of GNU make 3.78 or newer.
459
460
461   1.  Compile the source tree using GNU make.
462
463
464        gmake build
465
466   2.  Once this completes, you will have a full build of VR Juggler. For
467       those who are not interested in developing VR Juggler or its component
468       modules, it is recommended that you install the software and use the
469       installed version for application development. Do this as follows:
470
471
472        gmake install
473
474
475
476 Tips for Compiling Individual Tools in the Juggler Suite
477
478  In this section, we provide tips for ensuring that individual tools in the
479  Juggler Suite are compiled correctly. For the most part, this duplicates
480  information that can be found on the Wiki page relating to building from
481  CVS (http://www.vrjuggler.org/twiki_public/bin/view/Juggler/
482  BuildingFromCvs).
483
484
485 Sonix
486
487  Sonix wraps other audio subsystems such as OpenAL (www.openal.org), Audiere
488  (audiere.sf.net), or AudioWorks (multigen.com). At least one of these
489  packages must be installed for use by Sonix in order to hear sounds in VR
490  Juggler applications. Once you have all the necessary source code and
491  third-party package installations, add one or more of the following options
492  to your configure.pl command line to enable the appropriate audio
493  subsystem:
494
495
496 *  --enable-openal --with-openal=<OPENAL_PATH>: Enable the use of OpenAL and
497    tell the build where OpenAL is installed. The default search path is /
498    usr/local.
499
500 *  --enable-audiere --with-audiere=<AUDIERE_PATH>: Enable the use of Audiere
501    and tell the build where Audiere is installed. The default search path is
502    /usr/local.
503
504 *  --enable-audioworks --with-audioworks=<AUDIOWORKS_PATH>: Enable the use
505    of AudioWorks and tell the build where AudioWorks is installed. The
506    default search path is /usr.
507
508
509
510 Note
511
512  AudioWorks and OpenAL cannot be compiled together. They depend on mutually
513  exclusive VPR threading subsystems. Warnings will be printed by the Sonix
514  configure script indicating this fact. OpenAL and Audiere can be compiled
515  together, however.
516
517
518 Tweek
519
520  Tweek needs JDK 1.4 or newer and a C++ CORBA implementation. Currently, we
521  primarily use omniORB 4.0, but omniORB 3.0 can be used. Visit the omniORB
522  website to download omniORB.
523
524
525 Note
526
527  IRIX users must configure Tweek (and its VPR dependency) to use the POSIX
528  subsystem or the NSPR subsystem. omniORB will not work with SPROC threads.
529  To configure VPR to use either POSIX threads or NSPR threads, pass either -
530  -enable-subsystem=POSIX or --enable-subsystem=NSPR respectively to
531  configure.pl.
532
533  For the following steps, assume that you have omniORB installed in
534  <OMNIORB_PATH>. Assuming you have the external packages installed, do the
535  following from the top-level juggler directory:
536
537
538   mkdir build
539   cd build
540   ../configure.pl --with-cxx-orb=omniORB4 --with-cxx-orb-root=<OMNIORB_PATH>
541   --with-java-orb=JDK --module=Tweek
542   gmake build install
543
544  If you are using omniORB 3.x, pass --with-cxx-orb=omniORB3 instead.
545
546  Depending on your omniORB installation, you may have to pass extra
547  arguments to configure.pl so that the configuration process can find the
548  omniidl binary and the omniORB libraries. For example, on Red Hat Linux 7.2
549  with omniORB 3.0.x, the following arguments must be specified in addition
550  to the above:
551
552
553   --with-cxx-orb-bin=<OMNIORB_PATH>/bin/i586_linux_2.0_glibc --with-cxx-orb-
554   lib=<OMNIORB_PATH>/lib/i586_linux_2.0_glibc
555
Note: See TracBrowser for help on using the browser.