System POPPLER_VERSION redefined, won't build

classic Classic list List threaded Threaded
9 messages Options
ariel cornejo ariel cornejo
Reply | Threaded
Open this post in threaded view
|

System POPPLER_VERSION redefined, won't build

Biulding from Git with --with-system-poppler I get a warning repeatedly:
In file included from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx:24:0,
                 from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:20:
/mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:57:0: warning: "POPPLER_VERSION" redefined
 #define POPPLER_VERSION "0.12.3"
 ^
In file included from /usr/include/poppler/GfxState.h:38:0,
                 from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:33,
                 from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx:24,
                 from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:20:
/usr/include/poppler/poppler-config.h:37:0: note: this is the location of the previous definition
 #define POPPLER_VERSION "0.33.0"
 ^
And gcc fails because the arguments to processLink() are wrong:
In file included from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx:24:0,
                 from /mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx:20:
/mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:200:34: error: ‘Link’ has not been declared
         virtual void processLink(Link *link, Catalog *catalog) override;
                                  ^
/mnt/windows/libreoffice-src/core/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx:185:22: error: ‘virtual void pdfi::PDFOutDev::startPage(int, GfxState*)’ marked ‘override’, but does not override
         virtual void startPage(int pageNum, GfxState *state
                      ^
ariel cornejo ariel cornejo
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

(cont'd)

Apparently POPPLER_VERSION depends on HAVE_POPPLER_VERSION_H, which in turn is set in the configure script:

$as_echo "#define HAVE_POPPLER_VERSION_H 1" >>confdefs.h

But in the past I've just had to run autogen.sh before make. What's more, configure ignores the options I set in autogen.lastrun. Just to see what would happen, I created core/confdefs.h with the single required line, to no avail; it might not even be the right path.

What's wrong?

Markus Mohrhard Markus Mohrhard
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

Hey,

On Sun, Nov 8, 2015 at 7:39 PM, ariel cornejo <[hidden email]> wrote:

(cont'd)

Apparently POPPLER_VERSION depends on HAVE_POPPLER_VERSION_H, which in turn is set in the configure script:

$as_echo "#define HAVE_POPPLER_VERSION_H 1" >>confdefs.h

But in the past I've just had to run autogen.sh before make. What's more, configure ignores the options I set in autogen.lastrun. Just to see what would happen, I created core/confdefs.h with the single required line, to no avail; it might not even be the right path.

What's wrong?


The poppler warning is not responsible for your build failure. Maybe the recent move to typed Link has missed the system-poppler case.


View this message in context: Re: System POPPLER_VERSION redefined, won't build

Sent from the Dev mailing list archive at Nabble.com.

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice



_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
ariel cornejo ariel cornejo
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

Sure about that? The compilation bombs at line 200:
    194         //----- link borders
    195         #if POPPLER_CHECK_VERSION(0, 19, 0)
    196         virtual void processLink(AnnotLink *link) override;
    197     #elif POPPLER_CHECK_VERSION(0, 17, 0)
    198         virtual void processLink(AnnotLink *link, Catalog *catalog) override;
    199     #else
  * 200         virtual void processLink(Link *link, Catalog *catalog) override;
    201     #endif 
It looks like it would work if POPPLER_CHECK_VERSION(0, 19, 0) was true, because it'd use AnnotLink, which is what /usr/include/poppler/Link.h defines.
Markus Mohrhard Markus Mohrhard
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

Oh,

Link is also a different concept in LibreOffice.

So which version of poppler (and the corresponding development package) do you have installed?

Regards,
Markus

On Sun, Nov 8, 2015 at 8:32 PM, ariel cornejo <[hidden email]> wrote:
Sure about that? The compilation bombs at line 200:
    194         //----- link borders
    195         #if POPPLER_CHECK_VERSION(0, 19, 0)
    196         virtual void processLink(AnnotLink *link) override;
    197     #elif POPPLER_CHECK_VERSION(0, 17, 0)
    198         virtual void processLink(AnnotLink *link, Catalog *catalog) override;
    199     #else
  * 200         virtual void processLink(Link *link, Catalog *catalog) override;
    201     #endif 
It looks like it would work if POPPLER_CHECK_VERSION(0, 19, 0) was true, because it'd use AnnotLink, which is what /usr/include/poppler/Link.h defines.

View this message in context: Re: System POPPLER_VERSION redefined, won't build
Sent from the Dev mailing list archive at Nabble.com.

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice



_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
ariel cornejo ariel cornejo
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

$ dpkg -l \*poppler\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-============================================================
ii  libpoppler-dev:amd64        0.33.0-0ubuntu3    amd64              PDF rendering library -- development files
ii  libpoppler-glib8:amd64      0.33.0-0ubuntu3    amd64              PDF rendering library (GLib-based shared library)
ii  libpoppler-private-dev:amd6 0.33.0-0ubuntu3    amd64              PDF rendering library -- private development files
ii  libpoppler52:amd64          0.33.0-0ubuntu3    amd64              PDF rendering library
ii  poppler-data                0.4.7-3            all                encoding data for the poppler PDF rendering library
ii  poppler-utils               0.33.0-0ubuntu3    amd64              PDF utilities (based on Poppler)
Michael Stahl-2 Michael Stahl-2
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

In reply to this post by ariel cornejo
On 09.11.2015 04:39, ariel cornejo wrote:
> (cont'd)
>
> Apparently POPPLER_VERSION depends on HAVE_POPPLER_VERSION_H, which in
> turn is set in the configure script:
>
> $as_echo "#define HAVE_POPPLER_VERSION_H 1" >>confdefs.h

it is definitely a bug somewhere if HAVE_POPPLER_VERSION_H isn't set for
a current version of poppler.

e.g. on Fedora 22 i have /usr/include/poppler/cpp/poppler-version.h and
HAVE_POPPLER_VERSION_H set.

maybe look at config.log where it checks for poppler-version.h what the
error is.

> But in the past I've just had to run autogen.sh before make. What's
> more, configure ignores the options I set in autogen.lastrun. Just to
> see what would happen, I created core/confdefs.h with the single
> required line, to no avail; it might not even be the right path.

you need to use autogen.input, not autogen.lastrun.



_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
ariel cornejo ariel cornejo
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

Michael Stahl-2 wrote
it is definitely a bug somewhere if HAVE_POPPLER_VERSION_H isn't set for a current version of poppler. e.g. on Fedora 22 i have /usr/include/poppler/cpp/poppler-version.h and HAVE_POPPLER_VERSION_H set. maybe look at config.log where it checks for poppler-version.h what the error is.

Turns out poppler-version.h was missing; in Ubuntu it comes in the libpoppler-cpp-dev package.

Here's what happens without it.

Output from autogen.sh:

checking for POPPLER... yes
checking cpp/poppler-version.h usability... no
checking cpp/poppler-version.h presence... no
checking for cpp/poppler-version.h... no

config.log:

configure:36446: checking for POPPLER
configure:36453: $PKG_CONFIG --exists --print-errors "poppler >= 0.12.0 "
configure:36456: $? = 0
configure:36470: $PKG_CONFIG --exists --print-errors "poppler >= 0.12.0 "
configure:36473: $? = 0
configure:36531: result: yes
configure:36545: checking cpp/poppler-version.h usability
configure:36545: g++ -c -O3 -march=native -pipe -I/usr/include/poppler    -I/usr/include/poppler  conftest.cpp >&5
conftest.cpp:138:33: fatal error: cpp/poppler-version.h: No such file or directory
compilation terminated.
configure:36545: $? = 1
configure: failed program was:
| /* confdefs.h */
| #include <cpp/poppler-version.h>
configure:36545: result: no
configure:36545: checking cpp/poppler-version.h presence
configure:36545: g++ -E   -I/usr/include/poppler  conftest.cpp
conftest.cpp:105:33: fatal error: cpp/poppler-version.h: No such file or directory
compilation terminated.
configure:36545: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "LibreOffice"
| #define PACKAGE_TARNAME "libreoffice"
| #define PACKAGE_VERSION "5.1.0.0.alpha1+"
...
| #include <cpp/poppler-version.h>
configure:36545: result: no
configure:36545: checking cpp/poppler-version.h presence
configure:36545: g++ -E   -I/usr/include/poppler  conftest.cpp
conftest.cpp:105:33: fatal error: cpp/poppler-version.h: No such file or directory
compilation terminated.
configure:36545: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "LibreOffice"
| #define PACKAGE_TARNAME "libreoffice"
| #define PACKAGE_VERSION "5.1.0.0.alpha1+"
...
| /* end confdefs.h.  */
| #include <cpp/poppler-version.h>
configure:36545: result: no
configure:36545: checking for cpp/poppler-version.h
configure:36545: result: no
configure:36630: checking whether to build the Wiki Publisher extension

http://pastebin.com/CGrUQwuh

So configure does check for the file but ignores the failed test.

There's also GfxState.h, that comes in yet another package libpoppler-private-dev and is also needed, but configure doesn't test for it. Maybe they used to be in the same package so only one test was needed?

Michael Stahl-2 Michael Stahl-2
Reply | Threaded
Open this post in threaded view
|

Re: System POPPLER_VERSION redefined, won't build

On 10.11.2015 18:35, ariel cornejo wrote:

>     Michael Stahl-2 wrote
>     it is definitely a bug somewhere if HAVE_POPPLER_VERSION_H isn't set
>     for a current version of poppler. e.g. on Fedora 22 i have
>     /usr/include/poppler/cpp/poppler-version.h and
>     HAVE_POPPLER_VERSION_H set. maybe look at config.log where it checks
>     for poppler-version.h what the error is.
>
> Turns out poppler-version.h was missing; in Ubuntu it comes in the
> libpoppler-cpp-dev package.
>

> So configure does check for the file but ignores the failed test.

well that check was apparently added because there are old versions of
poppler that didn't have this poppler-version.h header, see
697804f48f4217dab145d96175c6cddf560ec614

> There's also GfxState.h, that comes in yet another package
> libpoppler-private-dev and is also needed, but configure doesn't test
> for it. Maybe they used to be in the same package so only one test was
> needed?

ugh... sounds like somebody who actually uses Ubuntu needs to submit a
patch to configure.ac to detect all of the constantly multiplying
libpoppler-*-dev packages we need.


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice