Summary: | Build of science/trilinos fails on 14 CURRENT: hidden symbol _ZNSt3__1rsB7v160006IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_istreamIT_T0_EES9_RNS_12basic_stringIS6_S7_T1_EE isn't defined | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Yuri Victorovich <yuri> | ||||
Component: | bin | Assignee: | freebsd-toolchain (Nobody) <toolchain> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | dim, marklmi26-fbsd, pjfloyd | ||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Yuri Victorovich
![]() ![]() c++filt _ZNSt3__1rsB7v160006IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_istreamIT_T0_EES9_RNS_12basic_stringIS6_S7_T1_EE std::__1::basic_istream<char, std::__1::char_traits<char> >& std::__1::operator>>[abi:v160006]<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) basic_istream operator>> on a char (In reply to Paul Floyd from comment #1) Just trying to make the overall structure more readable: std::__1::basic_istream<char, OMITTED>& std::__1::operator>>[abi:v160006]<char, OMITTED> ( std::__1::basic_istream<char, OMITTED>& , std::__1::basic_string<char, OMITTED>& ) Looks like operator>> from a basic_istream of char to a basic_string of char. Created attachment 244488 [details]
Fix link error by including <iostream>
This should fix the linker error.
(In reply to Dimitry Andric from comment #3) FWIW, the problem here was that packages/stk/stk_util/stk_util/util/ci_string.hpp declares a bunch of operators on std::istream and std::ostream, and to be able to do that, it includes <iosfwd>, which is a "light-weight" version of <iostream>, that only contains forward declarations. However, once you get to packages/stk/stk_util/stk_util/util/ci_string.cpp, and you want to _implement_ those operators on std::istream and std::ostream, you actually need the full definitions of the iostream stuff. Hence, you heed to include <iostream> there. I noticed that meanwhile, upstream seems to have fixed this as a byproduct of a huge commit named "STK: Snapshot 05-02-23 13:00 from Sierra 5.13.3-416-g059a4983". That adds separate includes of <ostream> and <istream> instead, which is weird and superfluous, but should also work. You might consider importing a more recent version of Trilinos, which should have this fix already. If that is tricky to do, you can apply the temporary patch I provided here. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1b71aafbb82caa1ffe653a5b128e35d55469587e commit 1b71aafbb82caa1ffe653a5b128e35d55469587e Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-08-30 20:00:53 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-10-06 18:09:12 +0000 science/trilinos: add missing <iostream> include This fixes "hidden symbol _ZNSt3__1rsB7v160006IcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_13basic_istreamIT_T0_EES9_RNS_12basic_stringIS6_S7_T1_EE isn't defined" errors on recent -CURRENT. PR: 273339 Approved by: maintainer timeout (2 weeks) MFH: 2023Q4 ...-packages_stk_stk__util_stk__util_util_ci__string.cpp (new) | 10 ++++++++++ 1 file changed, 10 insertions(+) |