Difference between revisions of "Building from SVN"

From BRL-CAD
(Install)
m (Warn people that SVN may stop working at some point in the future.)
 
(27 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== Obtain the sources ==
+
*****  BRL-CAD Recently moved from SVN to Github. Building from SVN works as of 3 Jul 2021, but you may need to build from Github in the future. ***
  
BRL-CAD has recently [[Cvs2svn|switched from CVS to the Subversion system]]. In the new system some of the earlier complexities inherent to CVS are gone, no ''-dP'' option is required and developers will not need their passwords or usernames until it is time to commit a change.
+
== Obtain the sources via Subversion ==
  
For non-developers:
+
For Windows:
<pre>svn checkout https://brlcad.svn.sourceforge.net/svnroot/brlcad/brlcad/trunk brlcad</pre>
 
  
Note: If you do not yet have an SVN client installed, go to http://subversion.tigris.org for information on obtaining an appropriate SVN client for your platform. Most modern Linux distributions will also have SVN available in their package repositories.
+
Install a Subversion client for Windows, such as TortoiseSVN: https://sourceforge.net/projects/tortoisesvn/
  
== Generate the configure script ==
+
To get a checkout after installing TortoiseSVN, right-click in a folder where you want to download the sources, select SVN Checkout and specify https://svn.code.sf.net/p/brlcad/code/brlcad/trunk for the repository URL.
cd brlcad
 
./autogen.sh
 
  
If autogen.sh reports that the build system is NOT ready and it's not clear why, rerun autogen.sh in verbose mode:
+
For Linux/Mac/BSD:
./autogen.sh --verbose
+
<pre>svn checkout https://svn.code.sf.net/p/brlcad/code/brlcad/trunk brlcad</pre>
  
=== An example generating the configure script on Mac OS X ===
+
Note: If you do not yet have an SVN client installed, go to http://subversion.tigris.org for information on obtaining an appropriate SVN client for your platform. Most modern Linux/BSD/UNIX distributions will also have SVN available in their package repositories.
You need to do " sudo port install libtool" to get GNU version of libtool.
 
imac:brlcad username$ sudo ln -s /usr/local/bin/glibtoolize /usr/bin/libtoolize
 
Password:
 
imac:brlcad username$ ./autogen.sh
 
Preparing the BRL-CAD build system...please wait
 
 
Found GNU Autoconf version 2.61
 
Found GNU Automake version 1.10
 
Found GNU Libtool version 1.5.26
 
 
Automatically preparing build ... done
 
 
The BRL-CAD build system is now prepared.  To build here, run:
 
  ./configure
 
  make
 
imac:brlcad username$
 
  
== Configure the build system ==
+
== Configure the build system with CMake ==  
./configure --help
 
./configure --prefix=install_dir --enable-optimized
 
  
When building for multiuser file servers it is often useful to make the install_dir reflect the version and/or architecture of the compile.  This way a single server can provide multiple versions of BRL-CAD or multiple binary formats for various architectures. Symbolic links are then usually added to point to the "current" or "main" version that is preferable to provide so that users only need to add /usr/brlcad/bin to their path. Examples include:
+
BRL-CAD also requires the build tool CMake. Most Linux/BSD/UNIX systems provide a package for CMake. For platforms that do not, CMake is available from http://www.cmake.org
  
;By version
+
Once installed, create a directory where you will compile BRL-CAD and run CMake.
:/usr/brlcad/rel-7.8.0 (release 7.8.0)
 
:/usr/brlcad/rel-7.6.0 (release 7.6.0)
 
  
;By architecture
+
For Windows, you can use the CMake GUI where you specify build and source directories:[[File:Running_cmake_on_windows.png|200px|thumb|right|Running CMake GUI on Windows]]
:/usr/brlcad/ia32 (linux on Pentium)
 
:/usr/brlcad/ia64 (linux on Itanium)
 
:/usr/brlcad/x86_64 (linux on Opteron)
 
  
;By version and architecture
+
For Linux/Mac/BSD, this looks like:
:/usr/brlcad/rel-7.8.0/mips32 (IRIX on MIPS in 32-bit mode, release 7.8.0)
 
:/usr/brlcad/rel-7.8.0/mips64 (IRIX on MIPS in 64-bit mode, release 7.8.0)
 
:/usr/brlcad/rel-7.8.2/mips32 (IRIX on MIPS in 32-bit mode, release 7.8.2)
 
  
IMPORTANT!!! - Because BRL-CAD has such a long development history, it predates some library naming conventions in modern operating systems. This means an attempt to configure for an install in the "/usr" path on Linux (for example) will stand a good chance of damaging important system libraries - e.g. BRL-CAD libraries put in "/usr/lib" may overwrite system libraries with the same names. Using "/usr/brlcad" or "/opt/brlcad" means all installed files will be safely contained in the brlcad directory.
+
cd brlcad
 +
mkdir build
 +
cd build
 +
cmake .. (for a default build)
 +
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)
  
 
== Compile and test your build ==
 
