cdcseacave/openMVS

2.3.0 is broken because the removed C++ feature std::shared_ptr::unique() used with C++20 where it was removed

yurivict opened this issue · 0 comments

Describe the bug
Build fails:

In file included from <built-in>:1:
In file included from /usr/ports/graphics/openmvs/work/.build/libs/MVS/CMakeFiles/MVS.dir/cmake_pch.hxx:5:
In file included from /usr/ports/graphics/openmvs/work/openMVS-2.3.0/libs/MVS/Common.h:42:
In file included from /usr/ports/graphics/openmvs/work/openMVS-2.3.0/libs/MVS/../Common/Common.h:176:
In file included from /usr/ports/graphics/openmvs/work/openMVS-2.3.0/libs/MVS/../Common/Types.h:76:
/usr/ports/graphics/openmvs/work/openMVS-2.3.0/libs/MVS/../Common/FastDelegateCPP11.h:155:61: error: no member named 'unique' in 'std::shared_ptr<void>'
  155 |         if ((sizeof(functor_type) > store_size_) || !store_.unique())
      |                                                      ~~~~~~ ^
1 error generated.

Please see the docs here showing that the unique() function is removed.

There is a similar issue #1075, but you somehow still keep producing releases where removed features are used.

You probably use gcc which isn't 100% C++ compliant and doesn't check for removed features.

You need to build with Clang which does find removed features usage.

Desktop (please complete the following information):

  • OS: FreeBSD
  • Version 2.3.0