Compiling Inkscape on Solaris 10 (x86)


This is a collection of tips concerning installation of Inkscape 0.48.1 on Solaris 10 10/08 x86.

Inkscape compiles pretty smoothly. There is also an informative page in the Inkscape Wiki detailing further aspects of the installation procedure. (Note however that the entry describing Inkscape 0.48 on that page refers to compilation with a 64 bit memory model, whereas I used the default.)


Inkscape requires a number of prerequisite packages. Below is a list of packages along with build notes which I hope is fairly complete. If GNU utilities are mentioned below – and no version is indicated – this refers to the following versions:

GCC, if used, refers to gcc-4.5.2 with the GNU assembler and the Sun linker.

In this example, all packages are installed in the /usr/local/dist hierarchy. Whenever g++ is used to build libraries, these are installed in appropriately named subdirectories, to clearly indicate the use of a non-standard ABI.

Package Compiler used Remarks
GNU gettext-0.18 Solaris Studio 12.2 Only built shared version:
./configure CC=cc --disable-static --prefix=/usr/local/dist
gmake MAKE=gmake install
glib-2.22.4, pixman-0.20.2, cairo-1.10.2, pango-1.26.2, atk-1.29.4, gtk+-2.18.7 Solaris Studio 12.2
  • pango-1.26.2 requires a patch when compiled with Solaris Studio because it uses hardwired GCC flags for its C++ component "HarfBuzz":
    echo '6108c6108
    < CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
    > CXXFLAGS="$CXXFLAGS -features=no%except"' | patch configure
  • use LDFLAGS='-L/usr/openwin/sfw/lib -R/usr/openwin/sfw/lib' to make cairo, pango, and gtk+ find libXrender.
  • gtk+ required a few additional options for me; the configuration I used was:
    LD_LIBRARY_PATH=/usr/local/dist/lib \
    ./configure CC=cc CXX=CC \
    CFLAGS="-O" \
    LDFLAGS="-L/usr/openwin/sfw/lib -R/usr/openwin/sfw/lib "\
    "-L/usr/local/dist/lib -lgettextlib" \
  • for gtk+, I used GNU make 3.82.
  • for gtk+, the GNU version of grep should be first in the PATH.
  • prepend the bin directory of the hierarchy that is your prefix to the PATH, so that the proper glib/gtk+ utilities are found when they are needed.
libsigc++-2.2.9 gcc-4.5.2 Configuration and installation:
./configure --prefix=/usr/local/dist/libsigc++-g++4 MAKE=gmake
gmake install
glibmm-2.22.2, cairomm-1.9.8, pangomm-2.26.3, gtkmm-2.18.2 gcc-4.5.2
  • I configured all libraries with --prefix=/usr/local/dist/gtk2mm-g++4
  • to make the libraries we just built available to pkg-config, set
    export \
  • for cairomm, pangomm, and gtkmm, the libXrender LDFLAGS argument (see above) is necessary
  • the MAKE=gmake argument is needed to configure
  • gtkmm requires a patch:
    echo '290c290,291
    <   std::advance(i, num);
    >   //std::advance(i, num);
    >   for(int j=0;j<num;++j) ++i;'\
    | patch gtk/gtkmm/
t1lib-5.1.2 Solaris Studio 12.2 uneventful
lcms-1.19 Solaris Studio 12.2 Too old versions (e. g., 1.13) don't work. I found 1.19 a good compromise which worked with both openjpeg as well as Inkscape.
openjpeg_v1_4_r697 gcc-4.5.2
  • GNU utilities should be first in the PATH
  • two files need to be patched (the second one merely sets the installation directory for .pc files):
    echo "48c48
    < const char *optarg;\t\t\t/* argument associated with option */
    > char *optarg;                 /* argument associated with option */"\
    | gpatch common/getopt.c
    echo '1,$s-usr/lib/pkgconfig-usr/local/dist/lib/pkgconfig-
    | /usr/bin/ed
poppler-0.16.4 gcc-4.5.2
/configure --prefix=/usr/local/dist/poppler-0.16.4-g++ \
    --disable-poppler-qt4 \
    CPPFLAGS='-I/usr/local/dist/include' \
    LDFLAGS='-R/usr/local/dist/lib -L/usr/local/dist/lib' \
gmake install
gsl-1.14 Solaris Studio 12.2 uneventful
gc6.8 Solaris Studio 12.2 Only built static version:
./configure --prefix=/usr/local/dist/gc-static \
    CC=cc CXX=CC --disable-shared --enable-static
make install
boost_1_46_1 Only needs to be extracted, not compiled. In this example, it is extracted to $HOME/src/boost_1_46_1.


After compiling these prerequisites, there is little left to do. The Inkscape source code needs to be patched, however. I used this patch which is a slight variation of the one suggested in the aforementioned Wiki page. (The original recommendation of including cmath instead of math.h did not work for me.)

Runpaths are set with -R, so that no crle or LD_LIBRARY_PATH setting is required.

The PKG_CONFIG_PATH setting used for building gtkmm should be retained. The directory where poppler is installed is added to it below.

gpatch -p2 < inkscape-0.48.1-sol10.patch
./configure --prefix=/usr/local/dist/inkscape-0.48.1 \
" -I$HOME/src/boost_1_46_1"\
" -I/usr/local/dist/poppler-0.16.4-g++/include" \
LDFLAGS='-L/usr/local/dist/gc-static/lib -lintl'\
' -R/usr/local/dist/libsigc++-g++4/lib'\
' -R/usr/local/dist/gtk2mm-g++4/lib'\
' -R/usr/local/dist/poppler-0.16.4-g++/lib'
gmake -j 3 install-strip

Last update 2011-05-04