STLport-4.5.3

Introduction to STLport-4.5.3

Download location (HTTP):      http://www.stlport.org/archive/STLport-4.5.3.tar.gz
Download location (FTP):       
Version used:                  4.5.3
Package size:                  728 KB
Estimated Disk space required: 56 MB

STLport is a multi-platform ANSI C++ Standard Library implementation featuring advanced techniques and optimizations for maximum efficiency, exception safety and thread safety, important extensions such as hash tables, and singly-linked list.

Download the STLport patches from http://downloads.linuxfromscratch.org/blfs-patches.

Installation of STLport

Install STLport by running the following commands.

patch -Np1 -i ../STLport-4.5.3-gcc3.patch &&
patch -Np1 -i ../STLport-4.5.3-g++-inc.patch &&
GCC_VERSION=`gcc -v 2>&1 | grep "gcc version " | sed -e "s:gcc version ::"` &&
cp stlport/config/stl_gcc.h stlport/config/stl_gcc.h.orig &&
sed -e "s:@GCC_VERSION@:$GCC_VERSION:" \
stlport/config/stl_gcc.h.orig > stlport/config/stl_gcc.h &&
cd src &&
ln -sf gcc-linux.mak Makefile &&
make &&
make INSTALLDIR=/usr install

Command explanations

GCC_VERSION=... : STLport needs the location of the C++ headers, which are installed in /usr/include/c++/$GCC_VERSION if installed as per the instructions in LFS.

sed -e ... : Replace the location where STLport looks for C++ headers.

cd src : Change to the source directory.

ln -sf gcc-linux.mak Makefile : Use the appropriate makefile for our environment.

Configuring STLport

Configuration Information

As with most libraries, there is no configuration to do, save that the library directory i.e. /usr/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.

You will need to reinstall STLport whenever you upgrade gcc since the STLport include files have a hard coded reference to the location where gcc includes are installed.

Contents

The STLport package contains STLport headers /usr/include/stlport and STLport dynamic and static libraries.