LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   inkscape fails on current... (http://www.linuxquestions.org/questions/slackware-14/inkscape-fails-on-current-788206/)

imitis 02-10-2010 08:27 AM

inkscape fails on current...
 
trying to install inkscape all deps builded fine except inkscape
Code:

depbase=`echo extension/internal/pdfinput/pdf-parser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include/freetype2  -I/usr/include/ImageMagick      -I/usr/include/poppler  -I/usr/include/poppler/glib -I/usr/include/poppler -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  -DPOTRACE=\"potrace\" -pthread -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/atkmm-1.6 -I/usr/include/atk-1.0 -I/usr/include/libxml2 -I/usr/include/gtkspell-2.0  -I../cxxtest  -I./bind/javainc -I./bind/javainc/linux  -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2  -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -O2 -march=i486 -mtune=i686 -fopenmp -MT extension/internal/pdfinput/pdf-parser.o -MD -MP -MF $depbase.Tpo -c -o extension/internal/pdfinput/pdf-parser.o extension/internal/pdfinput/pdf-parser.cpp &&\                                                 
        mv -f $depbase.Tpo $depbase.Po                                                     
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetExtGState(Object*, int)':                                                                         
extension/internal/pdfinput/pdf-parser.cpp:812: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)                                                                   
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetFillColorSpace(Object*, int)':                                                                   
extension/internal/pdfinput/pdf-parser.cpp:1012: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)                                                                   
extension/internal/pdfinput/pdf-parser.cpp:1014: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)                                                                   
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetStrokeColorSpace(Object*, int)':                                                                 
extension/internal/pdfinput/pdf-parser.cpp:1035: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)                                                                   
extension/internal/pdfinput/pdf-parser.cpp:1037: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)                                                                   
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetFillColorN(Object*, int)':                                                                       
extension/internal/pdfinput/pdf-parser.cpp:1104: error: no matching function for call to 'GfxResources::lookupPattern(char*)'                                                         
/usr/include/poppler/Gfx.h:113: note: candidates are: GfxPattern* GfxResources::lookupPattern(char*, Gfx*)                                                                             
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opSetStrokeColorN(Object*, int)':                                                                     
extension/internal/pdfinput/pdf-parser.cpp:1148: error: no matching function for call to 'GfxResources::lookupPattern(char*)'                                                         
/usr/include/poppler/Gfx.h:113: note: candidates are: GfxPattern* GfxResources::lookupPattern(char*, Gfx*)                                                                             
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::opShFill(Object*, int)':                                                                               
extension/internal/pdfinput/pdf-parser.cpp:1546: error: no matching function for call to 'GfxResources::lookupShading(char*)'                                                         
/usr/include/poppler/Gfx.h:114: note: candidates are: GfxShading* GfxResources::lookupShading(char*, Gfx*)                                                                             
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::doImage(Object*, Stream*, GBool)':                                                                     
extension/internal/pdfinput/pdf-parser.cpp:2510: error: no matching function for call to 'GfxColorSpace::parse(Object*)'                                                               
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)
extension/internal/pdfinput/pdf-parser.cpp:2595: error: no matching function for call to 'GfxColorSpace::parse(Object*)'
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)
extension/internal/pdfinput/pdf-parser.cpp: In member function 'void PdfParser::doForm(Object*)':
extension/internal/pdfinput/pdf-parser.cpp:2770: error: no matching function for call to 'GfxColorSpace::parse(Object*)'
/usr/include/poppler/GfxState.h:182: note: candidates are: static GfxColorSpace* GfxColorSpace::parse(Object*, Gfx*)
make[2]: *** [extension/internal/pdfinput/pdf-parser.o] Error 1
make[2]: Leaving directory `/tmp/SBo/inkscape-0.47/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/inkscape-0.47'
make: *** [all] Error 2


byzkarl 02-10-2010 09:02 AM

You can install it if you uninstall poppler and install the version from Slackware 13.0. Be advised that it breaks other stuff, such as Okular and xload. There is some sort of incompatibility with poppler-12.2


I downgraded poppler, ran the slackbuild script, and then upgraded poppler back to the one in -current. Inkscape still works, but I can't say that I have tested it extensively.

Alien Bob 02-10-2010 09:40 AM

Quote:

Originally Posted by byzkarl (Post 3858999)
You can install it if you uninstall poppler and install the version from Slackware 13.0. Be advised that it breaks other stuff, such as Okular and xload. There is some sort of incompatibility with poppler-12.2


I downgraded poppler, ran the slackbuild script, and then upgraded poppler back to the one in -current. Inkscape still works, but I can't say that I have tested it extensively.

Rather than break functionality of other Slackware applications, you can use the following patch which should fix the build errors when compiling inkscape against poppler 0.12.2:
Code:

--- inkscape-0.47/src/extension/internal/pdfinput/pdf-parser.cpp~        2009-11-16 18:29:17.000000000 +0100
+++ inkscape-0.47/src/extension/internal/pdfinput/pdf-parser.cpp        2009-11-24 19:09:47.000000000 +0100
@@ -809,7 +809,7 @@
          blendingColorSpace = NULL;
          isolated = knockout = gFalse;
          if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
-            blendingColorSpace = GfxColorSpace::parse(&obj5);
+            blendingColorSpace = GfxColorSpace::parse(&obj5,(Gfx*)this);
          }
          obj5.free();
          if (obj4.dictLookup(const_cast<char*>("I"), &obj5)->isBool()) {
@@ -1009,9 +1009,9 @@
  state->setFillPattern(NULL);
  res->lookupColorSpace(args[0].getName(), &obj);
  if (obj.isNull()) {
-    colorSpace = GfxColorSpace::parse(&args[0]);
+    colorSpace = GfxColorSpace::parse(&args[0],(Gfx*)this);
  } else {
-    colorSpace = GfxColorSpace::parse(&obj);
+    colorSpace = GfxColorSpace::parse(&obj,(Gfx*)this);
  }
  obj.free();
  if (colorSpace) {
@@ -1032,9 +1032,9 @@
  state->setStrokePattern(NULL);
  res->lookupColorSpace(args[0].getName(), &obj);
  if (obj.isNull()) {
-    colorSpace = GfxColorSpace::parse(&args[0]);
+    colorSpace = GfxColorSpace::parse(&args[0],(Gfx*)this);
  } else {
-    colorSpace = GfxColorSpace::parse(&obj);
+    colorSpace = GfxColorSpace::parse(&obj,(Gfx*)this);
  }
  obj.free();
  if (colorSpace) {
@@ -1101,7 +1101,7 @@
      builder->updateStyle(state);
    }
    if (args[numArgs-1].isName() &&
-        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
+        (pattern = res->lookupPattern(args[numArgs-1].getName(),(Gfx*)this))) {
      state->setFillPattern(pattern);
      builder->updateStyle(state);
    }
@@ -1145,7 +1145,7 @@
      builder->updateStyle(state);
    }
    if (args[numArgs-1].isName() &&
-        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
+        (pattern = res->lookupPattern(args[numArgs-1].getName(),(Gfx*)this))) {
      state->setStrokePattern(pattern);
      builder->updateStyle(state);
    }
@@ -1543,7 +1543,7 @@
  double *matrix = NULL;
  GBool savedState = gFalse;
 
-  if (!(shading = res->lookupShading(args[0].getName()))) {
+  if (!(shading = res->lookupShading(args[0].getName(),(Gfx*)this))) {
    return;
  }
 
@@ -2507,7 +2507,7 @@
      }
    }
    if (!obj1.isNull()) {
-      colorSpace = GfxColorSpace::parse(&obj1);
+      colorSpace = GfxColorSpace::parse(&obj1,(Gfx*)this);
    } else if (csMode == streamCSDeviceGray) {
      colorSpace = new GfxDeviceGrayColorSpace();
    } else if (csMode == streamCSDeviceRGB) {
@@ -2592,7 +2592,7 @@
          obj2.free();
        }
      }
