Bug 216177

Summary: net-im/ring-daemon: fails to build with libc++ 4.0 (2 ports skipped)
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: eric, yuri
Priority: --- Keywords: needs-patch
Version: LatestFlags: yuri: maintainer-feedback+
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 216008    

Description Jan Beich freebsd_committer 2017-01-17 11:47:17 UTC
sipaccount.cpp:1589:16: error: use of overloaded operator '=' is ambiguous (with operand types 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') and 'void')
    password_h = {hash, 32};
    ~~~~~~~~~~ ^ ~~~~~~~~~~
/usr/include/c++/v1/string:820:19: note: candidate function
    basic_string& operator=(const basic_string& __str);
                  ^
/usr/include/c++/v1/string:822:19: note: candidate function
    basic_string& operator=(__self_view __sv)  {return assign(__sv);}
                  ^
/usr/include/c++/v1/string:825:19: note: candidate function
    basic_string& operator=(basic_string&& __str)
                  ^
sipaccount.cpp:1653:21: error: use of overloaded operator '=' is ambiguous (with operand types 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') and 'void')
        details_str = {description->ptr, (size_t)description->slen};
        ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/string:820:19: note: candidate function
    basic_string& operator=(const basic_string& __str);
                  ^
/usr/include/c++/v1/string:822:19: note: candidate function
    basic_string& operator=(__self_view __sv)  {return assign(__sv);}
                  ^
/usr/include/c++/v1/string:825:19: note: candidate function
    basic_string& operator=(basic_string&& __str)
                  ^

build log: http://sprunge.us/GGZf
regressed by: https://github.com/llvm-mirror/libcxx/commit/1e00d6db319a
Comment 1 Eric Fiselier 2017-01-17 12:05:28 UTC
This is libc++'s fault, since we shouldn't expose `string_view` before C++17. However due to the fundamental dependencies between `string` and `string_view`  we explicitly chose to enable it in all dialects.
Comment 2 Yuri Victorovich freebsd_committer 2017-01-17 21:44:48 UTC
If possible, could you please add a patch to make it build?

Otherwise, Ring ports are currently broken due to the upstream version mismatch that needs to be sorted out. (Upstream released some parts depending on unreleased versions of other parts.)
Comment 3 Eric Fiselier 2017-01-17 22:10:14 UTC
Yes. I think I can fix this in libc++. I will work on a patch today and then merge it into 4.0.