------------------------------- Sardana README file ------------------------------- 1 Compilation & installation This chapter describes the necessary steps for a sardana compilation all references below refer to the desired installation directory. all references below refer to OMNI_ROOT directory all references below refer to TANGO_ROOT directory The following instructions describe the necessary steps for installing the entire Sardana system. In case you don't need the entire system, the following subsystems can be installed independently: - Pool (instructions in Pool/README) - MacroServer (instructions in MacroServer/README) - Spock (instructions in Spock/README) - sardanaGUI (instructions in sardanaGUI/README) 1.1 Prerequisites - libltdl >= 1.55 with header files (development distribution) - omniORB >= 4.1.0 with header files (development distribution) - Tango >= 6.0.0 with header files (development distribution) - Java SDK >= 1.5 (for sardanaGUI only) - Apache Ant >= 1.7 (for sardanaGUI only) In future this dependency should disappear. - PyTango >= 3.0.4 - libhkl - (optional) necessary for diffractometer controller. See Appendix A at the end on how to get, build and install hkl on your system 1.2 Compile and install The sardanaGUI application is still not integrated in the sardana build system. To compile, install and run it please follow the instructions in sardanaGUI/README. We are sorry for the inconvenience. We will try to integrate this as soon as possible. For everything else go to the sardana root directory and type: % mkdir build % cd build % ../configure - if compiling in debug mode provide: CXXFLAGS='-g -gstabs+ -O0' - if not system installation provide: --prefix= - if OMNI_ROOT environment variable is not present provide: --with-omni-prefix= - if TANGO_ROOT environment variable is not present provide: --with-tango-prefix= - if using an alternative python distribution provide: --with-python-prefix= - if no need for extra controllers provide: -enable-extra-ctrls=no [default=yes] or -disable-extra-ctrls this will avoid building and distributing the standard C++ and Python controllers - if compiling the controller 'diffractometer': this controller needs the HKL library provided by SOLEIL. Therefore: - if HKL_ROOT environment variable is not present provide: --with-hkl_prefix= Note: if no valid HKL library is found the compilation will succeed but the diffractometer controller will not be build. - if you don't want to install the default macros that are provided by this distribution provide: --enable-extra-macros=no or --disable-extra-macros % make % sudo make install 2. Execution The sardana system consists of two device servers (Pool and MacroServer) and several clients. To configure and start a new Sardana system please look into the doc/ConfigUserGuide.lyx. ----------------------- Appendix A: HKL library ----------------------- 1. Get & compile The HKL available from http://repo.or.cz/r/hkl.git. It has been developed by the SOLEIL synchrotron. The contact person is PICCA Frédéric-Emmanuel: To checkout and build (you need the 'git' tool and 'scons'): % git clone http://repo.or.cz/r/hkl.git % cd hkl % scons In order to set a VALID HKL_ROOT (or --with-hkl-prefix) to build sardana, you need to make a symbolic link to the build result directory of hkl called 'lib'. If you install the library on the system, the step above is, of course, unnecessary. Example: - suppose you have checked out HKL into /home/bart/workspace - you are on linux with bash % cd hkl % scons (this will build scons in debug mode) % ln -s debug/linux2/src lib % export HKL_ROOT=/home/bart/workspace/hkl 2. Important notes on the usage of the HKL library At the time of writing, the HKL is by default built as a static library. This causes the static link of it with the pool's diffractometer controller resulting in a quite large controller file. When requested to list all available controller classes (like in sardanaGUI startup), the Pool will inspect all controller files in search for valid symbols. The huge amount of symbols in Due to the huge amount of symbols in the diffractometer controller library, the Pool may take more than the usual 3s to respond to this request resulting in a timeout for the client. This should happen only in the first request of this type done to the Pool during the pool lifetime but nevertheless it remains a problem. If you encounter this problem you can build the HKL as a shared library by changing in src/SConscript the last line from : Default(lenv.Library(target = 'hkl', source = sources)) to Default(lenv.SharedLibrary(target = 'hkl', source = sources)) This will produce a libhkl.so instead of a libhkl.a If you try this, don't forget: - compile the diffractometer controller again. - Must add the directory where libhkl.so resides to the LD_LIBRARY_PATH - send me an email (tcoutinho@cells.es) telling me if it works for you :-)