[gentoo-user] Re: app-text/poppler-utils install fails

2009-11-23 Thread walt

On 11/23/2009 08:02 AM, Alexander wrote:

Hi,

I'm trying to upgrade app-text/poppler-utils (as part of a bigger
system upgrade), but it fails...



libtool: link: x86_64-pc-linux-gnu-g++ -Wall -Wno-write-strings -O2
-march=nocona -pipe -Wl,-O1 -o pdfinfo pdfinfo.o printencodings.o
parseargs.o  -lpoppler /usr/lib64/libfontconfig.so
/usr/lib64/libfreetype.so /usr/lib64/libexpat.so -lopenjpeg -lz
ImageOutputDev.o: In function `ImageOutputDev::drawImage(GfxState*,
Object*, Stream*, int, int, GfxImageColorMap*, int*, int)':
ImageOutputDev.cc:(.text+0x2f4): undefined reference to `ImageStream::close()'


Just finding the real error in all that junk is the first challenge
in debugging :o)  I just noticed that the word 'error' doesn't even
appear in the libtool 'error' message.  Hrmphh!  Yet another black
mark on libtool's report card.

Notice the double colons in ImageStream::close().  That's a dead
giveaway that this is c++ code.  Remember that, because you will see
this kind of c++ problem fairly often.

The usual suspect is that you are now using a different (newer?) gcc
to build poppler-utils than you were using when you compiled the
c++ library that's causing this problem.  (Usually, but not always.)

So, which c++ library is causing the problem?

A quick and dirty check:
$grep -r ImageStream /usr/include/*
/usr/include/ImageMagick/magick/image.h:  DisassociateImageStream(Image *),
/usr/include/ImageMagick/magick/methods.h:#define DisassociateImageStream  
PrependMagickMethod(DisassociateImageStream)
/usr/include/poppler/Gfx.h:  Stream *buildImageStream();
/usr/include/poppler/Stream.h:// ImageStream
/usr/include/poppler/Stream.h:class ImageStream {    Eureka!


$equery b Stream.h
[ Searching for file(s) Stream.h in *... ]
dev-libs/poppler-0.10.7 (/usr/include/poppler/Stream.h)

So, the guilty party is poppler?  Looks like it.

The cheap and dirty remedy is to re-emerge poppler, but just for my
own education (and yours, I hope) I'm slogging ahead:

The ImageStream 'class' should define a 'method' named close(). (This
is the usual and customary object-oriented paradigm.) Take a look at
Stream.h, and look for these lines:

  // Close the stream previously reset
  void close();

Do you see them?  If not, re-emerge poppler and look again. I'd like
to know if I'm on the right track.









Re: [gentoo-user] Re: app-text/poppler-utils install fails

2009-11-23 Thread Alexander
On Mon, Nov 23, 2009 at 6:33 PM, walt w41...@gmail.com wrote:

 On 11/23/2009 08:02 AM, Alexander wrote:

 Hi,

 I'm trying to upgrade app-text/poppler-utils (as part of a bigger
 system upgrade), but it fails...


  libtool: link: x86_64-pc-linux-gnu-g++ -Wall -Wno-write-strings -O2
 -march=nocona -pipe -Wl,-O1 -o pdfinfo pdfinfo.o printencodings.o
 parseargs.o  -lpoppler /usr/lib64/libfontconfig.so
 /usr/lib64/libfreetype.so /usr/lib64/libexpat.so -lopenjpeg -lz
 ImageOutputDev.o: In function `ImageOutputDev::drawImage(GfxState*,
 Object*, Stream*, int, int, GfxImageColorMap*, int*, int)':
 ImageOutputDev.cc:(.text+0x2f4): undefined reference to
 `ImageStream::close()'


 Just finding the real error in all that junk is the first challenge
 in debugging :o)  I just noticed that the word 'error' doesn't even
 appear in the libtool 'error' message.  Hrmphh!  Yet another black
 mark on libtool's report card.

 Notice the double colons in ImageStream::close().  That's a dead
 giveaway that this is c++ code.  Remember that, because you will see
 this kind of c++ problem fairly often.

 The usual suspect is that you are now using a different (newer?) gcc
 to build poppler-utils than you were using when you compiled the
 c++ library that's causing this problem.  (Usually, but not always.)

 So, which c++ library is causing the problem?

 A quick and dirty check:
 $grep -r ImageStream /usr/include/*
 /usr/include/ImageMagick/magick/image.h:  DisassociateImageStream(Image *),
 /usr/include/ImageMagick/magick/methods.h:#define DisassociateImageStream
  PrependMagickMethod(DisassociateImageStream)
 /usr/include/poppler/Gfx.h:  Stream *buildImageStream();
 /usr/include/poppler/Stream.h:// ImageStream
 /usr/include/poppler/Stream.h:class ImageStream {    Eureka!


 $equery b Stream.h
 [ Searching for file(s) Stream.h in *... ]
 dev-libs/poppler-0.10.7 (/usr/include/poppler/Stream.h)

 So, the guilty party is poppler?  Looks like it.

 The cheap and dirty remedy is to re-emerge poppler, but just for my
 own education (and yours, I hope) I'm slogging ahead:

 I reinstalled dev-libs/poppler, and now installing app-text/poppler-utils
works.


 The ImageStream 'class' should define a 'method' named close(). (This
 is the usual and customary object-oriented paradigm.) Take a look at
 Stream.h, and look for these lines:

  // Close the stream previously reset
  void close();

 Do you see them?  If not, re-emerge poppler and look again. I'd like
 to know if I'm on the right track.

  I checked this, and I could not find this line. Then I reinstalled it, and
now it's there.

Thanks for the very informative reply! -- next time I'll know to try this
approach too.

Best,

Alexander