Menu

BuildGuide

Abyssary

Prerequisites

Get the following programs/accounts/libraries:

  • Bazaar
  • CMake

  • A [launchpad] (https://launchpad.net/) account (optional)

    • You must supply launchpad with an ssh key to branch code (https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair)
  • 3rd party libraries (mandatory)

  • 3rd party libraries (optional)

Get the source code

First check that the bzr executable is in your path and that bazaar is configured to use launchpad. If you don't have an launchpad account, the code checkout will work but you may get some warning messages. If you provide an launchpad login with the following line

bzr launchpad-login userid

you will have to supply launchpad with your public ssh key. See the launchpad site for details. Windows users may also have to use pagent.

Then install the bazaar builder plugin

bzr branch lp:bzr-builder ~/.bazaar/plugins/builder

Windows users have to enter their bazaar config directory (typically %AppData%\bazaar\2.0)

Then create a simple text file with a build recipe and save it as charon-suite.recipe or
download it here.
The recipes' content is as follows (you may need unix style line endings):

# bzr-builder format 0.3 deb-version 1.0
lp:~charon-developers/+junk/charon-meta
nest charon-core lp:charon-core charon-core
nest charon-utils lp:charon-utils charon-utils
nest charon-flow lp:charon-flow charon
nest tuchulcha lp:tuchulcha tuchulcha
nest charon-templates lp:charon-templates templategenerator

Then run

bzr build charon-suite.recipe <local destination directory>

This should open multiple ssh connection and checkout the code.

Setting up the build environment

Start cmake-gui and select your freshly checked out charon-meta directory as the source directory (1) and another one as the build directory (2) (we strongly recommend out-of-source builds).
Hit configure and select your prefered build tools.
You will probably get some errors due to missing third party libraries, especially on Windows.

Check the advanced and grouped boxes and enter library, include and search paths for all 3rd party libraries you want to use.
You can switch off individual charon components under the BUILD Option (not recommended) or deactivate individual 3rd party libraries with the USE Options.
Especially Lapack or Petsc can be problematic. Deactivate them if you don't need them.

Also, set the CMAKE_INSTALL_PREFIX variable.
This is the path charon will be installed in when you build the INSTALL target.
The Windows default (%PROGRAMFILES%) will not work unless you build the INSTALL target with elevated administrator rights.


cmake configure

Compile

Windows

We assume that you use Microsoft Visual Studio Professional.
(2008 or 2010 as well as the Express versions are fine. 2012 is untested yet.)

Open the .sln file in the build directory and issue a build command from the build menu.
If everything worked, build the additional INSTALL target.
Additionally you should run the provided unit test by building the RUN_TESTS build target.
Repeat this process in RELEASE configuration as needed.


building charon on MSVC

Unix

in the build directory issue the following command

make
make test
make install

You can also do multithreaded builds to speed up the process

make -j4

Remarks

  • There is a known bug in tuchulcha which occurs when paths with special characters are used (e.g. umlauts). Try to avoid those.
  • Define the CHARON_DIR environment variable and set it to the location of the cmake directory in your install directory.

    define a new environment variable in Windows

Related

Wiki: DeveloperBeginnerGuide
Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.