Trying to build on OS X Maverics 10.9.2 Xcode 5.1 - Undefined symbols for architecture x86_64

Hi

Im trying to build GnuRadio on OS X 10.9.2 Im assuming the "Undefined
symbols for architecture x86_64 is related to some mismatch in
libraries. Could somebody please offer some suggestions on how to debug
the issue. The last few lines of the build are:

[ 13%] Building CXX object
gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/qa_runtime.cc.o
Linking CXX shared library libtest-gnuradio-runtime.dylib
Undefined symbols for architecture x86_64:
“CppUnit::SourceLine::SourceLine(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&, int)”,
referenced from:
qa_fxpt::t0() in qa_fxpt.cc.o
qa_fxpt::t1() in qa_fxpt.cc.o
qa_fxpt::t2() in qa_fxpt.cc.o
qa_fxpt::t3() in qa_fxpt.cc.o
qa_fxpt_nco::t0() in qa_fxpt_nco.cc.o
qa_fxpt_nco::t1() in qa_fxpt_nco.cc.o
qa_fxpt_vco::t0() in qa_fxpt_vco.cc.o

“CppUnit::AdditionalMessage::AdditionalMessage(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&)”,
referenced from:
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_buffer.cc.o
void CppUnit::assertEquals(long const&, long const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_buffer.cc.o
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_io_signature.cc.o
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_circular_file.cc.o
void CppUnit::assertEquals(bool const&, bool const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_vmcircbuf.cc.o
“CppUnit::assertDoubleEquals(double, double, double,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&)”,
referenced from:
qa_fxpt::t0() in qa_fxpt.cc.o
qa_fxpt::t1() in qa_fxpt.cc.o
qa_fxpt::t2() in qa_fxpt.cc.o
qa_fxpt::t3() in qa_fxpt.cc.o
qa_fxpt_nco::t0() in qa_fxpt_nco.cc.o
qa_fxpt_nco::t1() in qa_fxpt_nco.cc.o
qa_fxpt_vco::t0() in qa_fxpt_vco.cc.o

“CppUnit::Message::Message(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&)”, referenced from:
qa_fast_atan2f::t2() in qa_fast_atan2f.cc.o
t0_body() in qa_buffer.cc.o
t1_body() in qa_buffer.cc.o
t3_body() in qa_buffer.cc.o
qa_logger::t1() in qa_logger.cc.o
CppUnit::ExceptionTestCaseDecoratorstd::invalid_argument::runTest()
in qa_runtime.cc.o
“CppUnit::Asserter::failNotEqual(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator >,
std::__1::basic_string<char, std::__1::char_traits,
std::__1::allocator >, CppUnit::SourceLine const&,
CppUnit::AdditionalMessage const&, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator >)”, referenced
from:
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_buffer.cc.o
void CppUnit::assertEquals(long const&, long const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_buffer.cc.o
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_io_signature.cc.o
void CppUnit::assertEquals(int const&, int const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_circular_file.cc.o
void CppUnit::assertEquals(bool const&, bool const&,
CppUnit::SourceLine, std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) in
qa_vmcircbuf.cc.o
“CppUnit::TestCase::TestCase(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&)”,
referenced from:
qa_fast_atan2f::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_sincos::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_vmcircbuf::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_math::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&) in
qa_runtime.cc.o
qa_logger::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_fxpt_vco::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_fxpt_nco::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o

“CppUnit::TestSuite::TestSuite(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator >)”, referenced
from:
qa_runtime::suite() in qa_runtime.cc.o
qa_buffer::suite() in qa_runtime.cc.o
qa_io_signature::suite() in qa_runtime.cc.o
qa_circular_file::suite() in qa_runtime.cc.o
qa_fxpt::suite() in qa_runtime.cc.o
qa_fxpt_nco::suite() in qa_runtime.cc.o
qa_fxpt_vco::suite() in qa_runtime.cc.o

“CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) const”,
referenced from:
qa_fast_atan2f::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_sincos::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_vmcircbuf::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_math::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&) in
qa_runtime.cc.o
qa_logger::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_fxpt_vco::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o
qa_fxpt_nco::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&)
in qa_runtime.cc.o

“CppUnit::Test::findTestPath(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&,
CppUnit::TestPath&) const”, referenced from:
vtable for CppUnit::TestCaller<qa_fast_atan2f> in qa_runtime.cc.o
vtable for qa_fast_atan2f in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_sincos> in qa_runtime.cc.o
vtable for qa_sincos in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_vmcircbuf> in qa_runtime.cc.o
vtable for qa_vmcircbuf in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_math> in qa_runtime.cc.o

“CppUnit::Test::resolveTestPath(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) const”,
referenced from:
vtable for CppUnit::TestCaller<qa_fast_atan2f> in qa_runtime.cc.o
vtable for qa_fast_atan2f in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_sincos> in qa_runtime.cc.o
vtable for qa_sincos in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_vmcircbuf> in qa_runtime.cc.o
vtable for qa_vmcircbuf in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_math> in qa_runtime.cc.o

“CppUnit::Test::findTest(std::__1::basic_string<char,
std::__1::char_traits, std::__1::allocator > const&) const”,
referenced from:
vtable for CppUnit::TestCaller<qa_fast_atan2f> in qa_runtime.cc.o
vtable for qa_fast_atan2f in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_sincos> in qa_runtime.cc.o
vtable for qa_sincos in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_vmcircbuf> in qa_runtime.cc.o
vtable for qa_vmcircbuf in qa_runtime.cc.o
vtable for CppUnit::TestCaller<qa_math> in qa_runtime.cc.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]: *** [gnuradio-runtime/lib/libtest-gnuradio-runtime.dylib] Error
1
make[1]: ***
[gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all] Error 2
make: *** [all] Error 2

Hi Shane - With just the information provided, given that CMake is
trying to link against CppUnit means that that library was found
somewhere. Hence, chances are that CppUnit is being linked to libstdc++
while GNU Radio is trying to use libc++ – the different C++ runtime
libraries tend to generate these sorts of errors. There is a small
chance that CppUnit was compiled for the wrong architecture (e.g.,
x86_32 [i386], PPC, or PPC_64), but I think the different C++ runtime
library is more likely. If you want more help on this, email me
off-list and we can summarize once we figure out the actual issue(s). -
MLD