root/juggler/tags/2.0_beta_2/INSTALL.txt

Revision 16379, 20.8 kB (checked in by patrickh, 4 years ago)

Regenerate.

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