1 |
On 11/23/2009 08:02 AM, Alexander wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I'm trying to upgrade app-text/poppler-utils (as part of a bigger |
5 |
> system upgrade), but it fails... |
6 |
|
7 |
> libtool: link: x86_64-pc-linux-gnu-g++ -Wall -Wno-write-strings -O2 |
8 |
> -march=nocona -pipe -Wl,-O1 -o pdfinfo pdfinfo.o printencodings.o |
9 |
> parseargs.o -lpoppler /usr/lib64/libfontconfig.so |
10 |
> /usr/lib64/libfreetype.so /usr/lib64/libexpat.so -lopenjpeg -lz |
11 |
> ImageOutputDev.o: In function `ImageOutputDev::drawImage(GfxState*, |
12 |
> Object*, Stream*, int, int, GfxImageColorMap*, int*, int)': |
13 |
> ImageOutputDev.cc:(.text+0x2f4): undefined reference to `ImageStream::close()' |
14 |
|
15 |
Just finding the real error in all that junk is the first challenge |
16 |
in debugging :o) I just noticed that the word 'error' doesn't even |
17 |
appear in the libtool 'error' message. Hrmphh! Yet another black |
18 |
mark on libtool's report card. |
19 |
|
20 |
Notice the double colons in "ImageStream::close()". That's a dead |
21 |
giveaway that this is c++ code. Remember that, because you will see |
22 |
this kind of c++ problem fairly often. |
23 |
|
24 |
The usual suspect is that you are now using a different (newer?) gcc |
25 |
to build poppler-utils than you were using when you compiled the |
26 |
c++ library that's causing this problem. (Usually, but not always.) |
27 |
|
28 |
So, which c++ library is causing the problem? |
29 |
|
30 |
A quick and dirty check: |
31 |
$grep -r ImageStream /usr/include/* |
32 |
/usr/include/ImageMagick/magick/image.h: DisassociateImageStream(Image *), |
33 |
/usr/include/ImageMagick/magick/methods.h:#define DisassociateImageStream PrependMagickMethod(DisassociateImageStream) |
34 |
/usr/include/poppler/Gfx.h: Stream *buildImageStream(); |
35 |
/usr/include/poppler/Stream.h:// ImageStream |
36 |
/usr/include/poppler/Stream.h:class ImageStream { <-------- Eureka! |
37 |
|
38 |
|
39 |
$equery b Stream.h |
40 |
[ Searching for file(s) Stream.h in *... ] |
41 |
dev-libs/poppler-0.10.7 (/usr/include/poppler/Stream.h) |
42 |
|
43 |
So, the guilty party is poppler? Looks like it. |
44 |
|
45 |
The cheap and dirty remedy is to re-emerge poppler, but just for my |
46 |
own education (and yours, I hope) I'm slogging ahead: |
47 |
|
48 |
The ImageStream 'class' should define a 'method' named close(). (This |
49 |
is the usual and customary object-oriented paradigm.) Take a look at |
50 |
Stream.h, and look for these lines: |
51 |
|
52 |
// Close the stream previously reset |
53 |
void close(); |
54 |
|
55 |
Do you see them? If not, re-emerge poppler and look again. I'd like |
56 |
to know if I'm on the right track. |