Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ProsCons
different codes can use different versions of librarieswith each release of new version of the library user's code must be recompiled
each library is released as a separate installation (it's easy to maintain each version separately)it's not possible to move libraries from their original location
we are not forced to build log LD_LIBRARY_PATH variables 
LD_LIBRARY_PATH has lower precedence than rpath 
It is still possible to use LD_PRELOAD to enforce given library to be used (e.g. debugging purposes) 

RPATH - slightly different layout

...

of directories

In case of rpath based compilation we don't need centrally located lib directory at all. All files (paths) will be provided by pc files for each and every module. 

Code Block
swimas
|-- etc
|   `-- modulefiles
|       `-- xmllib
|           |-- 4.0-GCC-6.1.0
|           `-- 4.0-intel-17.0.4
`-- extra
    `-- xmllib
        |-- 4.0-GCC-4.8.5
        |   |-- include
        |   |   |-- f90_file_reader.mod
        |   |   |-- mod_f90_kind.mod
        |   |   |-- string_manipulation_tools.mod
        |   |   |-- xml2eg_mdl.mod
        |   |   |-- xml_file_reader.mod
        |   |   |-- xmllib_parser.mod
        |   |   |-- xmllib_pathquery.mod
        |   |   `-- xmllib_types.mod
        |   `-- lib
        |       |-- libxmllib.a
        |       `-- pkgconfig
        |           `-- xmllib.pc
        `-- 4.0-intel-17.0.4
            |-- include
            |   |-- f90_file_reader.mod
            |   |-- mod_f90_kind.mod
            |   |-- string_manipulation_tools.mod
            |   |-- xml2eg_mdl.mod
            |   |-- xml_file_reader.mod
            |   |-- xmllib_parser.mod
            |   |-- xmllib_pathquery.mod
            |   `-- xmllib_types.mod
            `-- lib
                |-- libxmllib.a
                `-- pkgconfig
                    `-- xmllib.pc