Bug 279877 - graphics/oidn fails to build with "error: implicit instantiation of undefined template 'std::hash<oidn::DeviceType>'"
Summary: graphics/oidn fails to build with "error: implicit instantiation of undefined...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/RenderKit/oidn/iss...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 13:57 UTC by ddrinnon
Modified: 2024-06-25 06:09 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
file to place in graphics/oidn/files (363 bytes, text/plain)
2024-06-24 09:16 UTC, Tatsuki Makino
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ddrinnon 2024-06-20 13:57:03 UTC
FreeBSD_13-2x64 amd64 Poudriere
...
[ 50%] Building CXX object core/CMakeFiles/OpenImageDenoise_core.dir/context.cpp.o
cd /wrkdirs/usr/ports/graphics/oidn/work/.build/core && /usr/local/libexec/ccache/c++ -DOIDN_LIBRARY_NAME=\"OpenImageDenoise\" -DOpenImageDenoise_core_EXPORTS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0 -I/wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/external -I/wrkdirs/usr/ports/graphics/oidn/work/.build -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -Wall -Wno-unknown-pragmas -Wno-pass-failed -Wno-unneeded-internal-declaration -fPIC -Wformat -Wformat-security  -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG  -fstack-protector -D_FORTIFY_SOURCE=2 -std=c++11 -fPIC -pthread -MD -MT core/CMakeFiles/OpenImageDenoise_core.dir/context.cpp.o -MF CMakeFiles/OpenImageDenoise_core.dir/context.cpp.o.d -o CMakeFiles/OpenImageDenoise_core.dir/context.cpp.o -c /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/core/context.cpp
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/core/context.cpp:4:
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/core/context.h:6:
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/core/module.h:6:
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/common/common.h:6:
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/common/oidn_utils.h:6:
In file included from /wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/include/OpenImageDenoise/oidn.hpp:10:
In file included from /usr/include/c++/v1/algorithm:664:
In file included from /usr/include/c++/v1/__debug:15:
/usr/include/c++/v1/type_traits:1773:38: error: implicit instantiation of undefined template 'std::hash<oidn::DeviceType>'
    : public integral_constant<bool, __is_empty(_Tp)> {};
                                     ^
/usr/include/c++/v1/__memory/compressed_pair.h:31:15: note: in instantiation of template class 'std::is_empty<std::hash<oidn::DeviceType>>' requested here
              is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
              ^
/usr/include/c++/v1/__memory/compressed_pair.h:104:35: note: in instantiation of default argument for '__compressed_pair_elem<std::hash<oidn::DeviceType>, 1>' required here
                          private __compressed_pair_elem<_T2, 1> {
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__hash_table:953:59: note: in instantiation of template class 'std::__compressed_pair<unsigned long, std::hash<oidn::DeviceType>>' requested here
    __compressed_pair<size_type, hasher>                  __p2_;
                                                          ^
/usr/include/c++/v1/unordered_set:502:13: note: in instantiation of template class 'std::__hash_table<oidn::DeviceType, std::hash<oidn::DeviceType>, std::equal_to<oidn::DeviceType>, std::allocator<oidn::DeviceType>>' requested here
    __table __table_;
            ^
/wrkdirs/usr/ports/graphics/oidn/work/oidn-2.3.0/core/context.h:119:36: note: in instantiation of template class 'std::unordered_set<oidn::DeviceType>' requested here
    std::unordered_set<DeviceType> initedDeviceTypes;
                                   ^
/usr/include/c++/v1/__memory/shared_ptr.h:1552:50: note: template is declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
                                                 ^
1 error generated.
*** Error code 1

Stop.
...
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-06-20 17:11:42 UTC
(In reply to ddrinnon from comment #0)

Hi ddrinnon,


Thank you for the report.
This appears to be a missing include statement problem.

Do you mind to report the same problem to the upstream here: https://github.com/RenderKit/oidn/issues


Thank you,
Yuri
Comment 2 ddrinnon 2024-06-20 17:23:01 UTC
Hi Yuri,

I have reported the bug to upstream here:
https://github.com/RenderKit/oidn/issues/225

Dan
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2024-06-20 17:24:37 UTC
(In reply to ddrinnon from comment #2)

Thank you.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2024-06-20 17:33:35 UTC
We will see if the upstream would fix it w/in 1-2 days.
Otherwise we would add the patch ourselves.
Comment 5 Tatsuki Makino 2024-06-24 09:16:25 UTC
Created attachment 251664 [details]
file to place in graphics/oidn/files

(In reply to Yuri Victorovich from comment #4)

Thank you very much for ca_root_nss matter.
And this can be fixed with just this attachment.
Comment 6 Tatsuki Makino 2024-06-25 06:09:49 UTC
This may have already been investigated, but this problem does not occur when using the following versions of /usr/include headers.

14.0-RELEASE
13.3-RELEASE

This means that the version of FreeBSD that causes this problem is no longer supported.