Summary: | SplashOutputDev error: 'isfinite' was not declared in this scope | ||
---|---|---|---|
Product: | poppler | Reporter: | Torsten Seemann <torsten.seemann> |
Component: | splash backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | kenya888.en |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | poppler-c++11.patch |
Description
Torsten Seemann
2016-03-30 21:19:45 UTC
isfinite is a bit of a mess, it's new in C++11 and C99 but we compile in neither of them so technically it should have always failed but it worked because the compiler was a bit less strict, now it doesn't compile for you. Can you confirm if adding std:: fixes it? It should still fail since it's still not C++11 but maybe that's the new "less strict" mode for the newer gcc. Created attachment 123233 [details] [review] poppler-c++11.patch I've confirmed std::isfinite works fine with GCC 5.3.0 -std=c++11 option. I've attached the patch to fix this issue with minimal compatibility effect. BTW Qt5.7 requires C++11 for poppler-qt5. This is why we see this issue. What i am interested is if just adding std:: works, not this bigger patch you posted. Tried. Works fine by just replacing isfinte with std::isfinte. [My Environment] Gentoo Linux kernel 4.5.1 gcc 5.3.0 poppler latest Qt 5.7 branch [poppler consigure options] Building poppler with support for: font configuration: fontconfig splash output: yes cairo output: no qt4 wrapper: no qt5 wrapper: yes glib wrapper: no (requires cairo output) introspection: no cpp wrapper: no use gtk-doc: no use libjpeg: yes use libpng: yes use libtiff: yes use zlib compress: yes use zlib uncompress: no use nss: yes use libcurl: no use libopenjpeg: yes with openjpeg1 use cms: yes with lcms2 command line utils: yes Should we consider another platform compatibility? poppler/SplashOutputDev.cc 85 #ifdef _MSC_VER 86 #include <float.h> 87 #define isfinite(x) _finite(x) 88 #endif 89 90 #ifdef __sun 91 #include <ieeefp.h> 92 #ifndef isfinite 93 #define isfinite(x) finite(x) 94 #endif 95 #endif Ok, i went with your patch from comment #3 Thanks for your quick action:) |
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.