-      maskColorSpace = GfxColorSpace::parse(&obj1);
+      maskColorSpace = GfxColorSpace::parse(&obj1,(Gfx*)this);
      obj1.free();
      if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
        goto err1;
@@ -2767,7 +2767,7 @@
    if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
      transpGroup = gTrue;
      if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
-        blendingColorSpace = GfxColorSpace::parse(&obj3);
+        blendingColorSpace = GfxColorSpace::parse(&obj3,(Gfx*)this);
      }
      obj3.free();
      if (obj1.dictLookup(const_cast<char*>("I"), &obj3)->isBool()) {

Eric

byzkarl 02-10-2010 11:33 AM

Thanks, Eric.

That's much better than my solution.

imitis 02-11-2010 12:40 PM

patch did the thing... thank you!!!

lumak 02-17-2010 12:59 AM

It seems the main issue on Launchpad regarding this had some argument on the validity of the patch. Another was offered up that replaced the (Gfx*)this portion with NULL. I'm testing it now. I would think another valid option would be to compile static libs for a version of poppler that works with inkscape remove them after inkscape is compiled. That is with prefix /usr/local of course.


EDIT: other patch works as well
Discussion on launchpad:
https://bugs.launchpad.net/inkscape/+bug/487038

Alternative patch to above:
http://launchpadlibrarian.net/383188...n-change.patch

EDIT: it appears that inkscape 0.47 has issues with poppler 10.7. Unless I did something wrong with the set up when I sent static poppler 10.7 to /usr/local.

brodo 04-07-2010 11:08 AM

Quote:

Originally Posted by Alien Bob (Post 3859040)
Rather than break functionality of other Slackware applications, you can use the following patch which should fix the build errors when compiling inkscape against poppler 0.12.2:

Eric

And what about poppler-0.12.4 (from current Slack) ?


All times are GMT -5. The time now is 11:18 AM.