Working with the Base Module
What is the Base Module?
The Base module is a module created by the RCCI team that provides newer versions of libraries and software. It can be used as a replacement of the "old" operating system libraries.
With these libraries, users should be able to install newer versions of software that would require a "system upgrade".
Moreover, having these libraries and software compiled into a single module makes them portable across all the compute nodes. So they are available everywhere in our HPC cluster. The libraries installed in our Base module are complete in the sense that they are the equivalent of the LIB and DEVEL packages that would come with any Linux distribution.
Why does Base version start at 8.0?
The compilation of the Base module follows the instructions of the Linux From Scratch (LFS) and the Beyond Linux From Scratch (BLFS) books. To build our Base module, we took the version 8.0 of those books.
When do I use Base?
Some of the software installed in our HPC (specially recent versions of software), have base as a dependency. So, as a user, you will not need to worry about loading it.
You may think that using the "base" module all the time is a good idea. However, we recommend using the system libraries as much as possible. Although they are old, they have been tested and approved by RedHat for their stability. Only use Base when the system libraries are not available.
Compiling with Base
To use the newer versions of libraries provided by base, just load the corresponding module:
module load base
Although most of the time the configuration of the new libraries will be found, some software might be distributed with hard-coded paths. Moreover, turning on Base, might trigger library incompatibilities if the module is not used properly.
Where to find the basic path:
We created the environment variable BASE_PATH that points to the parent path containing the libraries, header files and binaries.
Where to find the binaries:
The binaries are located in $BASE_PATH/bin
Where to find the header files:
The header files are in $BASE_PATH/include
Where to find the libraries:
The libraries are in $BASE_PATH/lib and $BASE_PATH/lib64
Where are the package configuration files:
The package configuration files are in $BASE_PATH/lib/pkgconfig
You can retrieve the information for a certain package using pkg-config. For example, you can make use of pkg-config to get the cflags or the ldflags of the glib-2.0 package:
$pkg-config --cflags glib-2.0
-I/usr/local/base/8.0/include/glib-2.0 -I/usr/local/base/8.0/lib/glib-2.0/include
$pkg-config --libs glib-2.0
-L/usr/local/base/8.0/lib -lglib-2.0
$pkg-config --libs-only-L glib-2.0
-L/usr/local/base/8.0/lib
Then you can pass this information to the CPPFLAGS, CXXFLAGS, LDFLAGS, or LIBS environment variables.
Avoiding library conflicts using Base
Using Base's Perl
When downloading software from, for example, github developers assume that you will have Perl installed in /usr/bin. The scripts that have a hard-coded Perl directory could conflict with the most recent version of Perl installed in Base. In fact, one common error that you will encounter is the following:
Can't locate version.pm in @INC
To solve this problem, run the following command:
grep -r "/usr/bin/perl" | awk 'BEGIN{FS=":"}{print $1}' > list
while read file; do
sed -e "s#/usr/bin/perl#$BASE_PATH/bin/perl#" -i $file
done < list
This will transform all references to /usr/bin/perl into $BASE_PATH/bin/perl
Then the compilaton should run without problems.
NOTE: It is possible that similar problems occur with other languages and shells installed in Base.
Using Libpng16
If when compiling using the base module you encounter this problem,
/usr/local/base/8.0/lib/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'
This means that the package you are trying to install is using the system zlib library instead of the more recent one provided by base. To solve this problem, we need to consider two cases:
Compiling with configure. Include the following in the CPPFLAGS and LDFLAGS variables
CPPFLAGS=-I/usr/local/base/8.0/include
LDFLAGS=-L/usr/local/base/8.0/lib
Compiling using qmake. Include the following in the variables QMAKE_LFLAGS and QMAKE_CFLAGS:
QMAKE_LFLAGS+=-L/usr/local/base/8.0/lib
QMAKE_CFLAGS+=-I/usr/local/base/8.0/include
Compiling using CMake. configure the following three variables -DCMAKE_CXX_FLAGS -DCMAKE_C_FLAGS -DCMAKE_EXE_LINKER_FLAGS_RELEASE with the following values:
-I/usr/local/base/8.0/include -L/usr/local/base/8.0/lib
List of Libraries and Software in Base
Base is composed of a 107 packages. This is the list at the time this documentation was written, but the number of packages may increase.
ant/1.10.1
atk/2.22.0
at-spi2-atk/2.22.0
at-spi2-core/2.22.0
autoconf/2.69
automake/1.15
binutils/2.27
bison/3.0.4
bzip2/1.0.6
CAcerts/20170119
cairo/1.14.8
cmake/3.7.2
cmake-extra/5.31.0
dejagnu/1.6
emacs/25.1
expat/2.2.0
expect/5.45
fdk-aac/0.1.5
file/5.30
flac/1.3.2
flex/2.6.3
fontconfig/2.12.1
freetype2/2.7.1
fribidi/0.19.7
GC/7.6.0
gcc/6.3.0
gdk-pixbuf/2.36.5
gettext/0.19.8.1
ghostscript/9.20
glib/2.50.3
gmp/6.1.2
gnulib/git
gobject-introspection/1.50.0
gperf/3.1
graphite2/1.3.9
harfbuzz/1.4.4
icu/58.2
isl/0.16
lame/3.99.5
libarchive/3.2.2
libass/0.13.6
libatomic_ops/7.4.6
libcerf/1.5
libcroco/0.6.11
libcurl/7.52.1
libdrm/2.4.75
libdrm/2.4.75
libepoxy/1.4.0
libevent/2.1.8
libexif/0.6.21
libffi/3.2.1
libgd/2.2.4
libgif/5.1.4
libjpeg-turbo/1.5.1
libogg/1.3.2
libpng/1.6.28
librsvg/2.40.16
libsndfile/1.0.27
libssh2/1.8.0
libtasn1/4.10
libtheora/1.1.1
libtiff/4.0.7
libtool/2.4.6
libunistring/0.9.7
libuuid/2.29.1
libvorbis/1.3.5
libvpx/1.6.1
libwebp/0.6.0
libxml2/2.9.4
libxslt/1.1.29
littlecms/2.8
lzo/2.09
m4/1.4.18
mpc/1.0.3
mpfr/3.1.5
ncurses/6.0
nettle/3.3
nspr/4.13.1
nss/3.29
openjpeg/1.5.2
openssl/1.0.2k
opus/1.1.4
orc/0.4.26
p11-kit/0.23.2
pango/1.40.3
patch/2.7.5
pcre/8.40
perl/5.24.1
pixman/0.34.0
poppler/0.51.0
readline/7.0
ruby/2.4.1
sqlite/3.17.0
tcl/8.6.6
tcsh/6.20.00
termcap/1.3.1
texinfo/6.3
tk/8.6.6
vala/0.34.4
which/2.21
x264/20170212-2245
x265/2.3
xmlparser/2.44
xvid/1.3.3
xz/5.2.3
yasm/1.3.0
zlib/1.2.11