Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670596 - net-print/cups-filters with >=app-text/poppler-0.71.0: filter/pdftoraster.cxx:1689:45: error: invalid conversion from ‘const PDFRectangle*’ to ‘PDFRectangle*’ [-fpermissive] PDFRectangle *mediaBox = page->getMediaBox();
Summary: net-print/cups-filters with >=app-text/poppler-0.71.0: filter/pdftoraster.cxx...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL: https://github.com/OpenPrinting/cups-...
Whiteboard: fixed in 1.21.6
Keywords:
Depends on: 674814
Blocks: poppler-0.71.0
  Show dependency tree
 
Reported: 2018-11-07 15:13 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2019-01-07 20:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,64.13 KB, text/plain)
2018-11-07 15:13 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details
cups-filters-poppler-0.71.patch (cups-filters-poppler-0.71.patch,1.56 KB, patch)
2018-11-09 21:39 UTC, Andrey Volkov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-11-07 15:13:32 UTC
Created attachment 554344 [details]
build.log

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.       -I/usr/include/libpng16 -I/usr/include/poppler  -I./cupsfilters/ -march=native -mtune=native -O2 -pipe -std=c++11 -Wall  -D_GNU_SOURCE -c -o pdftoraster-pdftoraster.o `test -f 'filter/pdftoraster.cxx' || echo './'`filter/pdftoraster.cxx
filter/pdftoraster.cxx: In function ‘void outPage(PDFDoc*, Catalog*, int, SplashOutputDev*, cups_raster_t*)’:
filter/pdftoraster.cxx:1689:45: error: invalid conversion from ‘const PDFRectangle*’ to ‘PDFRectangle*’ [-fpermissive]
   PDFRectangle *mediaBox = page->getMediaBox();
                            ~~~~~~~~~~~~~~~~~^~
filter/pdftoraster.cxx:1817:6: error: ‘gTrue’ was not declared in this scope
      gTrue,gTrue,gTrue);
      ^~~~~
filter/pdftoraster.cxx:1817:6: note: suggested alternative: ‘gfree’
      gTrue,gTrue,gTrue);
      ^~~~~
      gfree
filter/pdftoraster.cxx: In function ‘int main(int, char**)’:
filter/pdftoraster.cxx:1970:20: error: invalid conversion from ‘void (*)(void*, ErrorCategory, Goffset, char*)’ {aka ‘void (*)(void*, ErrorCategory, long long int, char*)’} to ‘void (*)(void*, ErrorCategory, Goffset, const char*)’ {aka ‘void (*)(void*, ErrorCategory, long long int, const char*)’} [-fpermissive]
   setErrorCallback(::myErrorFun,NULL);
                    ^~
In file included from /usr/include/poppler/Object.h:45,
                 from filter/pdftoraster.cxx:44:
/usr/include/poppler/Error.h:50:37: note:   initializing argument 1 of ‘void setErrorCallback(void (*)(void*, ErrorCategory, Goffset, const char*), void*)’
 extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category,
                              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       Goffset pos, const char *msg),
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
filter/pdftoraster.cxx:2127:5: error: ‘gFalse’ was not declared in this scope
     gFalse,paperColor,gTrue
     ^~~~~~
filter/pdftoraster.cxx:2127:5: note: suggested alternative: ‘pause’
     gFalse,paperColor,gTrue
     ^~~~~~
     pause
filter/pdftoraster.cxx:2127:23: error: ‘gTrue’ was not declared in this scope
     gFalse,paperColor,gTrue
                       ^~~~~
filter/pdftoraster.cxx:2127:23: note: suggested alternative: ‘gfree’
     gFalse,paperColor,gTrue
                       ^~~~~
                       gfree
filter/pdftoraster.cxx:2166:11: error: ‘memCheck’ is not a member of ‘Object’
   Object::memCheck(stderr);
           ^~~~~~~~
filter/pdftoraster.cxx:2167:3: error: ‘gMemReport’ was not declared in this scope
   gMemReport(stderr);
   ^~~~~~~~~~
