CompilingSunSolaris

From Inkscape Wiki
Revision as of 09:19, 1 September 2004 by 211.222.247.120 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Compiling on Sun Solaris

When trying to compile the CVS snapshot from 2004-05-27 with gcc 3.3.2 on a SunOS foo 5.8 Generic_108528-22 sun4u sparc SUNW,Sun-Fire-V240 machine, I had to fix a few things.

First, I installed the following packages:

autoconf-2.59
automake-1.8.3
intltool-0.30
expat-1.95.7
libpng-1.2.5
libsigc++-2.0.3
glib-2.4.2
glibmm-2.4.2
atk-1.7.0
render-0.8
xrender-0.8.3
xft-2.1.2
pango-1.4.0
gtk+-2.4.2
gtkmm-2.4.2

I configured Inkscape with the following switches:

./configure --prefix=/home/foo/Tools/ --includedir=/home/foo/Tools/include CPPFLAGS=-I/home/foo/Tools/include

Then "fix" stuff in the inkscape sources:

Uncomment "@INTLTOOL_DESKTOP_RULE@" in Makefile.

Use <inttypes.h>, not <stdint.h> in

src/display/sp-canvas.h,
src/livarot/DblLinked.h, 
src/livarot/LivarotDefs.h, 
src/livarot/AVL.h, 
src/livarot/Shape.h, 
src/livarot/ShapeUtils.h,
src/livarot/Ligne.h
src/livarot/AlphaLigne.h
src/livarot/BitLigne.h
src/livarot/MyMath.h

(see http://www.lns.cornell.edu/public/COMP/info/autoconf/Header-Portability.html)


Replace round() with rint() according to http://news.gw.com/freebsd.gnome/1237 in

src/object-edit.cpp, src/spiral-context.cpp src/star-context.cpp

fabsf() was undeclared (I just put in "fabs()", not sure if this is correct) in

src/sp-shape.cpp

(see http://gcc.gnu.org/ml/java/2001-01/msg00465.html).

Replaced fabsf(), floorf() and ceilf() with fabs(), floor() and ceil() in

src/display/nr-arena-shape.cpp
src/display/canvas-bpath.cpp
src/display/sp-ctrlline.cpp
src/libnrtype/nr-rasterfont.cpp
src/livarot/AlphaLigne.cpp
src/livarot/BitLigne.cpp
src/livarot/Ligne.cpp
src/livarot/PathOutline.cpp
src/livarot/ShapeMisc.cpp

isfinite() is undeclared, use

#include <ieeefp.h>

and finite() (see http://devrsrc1.external.hp.com/STKS/impacts/i61.html) in

src/display/bezier-utils.cpp

Need to include

#include <ieeefp.h>

in

src/libnr/nr-svp.cpp

Missing strcasestr() used in libnrtype/nr-type-directory.cpp. I just use the internal version for WIN32 given in the file.

In file included from /home/foo/Tools/include/X11/extensions/Xrender.h:33,
                 from /home/foo/Tools/include/X11/Xft/Xft.h:47,
                 from libnrtype/nr-type-xft.cpp:16:
/usr/openwin/include/X11/Xutil.h:56: warning: ignoring #pragma ident 
/usr/openwin/include/X11/Xutil.h:117: error: 'Bool' is used as a type, but is 
   not defined as a type.
/usr/openwin/include/X11/Xutil.h:120: error: 'Pixmap' is used as a type, but is 
   not defined as a type.
/usr/openwin/include/X11/Xutil.h:121: error: 'Window' is used as a type, but is 
   not defined as a type.
[...]

etc. Fixed this by adding #include <X11/Xlib.h> before including Xft.h in src/libnrtype/nr-type-xft.cpp.

`bind_textdomain_codeset' undeclared in src/main.cpp and src/inkscape.cpp. Just copied the definition in that file outside the ifdef.

`fpresetsticky' undeclared (autoconf seems to have checks for it. Solaris has fpsetsticky() when ieeefp.h is included.)

No rule for target inkscape.desktop - just created an empty rule.

DONE! It runs on Solaris! Yay! :) --Colin Marquardt