Building inkscape under cygwin.
Hello,
I'm lately trying to compile inkscape using the latest edition of cygwin. However the build process is permanently aborting:
make all-recursive make[1]: Entering directory `/cygdrive/d/Src/inkscape' Making all in src make[2]: Entering directory `/cygdrive/d/Src/inkscape/src' depbase=`echo object-edit.o | sed 's|[^/]*$|.deps/&|;s|.o$||'`; \ if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/cxclient/usr/X11R6/include -DPOTRACE="potrace" -DXTHREADS -DXUSE_MTSAFE_API -I/home/haeuslsc/local/include/gdkmm-2.4 -I/home/haeuslsc/local/lib/gdkmm-2.4/include -I/home/haeuslsc/local/include/glibmm-2.4 -I/home/haeuslsc/local/lib/glibmm-2.4/include -I/home/haeuslsc/local/include/pangomm-1.4 -I/home/haeuslsc/local/include/gtk-2.0 -I/home/haeuslsc/local/lib/gtk-2.0/include -I/usr/X11R6/include -I/home/haeuslsc/local/include/sigc++-2.0 -I/home/haeuslsc/local/lib/sigc++-2.0/include -I/home/haeuslsc/local/include/glib-2.0 -I/home/haeuslsc/local/lib/glib-2.0/include -I/home/haeuslsc/local/include/pango-1.0 -I/usr/include/freetype2 -I/opt/cxclient/usr/X11R6/include -I/home/haeuslsc/local/include/gtkmm-2.4 -I/home/haeuslsc/local/lib/gtkmm-2.4/include -I/home/haeuslsc/local/include/atkmm-1.6 -I/home/haeuslsc/local/include/atk-1.0 -I/usr/include/libxml2 -I../cxxtest -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -g -O2 -MT object-edit.o -MD -MP -MF "$depbase.Tpo" -c -o object-edit.o object-edit.cpp; \ then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi object-edit.cpp: In function `void sp_spiral_outer_set(SPItem*, const NR::Point&, const NR::Point&, unsigned int)': object-edit.cpp:846: error: `isfinite' undeclared in namespace `std' make[2]: *** [object-edit.o] Error 1 make[2]: Leaving directory `/cygdrive/d/Src/inkscape/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/cygdrive/d/Src/inkscape' make: *** [all] Error 2
Any ideas?
Franz.
On Sun, May 29, 2005 at 05:10:09PM +0200, Franz Haeuslschmid wrote:
Hello,
Hiya Franz
I'm lately trying to compile inkscape using the latest edition of cygwin. However the build process is permanently aborting:
object-edit.cpp:846: error: `isfinite' undeclared in namespace `std'
Any ideas?
Hmm, it sort of sounds like you need the Standard C++ Template Library installed. isfinite is one of its functions. Not sure exactly what you have to do to get that installed under Cygnus, but I'm sure someone's documented it.
FYI, if you look at the code, line 846 of object-edit.cpp refers to 'isFinite', which is defined in isnan.h for WIN32 to be std::isfinite.
Hope this helps, Bryce
Bryce Harrington wrote:
On Sun, May 29, 2005 at 05:10:09PM +0200, Franz Haeuslschmid wrote:
Hello,
Hiya Franz
I'm lately trying to compile inkscape using the latest edition of cygwin. However the build process is permanently aborting:
object-edit.cpp:846: error: `isfinite' undeclared in namespace `std'
Any ideas?
Hmm, it sort of sounds like you need the Standard C++ Template Library installed. isfinite is one of its functions. Not sure exactly what you have to do to get that installed under Cygnus, but I'm sure someone's documented it.
FYI, if you look at the code, line 846 of object-edit.cpp refers to 'isFinite', which is defined in isnan.h for WIN32 to be std::isfinite.
Hope this helps, Bryce
Actually, this is probably defined under gcc/cygwin, and you might check to find out what Cygwin's flavor is. If you get it to work, please let us know, and we will add another switch for #ifdef CYGWIN.
Bob
On Sun, 29 May 2005, Bob Jamison wrote:
Bryce Harrington wrote:
On Sun, May 29, 2005 at 05:10:09PM +0200, Franz Haeuslschmid wrote:
[... object-edit.cpp:846: error: `isfinite' undeclared in namespace `std' ...]
Hmm, it sort of sounds like you need the Standard C++ Template Library installed. isfinite is one of its functions. Not sure exactly what you have to do to get that installed under Cygnus, but I'm sure someone's documented it.
FYI, if you look at the code, line 846 of object-edit.cpp refers to 'isFinite', which is defined in isnan.h for WIN32 to be std::isfinite.
For cygwin, the linux definitions of `isnan' and `isfinite' should be chosen. Actually, `isfinite' is defined in the `math.h' of cygwin (without definition of a namespace).
[...]
Actually, this is probably defined under gcc/cygwin, and you might check to find out what Cygwin's flavor is. If you get it to work, please let us know, and we will add another switch for #ifdef CYGWIN.
I played around with imports and functions and created a little test file that uses dirctly `isfinite':
#include <stdio.h> #include <math.h>
int main() { float f = 12.34; printf("f = %d", isfinite(f)); }
I placed this file in inkscape's source directory and compiled it with `g++' using all the parameters that were also used for `object-edit.cpp' (newlines were inserted for clearness):
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/cxclient/usr/X11R6/include -DPOTRACE="potrace" -DXTHREADS -DXUSE_MTSAFE_API -I/home/haeuslsc/local/include/gdkmm-2.4 -I/home/haeuslsc/local/lib/gdkmm-2.4/include -I/home/haeuslsc/local/include/glibmm-2.4 -I/home/haeuslsc/local/lib/glibmm-2.4/include -I/home/haeuslsc/local/include/pangomm-1.4 -I/home/haeuslsc/local/include/gtk-2.0 -I/home/haeuslsc/local/lib/gtk-2.0/include -I/usr/X11R6/include -I/home/haeuslsc/local/include/sigc++-2.0 -I/home/haeuslsc/local/lib/sigc++-2.0/include -I/home/haeuslsc/local/include/glib-2.0 -I/home/haeuslsc/local/lib/glib-2.0/include -I/home/haeuslsc/local/include/pango-1.0 -I/usr/include/freetype2 -I/opt/cxclient/usr/X11R6/include -I/home/haeuslsc/local/include/gtkmm-2.4 -I/home/haeuslsc/local/lib/gtkmm-2.4/include -I/home/haeuslsc/local/include/atkmm-1.6 -I/home/haeuslsc/local/include/atk-1.0 -I/usr/include/libxml2 -I../cxxtest -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -g -O2 -MT test.o -MD -MP -MF "$depbase.Tpo" -c -o test.o test.cpp
That worked. However, when I throw in additional includes like `#include "sp-item.h"' or `#include "sp-item.h"', compilation fails again:
test.cpp: In function `int main()': test.cpp:26: error: `isfinite' undeclared (first use this function) test.cpp:26: error: (Each undeclared identifier is reported only once for each function it appears in.)
There are several more include directives taken from `object-edit.cpp' that trigger these compile errors. As far as I checked the header files, only `isnan.h' uses `isfinite'. I cannot imagine, how the inclusion of header files can change the visibility of a certain function. Did I miss something else?
Franz.
On Sun, 29 May 2005, Bob Jamison wrote:
Bryce Harrington wrote:
[...]
Actually, this is probably defined under gcc/cygwin, and you might check to find out what Cygwin's flavor is. If you get it to work, please let us know, and we will add another switch for #ifdef CYGWIN.
Actually, the current stable version of gcc (3.3.3) that is used by cygwin is responsible for that build error. It turned out, that, when `cmath' is in the transitive closure of included files, the macro for `isfinite' of `math.h' is undefined... confer the discussion in a mailing-list related to cygwin: URL:http://thread.gmane.org/gmane.os.cygwin.talk/189. I now upgraded to gcc 3.4.1, as suggested solution. The other workaround was to copy the macro definition into the own code -- but I don't think, that this is what header file are not supposed to be for.
After having applied those changes, I had two more build failures. I got two linkage errors in `inkscape/src/nr-svp.cpp' and `inkscape/src/main.cpp'. Following the strategy pointed out in URL:http://geos.refractions.net/pipermail/geos-devel/2005-February/001263.html I was able to avoid any compile errors for the remainder of the make and install process. However inkscape then fails to start and outputs:
Emergency save activated! Emergency save completed. Inkscape will close now. If you can reproduce this crash, please file a bug at www.inkscape.org with a detailed description of the steps leading to the crash, so we can fix it.
I would appreciate the opinion of a developer who actually succeeded to build inkscape for cygwin.
Franz.
participants (3)
-
Bob Jamison
-
Bryce Harrington
-
Franz Haeuslschmid