Project

General

Profile

Bug #4860

Build fails with Xcode 10.2

Added by Davide Pesavento 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Xcode 10.2 apparently ships a new version of libc++ which "removed" the header <experimental/string_view>.

ndn-cxx build error below, but the root problem is in Boost.Asio, so I suspect pretty much everything else will fail in the same way.

In file included from ../ndn-cxx/net/network-monitor.cpp:25:
In file included from ../ndn-cxx/net/network-monitor.hpp:29:
In file included from ../ndn-cxx/net/network-interface.hpp:28:
In file included from ../ndn-cxx/net/network-address.hpp:29:
In file included from /usr/local/include/boost/asio/ip/address.hpp:21:
In file included from /usr/local/include/boost/asio/detail/string_view.hpp:25:
/Applications/Xcode-10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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 ../ndn-cxx/net/network-monitor.cpp:25:
In file included from ../ndn-cxx/net/network-monitor.hpp:29:
In file included from ../ndn-cxx/net/network-interface.hpp:28:
In file included from ../ndn-cxx/net/network-address.hpp:29:
In file included from /usr/local/include/boost/asio/ip/address.hpp:21:
/usr/local/include/boost/asio/detail/string_view.hpp:37:7: error: no member named 'basic_string_view' in namespace 'std::experimental'; did you mean 'std::basic_string_view'?
using std::experimental::basic_string_view;
      ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode-10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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 ../ndn-cxx/net/network-monitor.cpp:25:
In file included from ../ndn-cxx/net/network-monitor.hpp:29:
In file included from ../ndn-cxx/net/network-interface.hpp:28:
In file included from ../ndn-cxx/net/network-address.hpp:29:
In file included from /usr/local/include/boost/asio/ip/address.hpp:21:
/usr/local/include/boost/asio/detail/string_view.hpp:38:7: error: no member named 'string_view' in namespace 'std::experimental'; did you mean 'std::string_view'?
using std::experimental::string_view;
      ^~~~~~~~~~~~~~~~~~~
/Applications/Xcode-10.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:770:37: note: 'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
3 errors generated.

History

#1

Updated by Davide Pesavento 10 months ago

  • Project changed from NFD to ndn-cxx
  • Description updated (diff)
  • Category changed from Build to Build
  • Target version changed from v0.7 to v0.7
#2

Updated by Davide Pesavento 10 months ago

We can disable <experimental/string_view> auto-detection by defining BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW.

#3

Updated by Davide Pesavento 10 months ago

Boost 1.69.0 contains a fix for this issue, but that version is not available yet on Homebrew.

#4

Updated by Davide Pesavento 10 months ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 90
#5

Updated by Junxiao Shi 10 months ago

This looks like a Boost bug. Why not send a pull request to Hombrew instead of a round of needless fixes in ndn-cxx?

If you need Boost 1.69 from Homebrew now, install it using ‘boost --HEAD’.

#7

Updated by Davide Pesavento 9 months ago

  • Status changed from Code review to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF