Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 816690 - media-gfx/inkscape: fails to compile with Clang
Summary: media-gfx/inkscape: fails to compile with Clang
Status: RESOLVED DUPLICATE of bug 818706
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mikle Kolyada (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-06 16:32 UTC by Andy
Modified: 2021-11-01 06:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2021-10-06 16:32:10 UTC
When compiling Inkscape on a clang system, it throws an error

In file included from /var/tmp/portage/media-gfx/inkscape-1.1/work/inkscape-1.1_2021-05-24_c4e8f9ed74/src/object/object-set.cpp:13:
In file included from /usr/include/sigc++-2.0/sigc++/sigc++.h:123:
In file included from /usr/include/sigc++-2.0/sigc++/signal.h:7:
In file included from /usr/include/c++/v1/list:186:
In file included from /usr/include/c++/v1/algorithm:702:
In file included from /usr/include/c++/v1/__algorithm/max.h:14:
/usr/include/c++/v1/__algorithm/max_element.h:31:5: error: static_assert failed due to requirement '__is_cpp17_forward_iterator<boost::iterators::transform_iterator<Inkscape::object_to_node, boost::iterators::filter_iterator<Inkscape::is_item, boost::multi_index::detail::rnd_node_iterator<boost::multi_index::detail::random_access_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::index_node_base<SPObject *, std::allocator<SPObject *>>>>>>, boost::use_default, boost::use_default>>::value' "std::max_element requires a ForwardIterator"
    static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,

Problem seems to be known by Inkscape, as the code in object-set.cpp includes a branch for Apple with exactly this behaviour.
https://inkscape.gitlab.io/inkscape/doxygen/object-set_8cpp_source.html
Lines 260 to 266

Potential patch would see if Clang is the compiler and also apply the shown fix.


Reproducible: Always

Steps to Reproduce:
1. Compile Inkscape with Clang
2.
3.
Actual Results:  
Fails in file object-set.cpp

Expected Results:  
Should compile
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-07 01:16:14 UTC
Please do include the full build.log and emerge --info.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2021-10-16 21:57:27 UTC
(In reply to Sam James from comment #1)
> Please do include the full build.log and emerge --info.
Comment 3 Andy 2021-11-01 06:13:07 UTC
Sorry, system crashed fatally, need to redo my Gentoo installation.
Issue is still open but has been described in 818706 as well.

*** This bug has been marked as a duplicate of bug 818706 ***