== Compile and test your build ==
 +
 +
On Windows, simply open the "BRLCAD" solution and Compile.
 +
 +
On Linux/Mac/BSD, run this in your build directory:
 +
 
  make
 
  make
  
At this point, you should have a fully installed and working system. You can test things by doing:
+
If there are no compilation errors, you can test via:
  
 
  make test
 
  make test
 +
 +
You can also run a performance test:
 +
 
  make benchmark
 
  make benchmark
  
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
  
<a href=http://www.titizilaclama.com/  title=ilaçlama >İlaçlama</a>
 
<a href=http://www.etkinilaclama.net  title=Haşere ilaçlama> Haşere ilaçlama</a>
 
<a href=http://www.cozumilaclama.net title=böcek ilaçlama>  Böcek ilaçlama</a>
 
<a href=http://www.pire.biz title=pire>pire</a>
 
<a title=joomla href=http://www.sanaldev.net/indir/joomla> joomla  tema</a>
 
  
== Setup environment (optional) ==
+
== Doxygen (OPTIONAL) ==
At this point, everything should be ready for use. If the default prefix of /usr/brlcad was used or if the corresponding symbolic links were created, users should only need to add /usr/brlcad/bin to their PATH in order to find binaries for the package (optionally setting their MANPATH as well):
+
If you have doxygen installed somewhere CMake can find it, then you can build a browsable HTML documentation of the source code.  This is useful if you want to use BRL-CAD's libraries directly, or if you just want a better overview of how things are structured.
 +
 
 +
To build the HTML files on a Linux/Mac/BSD system, run (from your build directory):
 +
 
 +
make dox
 +
 
 +
and then open doc/doxygen_output/html/index.xhtml with your web browser of choice.
 +
 
 +
== Install (OPTIONAL) ==
 +
 
 +
On all systems, you can simply run directly from the build directory without installing.
 +
 
 +
That said, by default BRL-CAD installs into /usr/brlcad or /opt/brlcad on Linux/Mac/BSD and into the standard program directory on Windows.  To check your build or install of BRL-CAD, browse to the "bin" directory from the GUI or from cmd.exe and run "mged".
 +
 
 +
== Setup environment (OPTIONAL) ==
 +
 
 +
At this point, all that remains is setting your system PATH environment variable so BRL-CAD utilities can be found.  Installation does not set PATH for you automatically.
 +
 
 +
For Windows, setting PATH can be helpful but isn't necessary.  Simply navigate to where you installed BRL-CAD and run from there.
 +
 
 +
For Linux/Mac/BSD, you'll either need to specify full paths to applications (e.g., /usr/brlcad/bin/rt) or set your PATH. If the default installation prefix (/usr/brlcad or /opt/brlcad) was used, you should only need to add /usr/brlcad/bin to your PATH in order to find applications (optionally setting MANPATH as well):
  
 
For bash:
 
For bash:
  
  export PATH=/usr/brlcad/bin:$PATH
+
  export PATH="/usr/brlcad/bin:$PATH"
  export MANPATH=/usr/brlcad/man:$MANPATH
+
  export MANPATH="/usr/brlcad/man:$MANPATH"
  
 
For csh/tcsh:
 
For csh/tcsh:
  
 
  set path=( /usr/brlcad/bin $path )
 
  set path=( /usr/brlcad/bin $path )
  setenv MANPATH /usr/brlcd/man:$MANPATH
+
  setenv MANPATH "/usr/brlcd/man:$MANPATH"
 
  rehash
 
  rehash
  
