Difference between revisions of "CompilingSunSolaris"

From Inkscape Wiki
Jump to navigation Jump to search
(removed - outdated)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Compiling on Sun Solaris ==


===Compiling version 0.44===
* 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:
<pre>
// 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;
}
</pre>
* Now stuck here (gc6.7, gcc version 3.3.2):
<pre>
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
</pre>
===Compiling a 0.39 snapshot===
When trying to compile the CVS snapshot from 2004-05-27 with
gcc 3.3.2 on a
<nowiki>SunOS foo 5.8 Generic_108528-22 sun4u sparc SUNW,Sun-Fire-V240</nowiki>
machine, I had to fix a few things.
First, I installed the following packages:
<pre>
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
</pre>
I configured Inkscape with the following switches:
<pre>
./configure --prefix=/home/foo[[/Tools]]/ --includedir=/home/foo[[/Tools/include]] CPPFLAGS=-I/home/foo[[/Tools/include]]
</pre>
Then "fix" stuff in the inkscape sources:
Uncomment "@[[INTLTOOL_DESKTOP_RULE]]@" in Makefile.
Use <inttypes.h>, not <stdint.h> in
<pre>
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
</pre>
(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
</pre>
src/object-edit.cpp,
src/spiral-context.cpp
src/star-context.cpp
</pre>
fabsf() was undeclared (I just put in "fabs()", not sure if this is
correct) in
<pre>
src/sp-shape.cpp
</pre>
(see
http://gcc.gnu.org/ml/java/2001-01/msg00465.html).
Replaced fabsf(), floorf() and ceilf() with fabs(), floor() and ceil() in
<pre>
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
</pre>
isfinite() is undeclared,  use
<pre>
#include <ieeefp.h>
</pre>
and finite() (see http://devrsrc1.external.hp.com/STKS/impacts/i61.html) in
<pre>
src/display/bezier-utils.cpp
</pre>
Need to include
<pre>
#include <ieeefp.h>
</pre>
in
<pre>
src/libnr/nr-svp.cpp
</pre>
Missing strcasestr() used in libnrtype/nr-type-directory.cpp. I just
use the internal version for WIN32 given in the file.
<pre>
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.
[...]
</pre>
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
[[Category:Needs Work]]

Latest revision as of 14:51, 28 May 2019