Bug 230401 - devel/boost-libs: fails to build with libc++ 7
Summary: devel/boost-libs: fails to build with libc++ 7
Status: Closed DUPLICATE of bug 229569
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Office Team
URL:
Keywords: needs-qa
Depends on:
Blocks: 230355
  Show dependency treegraph
 
Reported: 2018-08-06 00:42 UTC by Jan Beich
Modified: 2018-08-14 19:44 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2018-08-06 00:42:03 UTC
$ c++ -v
FreeBSD clang version 7.0.0 (branches/release_70 338892) (based on LLVM 7.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

$ make
[...]
In file included from libs/log/src/syslog_backend.cpp:29:
In file included from ./boost/asio/buffer.hpp:27:
In file included from ./boost/asio/detail/string_view.hpp:25:
/usr/include/c++/v1/experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."
#error "<experimental/string_view> has been removed. Use <string_view> instead."
 ^
In file included from libs/log/src/syslog_backend.cpp:29:
In file included from ./boost/asio/buffer.hpp:27:
./boost/asio/detail/string_view.hpp:37:12: error: no member named 'experimental' in namespace 'std'
using std::experimental::basic_string_view;
      ~~~~~^
./boost/asio/detail/string_view.hpp:38:12: error: no member named 'experimental' in namespace 'std'
using std::experimental::string_view;
      ~~~~~^
In file included from libs/log/src/syslog_backend.cpp:29:
./boost/asio/buffer.hpp:1489:5: error: no template named 'basic_string_view'; did you mean 'std::basic_string_view'?
    basic_string_view<Elem, Traits> data) BOOST_ASIO_NOEXCEPT
    ^~~~~~~~~~~~~~~~~
    std::basic_string_view
