Project

General

Profile

Bug #4182

Unable to build the current ndn-cxx on macOS 10.12

Added by Luca Keidel about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/12/2017
Due date:
% Done:

0%

Estimated time:

Description

Hello everybody,

I am trying to build the current master branch of ndn-cxx on my Mac, but unfortunately the build fails during the linking phase. I am running the latest macOS 10.12.5 with the following compiler:

$ clang++ -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

This is the output from waf configure,

Setting top to                           : /Users/luca/tmp/ndn-cxx
Setting out to                           : /Users/luca/tmp/ndn-cxx/build
Building static library                  : no
Building shared library                  : yes
Checking for 'clang++' (C++ compiler)    : /usr/bin/clang++
Checking supported CXXFLAGS              : -std=c++11 -stdlib=libc++
Checking supported LINKFLAGS             : -stdlib=libc++
Checking supported CXXFLAGS              : -O2 -g -pedantic -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -fcolor-diagnostics -Wno-unused-local-typedef
Checking supported LINKFLAGS             :
Checking for std::to_string              : yes
Checking for std::vector::insert with const_iterator : yes
Checking for std::is_default_constructible           : yes
Checking for std::is_nothrow_move_constructible      : yes
Checking for std::is_nothrow_move_assignable         : yes
Checking for program 'doxygen'                       : /usr/local/bin/doxygen
Checking for program 'tar'                           : /usr/bin/tar
Checking for program 'sphinx-build'                  : /usr/local/bin/sphinx-build
Checking for program 'sh'                            : /bin/sh
Checking for library pthread                         : yes
Checking for library rt                              : not found
Checking for function getpass                        : yes
Checking for rtnetlink                               : not found
Checking for framework CoreFoundation                : yes
Checking for framework CoreServices                  : yes
Checking for framework Security                      : yes
Checking for framework SystemConfiguration           : yes
Checking for framework Foundation                    : yes
Checking for framework CoreWLAN                      : yes
Checking for program 'pkg-config'                    : /opt/local/bin/pkg-config
Checking for 'sqlite3'                               : yes
Checking Crypto++ lib                                : 5.6.5
Checking if CryptoPP library works                   : yes
Checking for OpenSSL lib                             : "OpenSSL 1.0.2l-fips  25 May 2017"
Checking if OpenSSL library works                    : yes
Checking boost includes                              : 1.64.0
Checking boost libs                                  : ok
Checking the flags needed to use pthreads            :
Checking for boost linkage                           : ok
'configure' finished successfully (9.708s)

and this is the step where the build presumably fails:

[205/207] Linking build/libndn-cxx.dylib
Undefined symbols for architecture x86_64:
  "boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::locale const&)", referenced from:
      boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >& boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::formatted_write<wchar_t>(wchar_t const*, long) in logging.cpp.3.o
      void boost::log::v2_mt_posix::basic_formatting_ostream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::aligned_write<wchar_t>(wchar_t const*, long) in logging.cpp.3.o
  "boost::re_detail::get_mem_block()", referenced from:
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_all_states() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_startmark() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_alt() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_rep() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_char_repeat() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_set_repeat() in interest-filter.cpp.3.o
      ...
  "boost::re_detail::put_mem_block(void*)", referenced from:
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in face-uri.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in face-uri.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in regex-top-matcher.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool) in regex-top-matcher.cpp.3.o
  "boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)", referenced from:
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in interest-filter.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in face-uri.cpp.3.o
      boost::re_detail::perl_matcher<std::__1::__wrap_iter<char const*>, std::__1::allocator<boost::sub_match<std::__1::__wrap_iter<char const*> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp() in regex-top-matcher.cpp.3.o
  "boost::re_detail::raise_runtime_error(std::runtime_error const&)", referenced from:
      void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in interest-filter.cpp.3.o
      void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in face-uri.cpp.3.o
      void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type) in regex-top-matcher.cpp.3.o
  "boost::re_detail::get_default_error_string(boost::regex_constants::error_type)", referenced from:
      boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in interest-filter.cpp.3.o
      boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in face-uri.cpp.3.o
      boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const in regex-top-matcher.cpp.3.o
  "boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const", referenced from:
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in interest-filter.cpp.3.o
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in face-uri.cpp.3.o
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in regex-top-matcher.cpp.3.o
  "boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const", referenced from:
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in interest-filter.cpp.3.o
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in face-uri.cpp.3.o
      std::__1::__wrap_iter<char const*> boost::re_detail::re_is_set_member<std::__1::__wrap_iter<char const*>, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(std::__1::__wrap_iter<char const*>, std::__1::__wrap_iter<char const*>, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool) in regex-top-matcher.cpp.3.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

For the sake of completeness, I have also attached the whole output from the waf command. The ndn-cxx v.0.5.1 release builds just fine for me, so I assume it has something to do with changes made after the last release.

Do you have an idea what I am doing wrong or what I'm missing? Thanks in advance!


Files

waf.out (149 KB) waf.out Luca Keidel, 07/12/2017 04:45 AM
#1

Updated by Alex Afanasyev about 4 years ago

This looks like you may have multiple versions of boost libraries or you recently upgraded (some of) homebrew ports. If you have multiple versions (may be somewhere from macports?), then you definitely need to remove that. For upgraded ports, you may need to do a complete cleanup of the build environment (./waf distclean).

#2

Updated by Luca Keidel about 4 years ago

Yes, thank you! Apparently I had some old boost libraries from macports around. After removing them and a ./waf distclean the build works fine.

Thanks again for your fast reply, I guess this issue can be closed now :)

#3

Updated by Alex Afanasyev about 4 years ago

  • Status changed from New to Closed

Also available in: Atom PDF