This entry is very similar to my
Wt v3.3.0 entry, but with a few revisions and additions.
Since the last version, a dependency on GraphicsMagick has been added. Wt also appears to be adding some capability for OpenGL. I am also working with the version from github, as it uses the latest boost libraries, and has whatever Wt corrections and revisions have been posted since v3.3.3.
Some basics in place first:
apt-get install \
build-essential \
g++ \
zlib1g-dev \
zlib1g \
libbz2-dev \
python-dev \
graphviz-dev \
libicu-dev \
cmake \
libgd2-xpm-dev \
libssl-dev \
autoconf \
libgraphicsmagick++1-dev \
libpq-dev \
libpango1.0-dev \
liblzma-dev \
imagemagick \
libmagick++-dev \
libglew-dev
Now Boost. The build process below builds shared libraries in debug mode on a 64 bit installation.
cd /usr/src
wget http://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.gz
tar -zxvf boost_1_56_0.tar.gz
cd boost_1_56_0
./bootstrap.sh
CXX="g++ -Wl,--stack=0x2000000" ./b2 --layout=versioned toolset=gcc variant=debug \
link=shared threading=multi runtime-link=shared address-model=64 stage
mv stage/lib/* /usr/local/lib
ln -s /usr/src/boost_1_56_0/boost /usr/local/include/boost
An alternate way of doing things:
cd /usr/src
wget http://downloads.sourceforge.net/project/boost/boost/1.56.0/boost_1_56_0.tar.gz
tar -zxvf boost_1_56_0.tar.gz
cd boost_1_56_0
./bootstrap.sh
CXX="g++ -Wl,--stack=0x2000000" ./b2 toolset=gcc variant=debug \
link=shared threading=multi runtime-link=shared address-model=64 --prefix=/usr/local install
For the PDF library, libharu:
cd /usr/src
wget https://github.com/libharu/libharu/tarball/master
mv master libharu-2_3.tar.gz
tar -zxvf libharu-2_3.tar.gz
cd libharu-libharu-22e741e/
./buildconf.sh --force
./configure --with-zlib --with-png
make
make install
For the Wt side of things, once everything else is in place, things are easy. But there is a caveat. The boost library has to be built in a specific way, such as what I did in the steps above. If not, then cmake will not be able to find the libraries, even if the BOOST_LIBRARYDIR and BOOST_INCLUDEDIR settings are provided or changed. CMAKE uses an algorithm, which is used deep down in some dependencies, to find the boost libraries, so everything has to be perfect in order for that algorithm to find the libraries. I spent a bit of time figuring it out.
cd /usr/src
git clone git://github.com/kdeforche/wt.git
cd wt
mkdir build
cd build
cmake \
-D MULTI_THREADED=ON \
-D RUNDIR=/var/www/wt \
-D WEBUSER=www-data \
-D WEBGROUP=www-data \
-D BOOST_ROOT=/usr/local \
-D BOOST_LIBRARYDIR=/usr/local/lib \
-D BOOST_INCLUDEDIR=/usr/local/include/boost \
-D SHARED_LIBS=ON \
-D CONNECTOR_FCGI=OFF \
-D CONNECTOR_HTTP=ON \
-D USERLIB_PREFIX=lib \
-D Boost_USE_STATIC_LIBS=OFF \
-D Boost_USE_STATIC_RUNTIME=OFF \
-D CONFIGDIR=/etc/wt \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick \
../
make
make install
mkdir /var/www/wt/resources
ln -s /usr/local/share/Wt/resources /var/www/wt/resources
Optional parameter in the above build settings:
-D WT_CPP_11_MODE=-std=c++11
It was back in 2008 when I last wrote about installing the Web Toolkit C++ library called Wt. As I have another project using the library, it is time to update the build instructions, as they have changed. The Boost C++ libraries are used exten
Tracked: Sep 17, 16:35