Difference between revisions of "Libraries"

From HCL
Jump to: navigation, search
(Manual installation)
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
== Manual installation ==
 
== Manual installation ==
 
* Download a package or export/checkout a repository to <code>$HOME/src/DIR</code>
 
* Download a package or export/checkout a repository to <code>$HOME/src/DIR</code>
* Configure with <code>--prefix=$HOME</code>
+
* Configure
 +
<source lang="bash">
 +
./configure --prefix=$HOME
 +
</source>
 +
If there are alternatives for the third-party software or if the third-party software may be built with alternative middleware (for example, MPI: LAM, Open MPI, MPICH-1, MPICH-2), configure to a subfolder to avoid overwriting
 +
<source lang="bash">
 +
./configure --prefix=$HOME/SUBDIR
 +
</source>
 +
The packages you are developing and testing should also be in subfolders to avoid mismatch during building (see the compile-time environment below) or you need to do make uninstall before building the new version of your code.
 +
* Build and install
 +
<source lang="bash">
 +
make all install
 +
</source>
 
* Update [[Linux]] run-time environment
 
* Update [[Linux]] run-time environment
 
<source lang="bash">
 
<source lang="bash">

Latest revision as of 15:03, 24 March 2010

Installation from packages

  • Install a development package *-dev, which includes header files and static libraries. Base packages will be installed automatically
  • Headers and libraries can be found in standard paths, which are searched by compilers by default

Manual installation

  • Download a package or export/checkout a repository to $HOME/src/DIR
  • Configure
./configure --prefix=$HOME

If there are alternatives for the third-party software or if the third-party software may be built with alternative middleware (for example, MPI: LAM, Open MPI, MPICH-1, MPICH-2), configure to a subfolder to avoid overwriting

./configure --prefix=$HOME/SUBDIR

The packages you are developing and testing should also be in subfolders to avoid mismatch during building (see the compile-time environment below) or you need to do make uninstall before building the new version of your code.

  • Build and install
make all install
  • Update Linux run-time environment
PATH=$HOME/bin:$PATH
LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
CPATH=$HOME/include:$CPATH
LIBRARY_PATH=$HOME/lib:$LIBRARY_PATH