
I haven't had problems compiling CVS before. This time though, 3 files seem to be giving me problems:
/usr/include/poppler/Object.h extension/internal/pdfinput/svg-builder.cpp extension/internal/pdfinput/pdf-parser.cpp
Nearly all of it involves the following message:
warning: deprecated conversion from string constant to ‘char*’
There are too many of them, so I can't copy/paste them all, but when looking at the files they involve lines such as:
error(-1, "Weird page contents");
Any idea where the error may come from? The error function perhaps?

On Jul 12, 2008, at 8:12 AM, Valerie wrote:
I haven't had problems compiling CVS before. This time though, 3 files seem to be giving me problems:
/usr/include/poppler/Object.h extension/internal/pdfinput/svg-builder.cpp extension/internal/pdfinput/pdf-parser.cpp
Nearly all of it involves the following message:
warning: deprecated conversion from string constant to ‘char*’
There are too many of them, so I can't copy/paste them all, but when looking at the files they involve lines such as:
error(-1, "Weird page contents");
Any idea where the error may come from? The error function perhaps?
Well, first of all those are just "warning"s, so they aren't actually blocking you from compiling. What would be doing so would be some "error:" or perhaps some link problems with a different phrase, but at the end.
That specific warning is because a string constant is unmodifiable, but it is being fed to a function that uses a "char*" parameter instead of "const char*" and thus is marked as possibly changing the contents of the string you pass in. Sometimes it is due to an outdated API declaration not using "const" when it should, but other times it is showing an actual problem.
To find your real problem with compilation, though, look through the rest of the output for the errors. That's also one reason I like doing a compile from inside of emacs; it makes it quite easy to watch and search the output.

Thank you! Thanks to you all I've solved the problem! :D
And yes, the problem was with the Poppler update.
I've managed to find the same problem with 0.46 through Google, as well as a corresponding fix.
So for CVS, you just need to find back the right lines:
Line 2344: - Unicode u[8]; + Unicode *u = NULL;
Line 2392: - u, (int)(sizeof(u) / sizeof(Unicode)), &uLen, + &u, &uLen,
Line 2441: - u, (int)(sizeof(u) / sizeof(Unicode)), &uLen, + &u, &uLen,
Inkscape compiles after that.
./configure CFLAGS="-DPOPPLER_NEW_GFXFONT"
I guess that would work too. XD

I asked the Poppler guys if they could define macros with their version info in them, so that the version could be sensed at compile time. I don't know what they want to do.
The problem is that the Inkscape code calls internal Poppler, stuff and not their public API. So there are no promises that there will not be more breakages in the future. The Poppler guys know that we are using their code improperly. But they also -like- us using Poppler in Inkscape (they helped with the fix). So in the future there might possibly be a more stable low-level way of catching parsing events. Maybe registering a callback?
bob
Valerie wrote:
Thank you! Thanks to you all I've solved the problem! :D
And yes, the problem was with the Poppler update.
I've managed to find the same problem with 0.46 through Google, as well as a corresponding fix.
So for CVS, you just need to find back the right lines:
Line 2344:
- Unicode u[8];
- Unicode *u = NULL;
Line 2392:
u, (int)(sizeof(u) / sizeof(Unicode)),&uLen,
&u,&uLen,
Line 2441:
u, (int)(sizeof(u) / sizeof(Unicode)),&uLen,
&u,&uLen,
Inkscape compiles after that.
./configure CFLAGS="-DPOPPLER_NEW_GFXFONT"
I guess that would work too. XD
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

I'd comment, but I don't really understand beyond "Inkscape is not using Poppler properly." XD
Thanks for the help though! :D
I asked the Poppler guys if they could define macros with their version info in them, so that the version could be sensed at compile time. I don't know what they want to do.
The problem is that the Inkscape code calls internal Poppler, stuff and not their public API. So there are no promises that there will not be more breakages in the future. The Poppler guys know that we are using their code improperly. But they also -like- us using Poppler in Inkscape (they helped with the fix). So in the future there might possibly be a more stable low-level way of catching parsing events. Maybe registering a callback?

Maybe you could post the error messages here?
The pdf-parser.cpp compilation problem is likely the same as everyone else has been having (there is a new version of Poppler, 0.8.3), which was posted on the list a couple of weeks ago. There is a hack for the problem in that file already, which is invoked by calling configure with:
./configure CFLAGS="-DPOPPLER_NEW_GFXFONT" (and anything else you want)
bob
(changing the topic) I noticed that the FreeBSD guys simply changed the switch in the source from #ifdef POPPLER_NEW_GFXFONT to #if 1. Those silly guys! :-)
Valerie wrote:
I haven't had problems compiling CVS before. This time though, 3 files seem to be giving me problems:
/usr/include/poppler/Object.h extension/internal/pdfinput/svg-builder.cpp extension/internal/pdfinput/pdf-parser.cpp
Nearly all of it involves the following message:
warning: deprecated conversion from string constant to ‘char*’
There are too many of them, so I can't copy/paste them all, but when looking at the files they involve lines such as:
error(-1, "Weird page contents");
Any idea where the error may come from? The error function perhaps?
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (3)
-
Bob Jamison
-
Jon A. Cruz
-
Valerie