Sans Pareil Technologies, Inc.

Key To Your Business

Building fastcgi++



The fastcgi++ source code requires a few modifications to build on Solaris. We have created a couple of support tickets in the fastcgi++ project support system which are listed below.

https://savannah.nongnu.org/support/?107936
https://savannah.nongnu.org/support/?107937

The first step is to build and install the latest boost library (our current environment uses boost 1.48.0). With that in place, we can build the fastcgi++ library from sources.

The default steps we used to build boost mandates that we pass a -pthreads compiler flag when using boost threads module. We need to pass that as a CXXFLAGS environment variable when running the configure script. A simple script that can be used to configure and build the library is as shown.

#!/bin/kshCC=/opt/csw/gcc4/bin/g++ CXXFLAGS=-pthreads \ ./configure --prefix=/usr/local/fastcgi \ --with-boost=/usr/local \ --without-asqlgmake -j8pfexec gmake install

Before we attempt to compile the sources, we need to apply the changes as listed in the support tickets shown above.
  1. Resolve the issue related to use of enumerated constant with name ERR in header files.
    • Edit include/fastcgi++/protocol.hpp and rename the enumerated constant ERR on line 83 to ERROR.
    • Edit include/fastcgi++/request.hpp and modify the use of ERR on line 258 to ERROR.
  2. Resolve the issue with name collision related to use of mutex in incude/fastcgi++/manager.hpp.
    • Add line 252 containing “using boost::mutex;”
    • Add line 298 containing “using boost::mutex;”

With these changes in place, you can use the script above to configure, build and install fastcgi++ library.