Project

General

Profile

Actions

Bug #4860

closed

Build fails with Xcode 10.2

Added by Davide Pesavento almost 6 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Tags:

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.
Actions #1

Updated by Davide Pesavento almost 6 years 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
Actions #2

Updated by Davide Pesavento almost 6 years ago

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

Actions #3

Updated by Davide Pesavento almost 6 years ago

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

Actions #4

Updated by Davide Pesavento almost 6 years ago

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

Updated by Junxiao Shi almost 6 years 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’.

Actions #7

Updated by Davide Pesavento almost 6 years ago

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

Updated by Davide Pesavento over 4 years ago

  • Tags set to macOS
Actions

Also available in: Atom PDF