Bug 41225 - poppler 0.17/0.18: DCTStream no longer defined
Summary: poppler 0.17/0.18: DCTStream no longer defined
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 05:55 UTC by Vincent Untz
Modified: 2011-09-26 07:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vincent Untz 2011-09-26 05:55:22 UTC
This commit made DCTStream disappear from the Stream.h header if poppler is built with libjpeg. It turns out this was broken for years (since the added include was missing):
 http://cgit.freedesktop.org/poppler/poppler/commit/poppler/Stream.h?id=a8fca630d592941c033ca6a380bf46b6e733a748

However, at least calibre is using DCTStream. I wonder if the DCTStream.h header is not installed on purpose (and so, what calibre should do to fix the build), or if the issue is just a build bug here, with DCTStream.h that should get installed.
Comment 1 Albert Astals Cid 2011-09-26 06:32:23 UTC
There are two possibilities:
 * You do not need the DCTStream definition since all you do is use the virtuals in Stream and you can just as well use a Stream pointer
 * You are actually creating a DCTStream, i doubt it was working in the old versions since DCTStream has different object size depending on if you compile with libjpeg or not so it must have crashes somehow somewhen

Do you have a link to the code that fails to compile?
Comment 2 Vincent Untz 2011-09-26 06:38:25 UTC
This is the code where calibre fails:
http://bazaar.launchpad.net/~kovid/calibre/trunk/view/head:/src/calibre/ebooks/pdf/images.cpp

It fails with:

/usr/src/packages/BUILD/calibre/src/calibre/ebooks/pdf/images.cpp: In member function 'void calibre_reflow::XMLImages::add(GfxState*, Object*, Stream*, unsigned int, unsigned int, GfxImageColorMap*, bool, int*, bool)':
/usr/src/packages/BUILD/calibre/src/calibre/ebooks/pdf/images.cpp:129:17: error: 'DCTStream' was not declared in this scope
/usr/src/packages/BUILD/calibre/src/calibre/ebooks/pdf/images.cpp:129:28: error: expected primary-expression before ')' token
/usr/src/packages/BUILD/calibre/src/calibre/ebooks/pdf/images.cpp:129:29: error: expected ')' before 'str'

(fwiw, I don't know calibre at all -- I was just pushing poppler to openSUSE)
Comment 3 Albert Astals Cid 2011-09-26 06:58:40 UTC
That function should not exist, as a matter of fact i just removed it from poppler sources, just tell them to use getNextStream that returns the same data.
Comment 4 Vincent Untz 2011-09-26 07:04:37 UTC
Thanks. For reference, calibre bug is https://bugs.launchpad.net/calibre/+bug/855587


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.