filter/pdftoraster.cxx:2167:3: note: suggested alternative: ‘rresvport’
   gMemReport(stderr);
   ^~~~~~~~~~
   rresvport
make[1]: *** [Makefile:4367: pdftoraster-pdftoraster.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-print/cups-filters-1.21.3/work/cups-filters-1.21.3'
make: *** [Makefile:2077: all] Error 2
 * ERROR: net-print/cups-filters-1.21.3::gentoo failed (compile phase):
 *   emake failed
Comment 1 Andrey Volkov 2018-11-09 21:16:01 UTC
Upstream commit caused this errors
https://cgit.freedesktop.org/poppler/poppler/commit/?id=163420b48bdddf9084208b3cadf04dafad52d40a

GBool, gTrue, and gFalse replaced by bool, true, false, respectively (poppler-0.71.0)

Fix for cups-filters-1.21.3.
https://git.archlinux.org/svntogit/packages.git/plain/trunk/cups-filters-poppler-0.71.patch?h=packages/cups-filters&id=12a11ed2bd0aac9460bae4ce2390003c0a20ef75
Whole replacement for GBool, gTrue, gFalse
Comment 2 Andrey Volkov 2018-11-09 21:30:44 UTC
Fix for more errors:

filter/pdftoraster.cxx:2169:11: error: 'memCheck' is not a member of 'Object'
   Object::memCheck(stderr);
           ^~~~~~~~
filter/pdftoraster.cxx:2170:3: error: 'gMemReport' was not declared in this scope
   gMemReport(stderr);
   ^~~~~~~~~~

>=app-text/poppler-0.69 support

Upstream commit
https://github.com/OpenPrinting/cups-filters/commit/6b0747c1630dd973acd138f927dbded4ea45e360.patch
Comment 3 Andrey Volkov 2018-11-09 21:39:27 UTC
Created attachment 554708 [details, diff]
cups-filters-poppler-0.71.patch

Fix errors with the const pointers (poppler-0.71.0)

filter/pdftoijs.cxx: In function 'int main(int, char**)':
filter/pdftoijs.cxx:299:20: error: invalid conversion from 'void (*)(void*, ErrorCategory, Goffset, char*)' {aka 'void (*)(void*, ErrorCategory, long long int, char*)'} to 'void (*)(void*, ErrorCategory, Goffset, const char*)' {aka 'void (*)(void*, ErrorCategory, long long int, const char*)'} [-fpermissive]
   setErrorCallback(::myErrorFun,NULL);
                    ^~
filter/pdftoraster.cxx: In function 'void outPage(PDFDoc*, Catalog*, int, SplashOutputDev*, cups_raster_t*)':
filter/pdftoraster.cxx:1689:45: error: invalid conversion from 'const PDFRectangle*' to 'PDFRectangle*' [-fpermissive]
   PDFRectangle *mediaBox = page->getMediaBox();
                            ~~~~~~~~~~~~~~~~~^~
filter/pdftoraster.cxx: In function 'int main(int, char**)':
filter/pdftoraster.cxx:1970:20: error: invalid conversion from 'void (*)(void*, ErrorCategory, Goffset, char*)' {aka 'void (*)(void*, ErrorCategory, long long int, char*)'} to 'void (*)(void*, ErrorCategory, Goffset, const char*)' {aka 'void (*)(void*, ErrorCategory, long long int, const char*)'} [-fpermissive]
   setErrorCallback(::myErrorFun,NULL);
                    ^~
Comment 4 Andrey Volkov 2018-11-09 21:45:33 UTC
My last patch should be renamed to cups-filters-poppler-0.70.patch as it is addressed to poppler-0.70 changes.
Comment 5 Hanno Böck gentoo-dev 2018-12-11 09:06:45 UTC
The new upstream version cups-filters 1.21.5 lists poppler fixes in the changelog, it's already in the tree so I believe unless there are any blockers stabilizing this version should resolve this bug.
Comment 6 Andreas Sturmlechner gentoo-dev 2019-01-07 20:21:56 UTC
Indeed, and 1.21.6 built fine against 0.72.0 already.