Build linker for nupic.core on macOS Sierra 10.12.1 failure


#1

Is this a known problem?
Gary Kerbel

[ 96%] Linking CXX executable unit_tests
Undefined symbols for architecture x86_64:
"_apr_app_initialize", referenced from:
_main in UnitTestMain.cpp.o
"_apr_base64_decode_binary", referenced from:
nupic::StringUtils::base64Decode(void const*, unsigned long) in libnupic_core.a(StringUtils.cpp.o)
nupic::StringUtils::base64Decode(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(StringUtils.cpp.o)
"_apr_base64_encode", referenced from:
nupic::StringUtils::base64Encode(void const*, unsigned long) in libnupic_core.a(StringUtils.cpp.o)
nupic::StringUtils::base64Encode(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(StringUtils.cpp.o)
"_apr_base64_encode_len", referenced from:
nupic::StringUtils::base64Encode(void const*, unsigned long) in libnupic_core.a(StringUtils.cpp.o)
nupic::StringUtils::base64Encode(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(StringUtils.cpp.o)
"_apr_dir_close", referenced from:
nupic::Directory::Iterator::~Iterator() in libnupic_core.a(Directory.cpp.o)
"_apr_dir_open", referenced from:
nupic::Directory::Iterator::init(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Directory.cpp.o)
"_apr_dir_read", referenced from:
nupic::Directory::Iterator::next(nupic::Directory::Entry&) in libnupic_core.a(Directory.cpp.o)
"_apr_dir_rewind", referenced from:
nupic::Directory::Iterator::reset() in libnupic_core.a(Directory.cpp.o)
"_apr_env_delete", referenced from:
nupic::Env::unset(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
"_apr_env_get", referenced from:
nupic::Env::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&) in libnupic_core.a(Env.cpp.o)
"_apr_env_set", referenced from:
nupic::Env::set(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
"_apr_file_remove", referenced from:
nupic::Directory::removeTree(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool) in libnupic_core.a(Directory.cpp.o)
"_apr_initialize", referenced from:
nupic::Env::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&) in libnupic_core.a(Env.cpp.o)
nupic::Env::set(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::Env::unset(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::NuPIC::init() in libnupic_core.a(NuPIC.cpp.o)
"_apr_pool_create_ex", referenced from:
nupic::Env::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&) in libnupic_core.a(Env.cpp.o)
nupic::Env::set(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::Env::unset(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::Directory::Iterator::init(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Directory.cpp.o)
"_apr_pool_destroy", referenced from:
nupic::Env::get(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >&) in libnupic_core.a(Env.cpp.o)
nupic::Env::set(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::Env::unset(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in libnupic_core.a(Env.cpp.o)
nupic::Directory::Iterator::~Iterator() in libnupic_core.a(Directory.cpp.o)
"_apr_sleep", referenced from:
TimerTest_Basic_Test::TestBody() in TimerTest.cpp.o
nupic::Directory::removeTree(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool) in libnupic_core.a(Directory.cpp.o)
"_apr_stat", referenced from:
nupic::getInfo(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, apr_finfo_t&) in libnupic_core.a(Path.cpp.o)
"_apr_strerror", referenced from:
nupic::OS::getErrorMessage() in libnupic_core.a(OSUnix.cpp.o)
"_gzclose", referenced from:
nupic::VectorFile::appendFloat32File(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, unsigned long, bool) in libnupic_core.a(VectorFile.cpp.o)
nupic::VectorFile::appendIDXFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, bool) in libnupic_core.a(VectorFile.cpp.o)
"_gzopen", referenced from:
nupic::ZLib::fopen(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >*) in libnupic_core.a(FStream.cpp.o)
"_gzread", referenced from:
nupic::VectorFile::appendFloat32File(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, unsigned long, bool) in libnupic_core.a(VectorFile.cpp.o)
nupic::VectorFile::appendIDXFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, bool) in libnupic_core.a(VectorFile.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/unit_tests] Error 1
make[1]: *** [src/CMakeFiles/unit_tests.dir/all] Error 2


#2

This a know bug. It is due to XCode 8 AFAIK.
See https://github.com/numenta/nupic.core/issues/1095


#3

Thanks,

Gary Kerbel