If users do not want to modify their PATH, they can get by providing the full path to the binaries (e.g. /usr/brlcad/bin/mged). To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man".
+
To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man" (e.g., /usr/brlcad/bin/brlman rt).
  
== Test installation ==
 
If everything went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. A quick test of functionality (and performance) is to run the BRL-CAD benchmark again, which is installed as the benchmark tool:
 
  
benchmark
+
== Test your Build ==
  
Additionally, you can run the MGED solid modeler:
+
If compilation went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry.  You should be able to run the main modeling application:
  
 
  mged
 
  mged
 +
 +
If you didn't install, you may need to specify the path to the tool (e.g., "bin/mged") from the build directory.
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Latest revision as of 15:35, 3 July 2021

          • BRL-CAD Recently moved from SVN to Github. Building from SVN works as of 3 Jul 2021, but you may need to build from Github in the future. ***

Obtain the sources via Subversion[edit]

For Windows:

Install a Subversion client for Windows, such as TortoiseSVN: https://sourceforge.net/projects/tortoisesvn/

To get a checkout after installing TortoiseSVN, right-click in a folder where you want to download the sources, select SVN Checkout and specify https://svn.code.sf.net/p/brlcad/code/brlcad/trunk for the repository URL.

For Linux/Mac/BSD:

svn checkout https://svn.code.sf.net/p/brlcad/code/brlcad/trunk brlcad

Note: If you do not yet have an SVN client installed, go to http://subversion.tigris.org for information on obtaining an appropriate SVN client for your platform. Most modern Linux/BSD/UNIX distributions will also have SVN available in their package repositories.

Configure the build system with CMake[edit]

BRL-CAD also requires the build tool CMake. Most Linux/BSD/UNIX systems provide a package for CMake. For platforms that do not, CMake is available from http://www.cmake.org

Once installed, create a directory where you will compile BRL-CAD and run CMake.

For Windows, you can use the CMake GUI where you specify build and source directories:

Running CMake GUI on Windows

For Linux/Mac/BSD, this looks like:

cd brlcad
mkdir build
cd build
cmake .. (for a default build)
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)

Compile and test your build[edit]

On Windows, simply open the "BRLCAD" solution and Compile.

On Linux/Mac/BSD, run this in your build directory:

make

If there are no compilation errors, you can test via:

make test

You can also run a performance test:

make benchmark

Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD bug tracker.


Doxygen (OPTIONAL)[edit]

If you have doxygen installed somewhere CMake can find it, then you can build a browsable HTML documentation of the source code. This is useful if you want to use BRL-CAD's libraries directly, or if you just want a better overview of how things are structured.

To build the HTML files on a Linux/Mac/BSD system, run (from your build directory):

make dox

and then open doc/doxygen_output/html/index.xhtml with your web browser of choice.

Install (OPTIONAL)[edit]

On all systems, you can simply run directly from the build directory without installing.

That said, by default BRL-CAD installs into /usr/brlcad or /opt/brlcad on Linux/Mac/BSD and into the standard program directory on Windows. To check your build or install of BRL-CAD, browse to the "bin" directory from the GUI or from cmd.exe and run "mged".

Setup environment (OPTIONAL)[edit]

At this point, all that remains is setting your system PATH environment variable so BRL-CAD utilities can be found. Installation does not set PATH for you automatically.

For Windows, setting PATH can be helpful but isn't necessary. Simply navigate to where you installed BRL-CAD and run from there.

For Linux/Mac/BSD, you'll either need to specify full paths to applications (e.g., /usr/brlcad/bin/rt) or set your PATH. If the default installation prefix (/usr/brlcad or /opt/brlcad) was used, you should only need to add /usr/brlcad/bin to your PATH in order to find applications (optionally setting MANPATH as well):

For bash:

export PATH="/usr/brlcad/bin:$PATH"
export MANPATH="/usr/brlcad/man:$MANPATH"

For csh/tcsh:

set path=( /usr/brlcad/bin $path )
setenv MANPATH "/usr/brlcd/man:$MANPATH"
rehash

To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man" (e.g., /usr/brlcad/bin/brlman rt).


Test your Build[edit]

If compilation went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. You should be able to run the main modeling application:

mged

If you didn't install, you may need to specify the path to the tool (e.g., "bin/mged") from the build directory.