bugGNU Octave - Bugs: bug #60884, [octave forge] (geometry) Compile...

 
 

bug #60884: [octave forge] (geometry) Compile with g++ v11

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Tue 06 Jul 2021 08:38:43 AM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Ready For Test Assigned to:  Juan Pablo Carbajal <juanpi>
Originator Name:  Open/Closed:  Open
Release:  other Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 07 Jul 2021 09:57:34 PM UTC, comment #2: 

Tested on my side. The reported erro is fixed, there remains a warning

> pkg install geometry-4.0.1.tar.gz
clipper.cpp: In function ‘void ClipperLib::InitEdge(ClipperLib::TEdge*, ClipperLib::TEdge*, ClipperLib::TEdge*, const ClipperLib::IntPoint&)’:
clipper.cpp:750:34: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct ClipperLib::TEdge’; use assignment or value-initialization instead [-Wclass-memaccess]
  750 |   std::memset(e, 0, sizeof(TEdge));
      |                                  ^
clipper.cpp:95:8: note: ‘struct ClipperLib::TEdge’ declared here
   95 | struct TEdge {
      |        ^~~~~
warning: doc_cache_create: unusable help text found in file 'clipper'
warning: called from
    doc_cache_create>handle_function at line 98 column 5
    doc_cache_create>create_cache at line 118 column 36
    gen_doc_cache_in_dir>@<anonymous> at line 150 column 16
    doc_cache_create>gen_doc_cache_in_dir at line 151 column 9
    doc_cache_create at line 62 column 12
    install>generate_lookfor_cache at line 840 column 5
    install at line 241 column 7
    pkg at line 570 column 9

For information about changes from previous versions of the geometry package, run 'news geometry'.

Juan Pablo Carbajal <juanpi>
Project MemberIn charge of this item.
Wed 07 Jul 2021 09:23:52 PM UTC, comment #1: 

I applied the patch into the default branch change set 04965cda30b5

https://sourceforge.net/p/octave/geometry/ci/04965cda30b5f9e51774194c67879e7336df1710/

Juan Pablo Carbajal <juanpi>
Project MemberIn charge of this item.
Tue 06 Jul 2021 08:38:43 AM UTC, original submission:  

Compilation of the geometry package against g++ 11 fails with the following error messages:

mkoctfile -c martinez.cpp -o martinez.o
In file included from /usr/include/c++/11/set:60,
                 from martinez.h:19,
                 from martinez.cpp:9:
/usr/include/c++/11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = Martinez::SweepEvent*; _Val = Martinez::SweepEvent*; _KeyOfValue = std::_Identity<Martinez::SweepEvent*>; _Compare = Martinez::SegmentComp; _Alloc = std::allocator<Martinez::SweepEvent*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<Martinez::SweepEvent*>*]’:
/usr/include/c++/11/bits/stl_tree.h:2069:47:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = Martinez::SweepEvent*; _Val = Martinez::SweepEvent*; _KeyOfValue = std::_Identity<Martinez::SweepEvent*>; _Compare = Martinez::SegmentComp; _Alloc = std::allocator<Martinez::SweepEvent*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = Martinez::SweepEvent*]’
/usr/include/c++/11/bits/stl_tree.h:2122:4:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = Martinez::SweepEvent* const&; _Key = Martinez::SweepEvent*; _Val = Martinez::SweepEvent*; _KeyOfValue = std::_Identity<Martinez::SweepEvent*>; _Compare = Martinez::SegmentComp; _Alloc = std::allocator<Martinez::SweepEvent*>]’
/usr/include/c++/11/bits/stl_set.h:512:25:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Martinez::SweepEvent*; _Compare = Martinez::SegmentComp; _Alloc = std::allocator<Martinez::SweepEvent*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Martinez::SweepEvent*, Martinez::SweepEvent*, std::_Identity<Martinez::SweepEvent*>, Martinez::SegmentComp, std::allocator<Martinez::SweepEvent*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<Martinez::SweepEvent*>; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<Martinez::SweepEvent*>, Martinez::SweepEvent*>::rebind<Martinez::SweepEvent*>; typename _Allocator::value_type = Martinez::SweepEvent*; std::set<_Key, _Compare, _Alloc>::value_type = Martinez::SweepEvent*]’
martinez.cpp:137:27:   required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const Martinez::SegmentComp&, Martinez::SweepEvent* const&, Martinez::SweepEvent* const&>’ evaluates to false
make: *** [Makefile:15: martinez.o] Error 1
mkoctfile -c polygon.cpp -o polygon.o
In file included from /usr/include/c++/11/set:60,
                 from polygon.cpp:12:
/usr/include/c++/11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = {anonymous}::SweepEvent*; _Val = {anonymous}::SweepEvent*; _KeyOfValue = std::_Identity<{anonymous}::SweepEvent*>; _Compare = {anonymous}::SegmentComp; _Alloc = std::allocator<{anonymous}::SweepEvent*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<{anonymous}::SweepEvent*>*]’:
/usr/include/c++/11/bits/stl_tree.h:2069:47:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = {anonymous}::SweepEvent*; _Val = {anonymous}::SweepEvent*; _KeyOfValue = std::_Identity<{anonymous}::SweepEvent*>; _Compare = {anonymous}::SegmentComp; _Alloc = std::allocator<{anonymous}::SweepEvent*>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = {anonymous}::SweepEvent*]’
/usr/include/c++/11/bits/stl_tree.h:2122:4:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = {anonymous}::SweepEvent* const&; _Key = {anonymous}::SweepEvent*; _Val = {anonymous}::SweepEvent*; _KeyOfValue = std::_Identity<{anonymous}::SweepEvent*>; _Compare = {anonymous}::SegmentComp; _Alloc = std::allocator<{anonymous}::SweepEvent*>]’
/usr/include/c++/11/bits/stl_set.h:512:25:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = {anonymous}::SweepEvent*; _Compare = {anonymous}::SegmentComp; _Alloc = std::allocator<{anonymous}::SweepEvent*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<{anonymous}::SweepEvent*, {anonymous}::SweepEvent*, std::_Identity<{anonymous}::SweepEvent*>, {anonymous}::SegmentComp, std::allocator<{anonymous}::SweepEvent*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<{anonymous}::SweepEvent*>; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<{anonymous}::SweepEvent*>, {anonymous}::SweepEvent*>::rebind<{anonymous}::SweepEvent*>; typename _Allocator::value_type = {anonymous}::SweepEvent*; std::set<_Key, _Compare, _Alloc>::value_type = {anonymous}::SweepEvent*]’
polygon.cpp:208:22:   required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const {anonymous}::SegmentComp&, {anonymous}::SweepEvent* const&, {anonymous}::SweepEvent* const&>’ evaluates to false
make: *** [Makefile:15: polygon.o] Error 1

The patch attached to this bug report fixes the issues.

Rafael Laboissiere <rlaboiss>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by rlaboiss (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-07 juanpi StatusNone => Ready For Test
        Assigned toNone => juanpi
    2021-07-06 rlaboiss Attached File- => Added compile-with-g++-v11.patch, #51651

    Back to the top


    Powered by Savane 3.6