How to Install LASE

Compiling Installing How to use LASE? Version française

If you read that file, that means you're using a computer running unix & x-window, eventually by the way of a X terminal with Windows or MacOS. If not, this archive is not very useful for you so it's not really necessary to continue. It also means that you successfully uncompressed and untared the archive, so we can go to other steps.

Compiling LASE

Since LASE is given as C source code, the first thing to do is to compile it. That mean, you must have access to a C compiler. The compiling process is made using make; you must use the GNU make to avoid problems. It may be installed as gmake on you system.

LASE now uses c99, so your C compiler must understand (at least, partially) this version of the ISO C standard. Recent versions of gcc (>= 2.95.2, and may be more ancient also) support this. If you are not using gcc, you will find at the end of this file a list of c99 features used in LASE, so you can work around that and check if your compiler supports these features. One some compilers, you may have to add an option on the command line to activate c99 support.

Configuring

Before compiling, you must indicate which capabilities are available on your system. This is done by editing the Configuration file.

In this file, all lines starting by # are comments. Other lines give values for a variable, which is used in the building process to activate or remove a functionnality, or to give informations on the environement. Variables and possible choices are explained in the file, and summarized here.

The SYSTEME variable

This variable is used to define the kind of unix you are using. It is used for various purposes:

Hence, it is advisable to give the good value to avoid compilation problems... If your unix is not listed, you may try one of the listed, or to edit files that do not compile correctly to include correct header files (these files should only be in the Bib_X/ directory).

By default, a linux OS is assumed (it is the one I use...).

The CC variable

This variable indicates which C compiler must be used, by default gcc. If gcc is not available or if you want to use the native compiler, use cc.

Note that this compiler must support C99 (one some compilers, you may have to use a special option for that). If your compiler does not, you may use a more classical C89 ISO compiler, if you provide fallbacks for unavailable C99 features. See at the end of this file for a list of C99 features used in LASE.

Note also that a few gcc extensions are used, so if you use another compiler you may have to supply fallbacks. Please see here for more details.

The LANGUE variable

If you want to use another language that French, in LASE, use this variable and give it the language-code that you want to use. For instance, uk for english.

Texts used in LASE are then read in the Textes/$(LANGUE) directory. If a file is missing here, it is found in Textes/fr, so it is possible to work with partial translations.

If you want to create a new language set, simply create the suitable directory in Textes, copy all files in Textes/uk in that new directory and edit them. (You may also use texts in Textes/fr, but dialog-boxes texts will not be translated).

By default, this variable is not defined and a French version of LASE is builded.

The PREFIXE variable

This variable indicates where all files will be installed after LASE is builded. It also tells LASE where to find its data files.

The executable will be installed in $(PREFIXE)/bin, the dialog boxes description file (exafs.rsc) in $(PREFIXE)/lib/ and all data-files in $(PREFIXE)/share/Lase. See documentation for more details on the datafiles.

The default value is /usr/local; if you do not have acces right on that directory, a pretty common solution is to use $(HOME).

The COMMANDE_FEFF variable

This variable indicates where is the FEFF EXAFS simulation code. Note that the code is not called directly from LASE, but through a shell-script located in $(PREFIXE)/bin. The variable is used only for the generation of the shell-script, which can anyway be modified after.

More information about the FEFF project can be found on this page.

The TROIS_D variable

This variable controls the handling of 3D structures display in LASE. If set to AVEC_OPEN_GL, Open-GL code is used to render 3D view of structural models and of elemental maps. If set to any other value, no 3D visualisation is available.

In order to use the Open-GL code, Open-GL libraries must be available (Mesa is well suited). Note that not only the library must be installed, but also the header files!

The AVEC_HDF variable

If set to OUI, the HDF 4.0 library is used. Currently, the only option using this library is the import of Bessy 2 experimental files.

In order to use this library, it must be installed and compiled before. You may have to edit the Makefile to give its location (default assumed to be /usr/local/lib or /usr/lib). You may find this library to download on the NCSA website. Note that only the version 4 is currently recognized.

The VERSION variable

This variable controls the set of available options in LASE. If set to DEVELOPPE, a development version is compiled, otherwise a standard version is builded.

The development version is much more verbose. More controls of inconsistencies are implemented and lead to (required) crashes, whereas in the normal version they are silently ignored. The development version can also produces (rather big) log-files for deboging purpose.

On the other hand, the development version also offers more options (the standard version only offers tested, controled options).

Note that building of the development version may be more difficult on a non-linux system, because it uses more system-specific code to enforce checks. Also, it uses more compiler options to increase error detection at compile time, that may be incompatible with your own version of gcc.

If not interested in LASE development, you may prefer the normal version.

The AVEC_PNG variable

If set to OUI, the PNG library is used, to create screen captures of the main windows on demand (simple way to create figures...). This is only available on development versions, because on some systems, with some screen parameters, it crashes and I still didn't find why.

LASE can be compiled without this library without significant loss of capabilities.

The AVEC_XPM variable

If set to OUI, the XPM library is used, to render icons in alert boxes. This library is available on most recent X-window systems, but compile LASE without XPM support only has cosmetic effects.

The AVEC_DB_MALLOC variable

If set to OUI, code uses a malloc-deboguing library. Since it is only for deboging purposes, this is supported only in development version. For daily usage, you do not need to set this option.

Building

Once configuration is done, you just have to type make to build the executable.

If you change any option, you must clean everything before building a new executable. This is achieved with the make clean command.

Installing

Once you have build LASE, you need to install it. Installation is required, so that LASE can find its data files.

Installation is achieved with the command make install. You may have to do that as root user, depending on the installation directory.

If the installation directory for datafiles already exists, it is first archived as a tar, gz file. Hence, if you have made modifications to these files, they are not lost (but you must manually merge the old version and the new ones).

To use LASE conveniently, check that the installation path for the binary is in your PATH, and that the one for the man page is in your MANPATH.

How to use LASE?

To start LASE, simply type lase at the prompt (assuming that the installation directory is in your PATH. See your favorite shell documentation to see how to edit your PATH if necessary).

To have a quick overview of LASE command-line options, use the command man lase (assuming that the installation directory is in your MANPATH. See your favorite shell documentation to see how to edit your MANPATH if necessary).

To have an introduction on LASE, please read the tutorials that can be found on the official website, along with the complete documentation. You may also download from this site these documentation as an archive file and install it locally.

Examples used in the tutorial can be downloaded from the the official website.

If you have any question, suggestion or comment, feel free to send an e-mail at the adress below...


C99 features used in LASE

Feature Reason
Fixed-size integer types (int16_t, int32_t,...) Binary file loading, especially the RSC file (see Utilitaires/lit_binaire.c).
Macros with variable number of arguments Development messages. In standard version, you may replace macro definitions by function call, but it (strongly) slows down the code (see Utilitaires/deboguage.h and systeme.h).

gcc extensions used in LASE

Extension Reason
__attribute__((__unused__)) Mark unused arguments in functions (to avoid spurious warnings).
__FILE__, __FUNCTION__ and __NUMBER__ macros Get file name, function name and line number when printing error messages

If not available (old gcc or other compiler), a careful #define should allow to compile.


Emmanuel CURIS
Last modified: Wed Oct 8 13:57:09 CEST 2003