Hello, somehow texstudio does not want to compile on my machine due to this error: pdfviewer/PDFDocument.cpp: In member function ‘void PDFWidget::goToPageRelativePosition(int, float, float)’: pdfviewer/PDFDocument.cpp:968:18: error: ‘isnan’ was not declared in this scope if (isnan(xinpdf)) xinpdf = 0; ^ pdfviewer/PDFDocument.cpp:968:18: note: suggested alternative: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/random:38:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/bits/stl_algo.h:66, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/algorithm:62, from /usr/include/qt5/QtCore/qglobal.h:85, from /usr/include/qt5/QtCore/qnamespace.h:37, from /usr/include/qt5/QtCore/qobjectdefs.h:41, from /usr/include/qt5/QtCore/qobject.h:40, from /usr/include/qt5/QtCore/QObject:1, from ./modifiedQObject.h:44, from ./mostQtHeaders.h:12, from pdfviewer/PDFDocument.h:28, from pdfviewer/PDFDocument.cpp:24: /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ pdfviewer/PDFDocument.cpp:970:18: error: ‘isnan’ was not declared in this scope if (isnan(yinpdf)) yinpdf = 0; ^ pdfviewer/PDFDocument.cpp:970:18: note: suggested alternative: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/random:38:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/bits/stl_algo.h:66, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/algorithm:62, from /usr/include/qt5/QtCore/qglobal.h:85, from /usr/include/qt5/QtCore/qnamespace.h:37, from /usr/include/qt5/QtCore/qobjectdefs.h:41, from /usr/include/qt5/QtCore/qobject.h:40, from /usr/include/qt5/QtCore/QObject:1, from ./modifiedQObject.h:44, from ./mostQtHeaders.h:12, from pdfviewer/PDFDocument.h:28, from pdfviewer/PDFDocument.cpp:24: /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/cmath:641:5: note: ‘std::isnan’ isnan(_Tp __x) ^ pdfviewer/PDFDocument.cpp:975:19: error: ‘isnan’ was not declared in this scope if (!isnan(xinpdf)) I also tried it with gcc 4.9.3 and i also added CXXFLAGS="${CXXFLAGS} -std=gnu++11" in my /etc/portage/env/app-office/texstudio-2.10.8 since I read that isnan might be related to that, but it still doesn't work. Am I missing something or is there a patch necessary? Because I found this: http://stackoverflow.com/questions/18128899/is-isnan-in-the-std-namespace-more-in-general-when-is-std-necessary-optio My system ist ~amd64. Regards, Stefan
*** Bug 581692 has been marked as a duplicate of this bug. ***
It seems related with the last poppler bump (0.43.0).
I just created an upstream ticket: https://sourceforge.net/p/texstudio/bugs/1752/
Are you sure its related to poppler 0.43? Because I am still on poppler 0.42 and the update to 0.43 is pending, i.e. I could install it now, but if it causes even more trouble, I won't do it now.
No. I guessed about poppler because I had compiled texstudio these days and everything went fine until the new version of poppler be updated, what forced the rebuild of texstudio and its failed.
I do not code but I took a look on similar situations on several applications with the same error at compile phase, and the fix was: replace isnan() with std::isnan() If someone could crate a patch I will be glad to test it.
(In reply to Franz Fellner from comment #3) > I just created an upstream ticket: > https://sourceforge.net/p/texstudio/bugs/1752/ Upstream fixed it: https://sourceforge.net/p/texstudio/hg/ci/91a3b80d1379dad093b489ca34e64bc17d6e632b/
Created attachment 432866 [details, diff] Patch fixing upsream 1752bug in texstudio Patch from commit fixing bug1752 in texstudio - with this patch applied the texstudio is building on my machines, HTH.
Please note that there were several other commits to patch out <cmath> again and replace it by Qt-internal function qIsNaN (which initially broke qt4-builds but that also got fixed). This is due to support for older compilers that don't support C++11. But as it seems the OpenSuse Build-Farm did not complain even on systems having too old compilers... So this patch might be OK for Gentoo, but it has the potential to break things on another end ;)
*** Bug 583692 has been marked as a duplicate of this bug. ***
so what the solution?
(In reply to tman from comment #11) 2.11.0 is out, compiled fine with a minimally modified ebuild based on texstudio-2.10.8. (texstudio-2.6.4-hunspell-quazip.patch no longer needed/fails)
(In reply to Andreas G. from comment #12) > (In reply to tman from comment #11) > 2.11.0 is out, compiled fine with a minimally modified ebuild based on > texstudio-2.10.8. (texstudio-2.6.4-hunspell-quazip.patch no longer > needed/fails) would you like to upload this modified ebuild please?
Created attachment 436576 [details] Updated ebuild that compiles on my system
commit 5ab76a7c58637868046230813fbc28571441afa3 Author: Manuel Rüger <mrueg@gentoo.org> Date: Thu Aug 25 17:43:36 2016 +0200 app-office/texstudio: Version bump to 2.11.0 Gentoo-Bug: #581520 Gentoo-Bug: #586854 Gentoo-Bug: #584888 Gentoo-Bug: #590702 Package-Manager: portage-2.3.0 Bumped to 2.11.0, please test if the error still occurs.
Appears to be fixed!