Changes between Version 22 and Version 23 of InstallingMars
- Timestamp:
- 10/10/19 21:26:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallingMars
v22 v23 19 19 }}} 20 20 21 Before you run *cmake*, please make sure that your root environment has been properly initialized. With recent ROOT versions it is often enough if `root-config` is in your path. That is usually the case if you can execute root easily from your command line (or root-config itself) or if `export | grep ROOTSYS` gives a reasonable result. Otherwise, call `thisroot.sh` from your root installation. Assuming root is installed in /opt/root-6.14.04, this would be:21 Before you run *cmake*, please make sure that your root environment has been properly initialized. With recent ROOT versions it is often enough if `root-config` is in your path. That is usually the case if you can execute root easily from your command line (or root-config itself) or if `export | grep ROOTSYS` gives a reasonable result. Otherwise, call `thisroot.sh` from your root installation. Assuming root is installed in /opt/root-6.14.04, this would be: 22 22 {{{ 23 23 [X] . /opt/root-6.14.04/bin/thisroot.sh … … 45 45 instead. If you are not sure which compiler to use, just use the default and see if it works. (In almost all cases using a different compiler is not worth it) 46 46 47 CMake will check for the availab lility of all important packages. For Mars, this is mainly *root* and *libnova*. Although, we have managed to compile Mars with pre-installed binary packages, it is advised that you install root from scratch (see http://root.cern.ch). Libnova (if there is no package available -- don't forget the dev-package!) can be found here http://libnova.sourceforge.net/index.html and should be easy to compile (`./configure && make`.47 CMake will check for the availability of all important packages. For Mars, this is mainly *root* and *libnova*. Although, we have managed to compile Mars with pre-installed binary packages, it is advised that you install root from scratch (see http://root.cern.ch). Libnova (if there is no package available -- don't forget the dev-package!) can be found here http://libnova.sourceforge.net/index.html and should be easy to compile (`./configure && make`. 48 48 49 49 If a package is missing, you will see an error which looks like this … … 68 68 ''Hint'': To get an idea what cmake is doing or has done, you can call {{{cmake-gui .}}} in the build directory. Note that the {{{.}}} is required. 69 69 70 Usually, there is XXX_INCLUDE_DIR which is a apath to the header files and XXX_LIBRARY which is the library filename (including path).70 Usually, there is XXX_INCLUDE_DIR which is a path to the header files and XXX_LIBRARY which is the library filename (including path). 71 71 72 72 To check what cmake actually found, you can call … … 79 79 == Observatory == 80 80 81 The default observatory is build in during compile time. This should avoid that by mistake and changed resource files, a wrong observatory location is selected. The default is La Palma (`ORM`). If you want to select a different location (ORM, HAWC, SPM, RWTH), you can do that when runn ning cmake, for exmaple, by81 The default observatory is build in during compile time. This should avoid that by mistake and changed resource files, a wrong observatory location is selected. The default is La Palma (`ORM`). If you want to select a different location (ORM, HAWC, SPM, RWTH), you can do that when running cmake, for example, by 82 82 83 83 {{{ … … 97 97 == Linking Problems == 98 98 99 Mars itself only links with root libraries, standard C(++) libraries and libnova. If you have **any** linker problem, it is most likely related to the fact that you rlinking environment during compilation of Mars (e.g. LD_LIBRARY_PATH) is not set identical to linking root. In most cases (I think) setting your root environment with **thisroot.sh** should help.99 Mars itself only links with root libraries, standard C(++) libraries and libnova. If you have **any** linker problem, it is most likely related to the fact that you are linking environment during compilation of Mars (e.g. LD_LIBRARY_PATH) is not set identical to linking root. In most cases (I think) setting your root environment with **thisroot.sh** should help. 100 100 101 101 == Starting Mars == … … 116 116 You should now be able to use Mars. 117 117 118 How does that work? When you start root in your build directory, it reads `.rootrc` in your build directory. This file points to `rootlogon.C` in your build directory. This macro is executed when on root startup and loads the shared object `lib/libmars.so`. As all this uses absolu etpaths, you could even move `.rootrc` into your home directory and get the Mars environment no matter where you start root. As this works only with absolute paths, you might not change or rename the build directory without changing those files.118 How does that work? When you start root in your build directory, it reads `.rootrc` in your build directory. This file points to `rootlogon.C` in your build directory. This macro is executed when on root startup and loads the shared object `lib/libmars.so`. As all this uses absolute paths, you could even move `.rootrc` into your home directory and get the Mars environment no matter where you start root. As this works only with absolute paths, you might not change or rename the build directory without changing those files. 119 119 120 120 == Known to work == … … 125 125 * Ubuntu 18.04 and clang 6.0 or gcc 7.3.0 / 7.4.0 126 126 * Peppermint 9 and clang 6.0 or gcc 7.3.0 127 * root 5.34/36, 5.34/38, 6.12/06, 6.14/04, 6.14/06 127 * root 5.34/36, 5.34/38, 6.12/06, 6.14/04, 6.14/06, 6/18.04 128 128 * root binary packages might work 129 129 * libnova 0.12 / 0.15.0