/usr/include/c++/v1/string_view:194:28: note: 'std::basic_string_view' declared here
class _LIBCPP_TEMPLATE_VIS basic_string_view {
                           ^
In file included from libs/log/src/syslog_backend.cpp:29:
./boost/asio/buffer.hpp:1510:5: error: no template named 'basic_string_view'; did you mean 'std::basic_string_view'?
    basic_string_view<Elem, Traits> data,
    ^~~~~~~~~~~~~~~~~
    std::basic_string_view
/usr/include/c++/v1/string_view:194:28: note: 'std::basic_string_view' declared here
class _LIBCPP_TEMPLATE_VIS basic_string_view {
                           ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:24:
./boost/asio/ip/address_v4.hpp:288:44: error: unknown type name 'string_view'; did you mean 'std::string_view'?
BOOST_ASIO_DECL address_v4 make_address_v4(string_view str);
                                           ^~~~~~~~~~~
                                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:24:
./boost/asio/ip/address_v4.hpp:295:5: error: unknown type name 'string_view'; did you mean 'std::string_view'?
    string_view str, boost::system::error_code& ec);
    ^~~~~~~~~~~
    std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:24:
In file included from ./boost/asio/ip/address_v4.hpp:328:
./boost/asio/ip/impl/address_v4.ipp:193:28: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address_v4 make_address_v4(string_view str)
                           ^~~~~~~~~~~
                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:24:
In file included from ./boost/asio/ip/address_v4.hpp:328:
./boost/asio/ip/impl/address_v4.ipp:198:28: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address_v4 make_address_v4(string_view str,
                           ^~~~~~~~~~~
                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:25:
./boost/asio/ip/address_v6.hpp:277:44: error: unknown type name 'string_view'; did you mean 'std::string_view'?
BOOST_ASIO_DECL address_v6 make_address_v6(string_view str);
                                           ^~~~~~~~~~~
                                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:25:
./boost/asio/ip/address_v6.hpp:284:5: error: unknown type name 'string_view'; did you mean 'std::string_view'?
    string_view str, boost::system::error_code& ec);
    ^~~~~~~~~~~
    std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:25:
In file included from ./boost/asio/ip/address_v6.hpp:335:
./boost/asio/ip/impl/address_v6.ipp:309:28: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address_v6 make_address_v6(string_view str)
                           ^~~~~~~~~~~
                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:25:
In file included from ./boost/asio/ip/address_v6.hpp:335:
./boost/asio/ip/impl/address_v6.ipp:314:28: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address_v6 make_address_v6(string_view str,
                           ^~~~~~~~~~~
                           std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
./boost/asio/ip/address.hpp:218:38: error: unknown type name 'string_view'; did you mean 'std::string_view'?
BOOST_ASIO_DECL address make_address(string_view str);
                                     ^~~~~~~~~~~
                                     std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
./boost/asio/ip/address.hpp:226:5: error: unknown type name 'string_view'; did you mean 'std::string_view'?
    string_view str, boost::system::error_code& ec);
    ^~~~~~~~~~~
    std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:259:
./boost/asio/ip/impl/address.ipp:140:22: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address make_address(string_view str)
                     ^~~~~~~~~~~
                     std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:21:
In file included from ./boost/asio/ip/basic_endpoint.hpp:19:
In file included from ./boost/asio/ip/address.hpp:259:
./boost/asio/ip/impl/address.ipp:145:22: error: unknown type name 'string_view'; did you mean 'std::string_view'?
address make_address(string_view str,
                     ^~~~~~~~~~~
                     std::string_view
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:22:
In file included from ./boost/asio/ip/basic_resolver.hpp:27:
In file included from ./boost/asio/ip/basic_resolver_iterator.hpp:27:
./boost/asio/ip/basic_resolver_entry.hpp:54:7: error: no type named 'string_view' in namespace 'boost::asio'; did you mean 'std::string_view'?
      BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      std::string_view
./boost/asio/detail/string_view.hpp:44:39: note: expanded from macro 'BOOST_ASIO_STRING_VIEW_PARAM'
# define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
                                      ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
In file included from libs/log/src/syslog_backend.cpp:32:
In file included from ./boost/asio/ip/udp.hpp:22:
In file included from ./boost/asio/ip/basic_resolver.hpp:27:
In file included from ./boost/asio/ip/basic_resolver_iterator.hpp:27:
./boost/asio/ip/basic_resolver_entry.hpp:54:42: error: no type named 'string_view' in namespace 'boost::asio'; did you mean 'std::string_view'?
      BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                         std::string_view
./boost/asio/detail/string_view.hpp:44:39: note: expanded from macro 'BOOST_ASIO_STRING_VIEW_PARAM'
# define BOOST_ASIO_STRING_VIEW_PARAM boost::asio::string_view
                                      ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

build log: https://ptpb.pw/YpvE
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-08-06 01:02:23 UTC
libc++ exposes std::basic_string_view for any -std= but libstdc++ only for C++17.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-08-07 18:03:41 UTC
databases/mongodb36 is also affected. The bundled Asio is older than in Boost 1.68. Build log: https://ptpb.pw/S4JF

In file included from src/third_party/asio-master/asio/src/asio.cpp:11:
In file included from src/third_party/asio-master/asio/include/asio/impl/src.hpp:44:
In file included from src/third_party/asio-master/asio/include/asio/detail/impl/reactive_descriptor_service.ipp:25:
In file included from src/third_party/asio-master/asio/include/asio/detail/reactive_descriptor_service.hpp:24:
In file included from src/third_party/asio-master/asio/include/asio/buffer.hpp:27:
In file included from src/third_party/asio-master/asio/include/asio/detail/string_view.hpp:23:
/usr/include/c++/v1/experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."
Comment 3 Jan Beich freebsd_committer freebsd_triage 2018-08-08 11:07:10 UTC
boost-libs-1.67.0 isn't affected because it's built in C++11 mode but <experimental/string_view> is only used for C++14.
https://github.com/boostorg/asio/blob/boost-1.67.0/include/boost/asio/detail/config.hpp#L804-L809
https://reviews.freebsd.org/differential/changeset/?ref=553225
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-08-08 11:32:06 UTC
https://reviews.freebsd.org/D16165?vs=46246&id=46406

*** This bug has been marked as a duplicate of bug 229569 ***
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-08-08 12:32:21 UTC
A commit references this bug:

Author: jbeich
Date: Wed Aug  8 12:31:40 UTC 2018
New revision: 476640
URL: https://svnweb.freebsd.org/changeset/ports/476640

Log:
  databases/mongodb36: unbreak with libc++ 7

  In file included from src/third_party/asio-master/asio/src/asio.cpp:11:
  In file included from src/third_party/asio-master/asio/include/asio/impl/src.hpp:44:
  In file included from src/third_party/asio-master/asio/include/asio/detail/impl/reactive_descriptor_service.ipp:25:
  In file included from src/third_party/asio-master/asio/include/asio/detail/reactive_descriptor_service.hpp:24:
  In file included from src/third_party/asio-master/asio/include/asio/buffer.hpp:27:
  In file included from src/third_party/asio-master/asio/include/asio/detail/string_view.hpp:23:
  /usr/include/c++/v1/experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."

  PR:		230401

Changes:
  head/databases/mongodb36/Makefile
  head/databases/mongodb36/files/patch-asio-libc++7
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-08-14 19:44:02 UTC
A commit references this bug:

Author: jbeich
Date: Tue Aug 14 19:43:20 UTC 2018
New revision: 477199
URL: https://svnweb.freebsd.org/changeset/ports/477199

Log:
  emulators/mame: unbreak with libc++ 7

  In file included from ../../../../../src/emu/http.cpp:12:
  In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
  In file included from ../../../../../src/osd/asio.h:34:
  In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:
  In file included from ../../../../../3rdparty/asio/include/asio/basic_datagram_socket.hpp:20:
  In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
  In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
  In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
  In file included from ../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:23:
  /usr/include/c++/v1/experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."

  PR:		230401
  Reported by:	antoine (via exp-run)

Changes:
  head/emulators/mame/files/patch-asio-libc++7
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-08-14 19:44:04 UTC
A commit references this bug:

Author: jbeich
Date: Tue Aug 14 19:43:40 UTC 2018
New revision: 477200
URL: https://svnweb.freebsd.org/changeset/ports/477200

Log:
  www/rubygem-passenger: unbreak with libc++ 7

  In file included from src/agent/Watchdog/WatchdogMain.cpp:68:
  In file included from src/agent/Watchdog/Config.h:32:
  In file included from src/agent/Core/Config.h:47:
  In file included from src/agent/Core/AdminPanelConnector.h:43:
  In file included from src/cxx_supportlib/WebSocketCommandReverseServer.h:29:
  In file included from src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/config/asio_no_tls_client.hpp:32:
  In file included from src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:
  In file included from src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/connection.hpp:31:
  In file included from src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/transport/asio/base.hpp:31:
  In file included from src/cxx_supportlib/vendor-copy/websocketpp/websocketpp/common/asio.hpp:65:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio.hpp:23:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio/basic_datagram_socket.hpp:20:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio/basic_socket.hpp:40:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio/detail/reactive_socket_service.hpp:22:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp:27:
  In file included from src/cxx_supportlib/vendor-modified/boost/asio/detail/string_view.hpp:25:
  /usr/include/c++/v1/experimental/string_view:11:2: error: "<experimental/string_view> has been removed. Use <string_view> instead."

  PR:		230401
  Reported by:	antoine (via exp-run)

Changes:
  head/www/rubygem-passenger/files/patch-asio-libc++7