Bug 236849 - graphics/gwenview: fix build with GCC-based architectures
Summary: graphics/gwenview: fix build with GCC-based architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-28 11:48 UTC by Piotr Kubaj
Modified: 2019-03-29 18:45 UTC (History)
2 users (show)

See Also:
rakuco: maintainer-feedback+


Attachments
patch (342 bytes, patch)
2019-03-28 11:48 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-03-28 11:48:16 UTC
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.
Comment 1 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-03-28 18:49:39 UTC
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?
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-03-29 07:35:50 UTC
(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
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2019-03-29 18:31:48 UTC
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.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-29 18:44:47 UTC
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