Created attachment 203213 [details] patch After last exiv updates, compiling gwenview with GCC8 fails: In file included from /usr/local/include/exiv2/types.hpp:34, from /usr/local/include/exiv2/datasets.hpp:31, from /usr/local/include/exiv2/exiv2.hpp:33, from /wrkdirs/usr/ports/graphics/gwenview/work/gwenview-18.12.3/lib/document/loadingdocumentimpl.cpp:28: /usr/local/include/exiv2/slice.hpp: In constructor 'Exiv2::Internal::SliceBase::SliceBase(size_t, size_t)': /usr/local/include/exiv2/slice.hpp:99:77: error: exception handling disabled, use -fexceptions to enable throw std::out_of_range("Begin must be smaller than end"); ^ Add -fexceptions to CXXFLAGS when using GCC to fix it.
This doesn't look like the right fix to me. Gwenview should already build this file with exceptions on. From lib/CMakeLists.txt: kde_source_files_enable_exceptions( exiv2imageloader.cpp imagemetainfomodel.cpp timeutils.cpp cms/cmsprofile.cpp document/abstractdocumentimpl.cpp document/document.cpp document/loadingdocumentimpl.cpp jpegcontent.cpp ) which makes me suspect the problem's actually elsewhere. Could you post a verbose build log for us to take a look?
(In reply to Raphael Kubo da Costa from comment #1) Sure. https://talos.anongoth.pl/data/powerpc64-default/2019-03-24_22h57m39s/logs/errors/gwenview-18.12.3_3.log
Thank you. It turns out that list of files passed to kde_source_files_enable_exceptions above was updated earlier this year after 18.12.3 was released. It's weird that clang doesn't complain about this, we could've caught it sooner. Thanks for the heads-up, I'll backport the upstream commit fixing this.
A commit references this bug: Author: rakuco Date: Fri Mar 29 18:44:20 UTC 2019 New revision: 497176 URL: https://svnweb.freebsd.org/changeset/ports/497176 Log: Backport a few changes to enable exceptions in all files that use libexiv. This is required after the recent exiv2 update to 0.27, as exiv requires a build with exceptions enabled, and KDE disables exceptions by default. This fixes the build with GCC (for some reason, clang doesn't complain that code that uses exceptions is built with -fno-exceptions). PR: 236849 Changes: head/graphics/gwenview/Makefile head/graphics/gwenview/files/patch-git_b81eed1dc head/graphics/gwenview/files/patch-git_fe0dbadae