Difference between revisions of "CompilingSunSolaris"
Line 1: | Line 1: | ||
= Compiling on Sun Solaris = | = Compiling on Sun Solaris = | ||
==Compiling version 0.44== | ==Compiling version 0.44== | ||
Line 195: | Line 193: | ||
DONE! It runs on Solaris! Yay! :) | DONE! It runs on Solaris! Yay! :) | ||
--Colin Marquardt | --Colin Marquardt | ||
=See also= | |||
*[[Compiling Inkscape]] | |||
[[Category:Developer Documentation]] | |||
=See also= | =See also= |
Revision as of 19:48, 1 October 2010
Compiling on Sun Solaris
Compiling version 0.44
This documents the changes that I needed to make Inkscape compile with gcc 3.3.2 on Solaris 8.
- install all hard dependencies
- provide a definition of ngettext (thread: http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/15747/focus=15828)
- patch isfinite() like described here: http://opensolaris-br.org/osbr/index.php?option=com_content&task=view&id=34&Itemid=56
- src/dom/io/socket.cpp - FIONREAD undeclared: http://opendx.npaci.edu/mail/opendx-general/1999.06/msg00425.html (#include <sys/filio.h>)
- src/widgets/desktop-widget.cpp: replace round with rint
- src/trace/potrace/inkscape-potrace.cpp:288: error: `log2' undeclared (first use of this function)
- Add the following function to the file:
// from http://groups.google.de/group/comp.lang.c/msg/8ae70d02495768f5?dmode=source&hl=de double log2(double x) { static double ln2; if (ln2 == 0.0) ln2 = log (2.0); return log (x) / ln2; }
- Now stuck here (gc6.7, gcc version 3.3.2):
gc.cpp: In function `void Inkscape::GC::<unnamed>::do_init()': gc.cpp:32: error: parse error before string constant gc.cpp:32: error: `GC_noop1' undeclared (first use this function) gc.cpp:32: error: (Each undeclared identifier is reported only once for each function it appears in.) gmake[2]: *** [gc.o] Error 1 gmake[2]: Leaving directory `/home/marquardt/Tools/inkscape-0.44/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/home/marquardt/Tools/inkscape-0.44' gmake: *** [all] Error 2
See also http://sourceforge.net/tracker/index.php?func=detail&aid=1516476&group_id=93438&atid=604306
I got the following patch for "gc6.7/include/gc.h" from Hans Boehm which fixes these problems with gc6.7:
947a948 > extern int _end[], _etext[]; 949,952c950 < # define GC_INIT() { extern int _end[], _etext[]; \ < extern "C" void GC_noop1(GC_word); \ < GC_noop1((GC_word)_end); \ < GC_noop1((GC_word)_etext); } --- > extern "C" void GC_noop1(GC_word); 954,956c952 < # define GC_INIT() { extern int _end[], _etext[]; \ < extern void GC_noop(); \ < GC_noop(_end, _etext); } --- > void GC_noop1(); 957a954,955 > # define GC_INIT() { GC_noop1((GC_word)_end); \ > GC_noop1((GC_word)_etext); }
With these changes, I got Inkscape running fine. --Colin Marquardt
Compiling a 0.39 snapshot
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