building tests failure on OSX 10.7.5 #226

Closed
tbuser opened this Issue Dec 10, 2012 · 6 comments

Comments

Projects
None yet
3 participants

tbuser commented Dec 10, 2012

I used ./scripts/macosx-build-dependencies.sh and I am able to compile OpenSCAD. However when I try to compile the test suite I get the following:

Linking CXX executable cgalcachetest
Undefined symbols for architecture x86_64:
"boost::filesystem::path::parent_path() const", referenced from:
main in cgalcachetest.cc.o
boost::filesystem::path::has_parent_path() constin cgalcachetest.cc.o
parsefile(char const
)in libtests-core.a(tests-common.cc.o)
ModuleCache::evaluate(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(ModuleCache.cc.o)
includefile() in libtests-core.a(lexer.cpp.o)
boost::filesystem::path::has_parent_path() constin libtests-core.a(lexer.cpp.o)
"vtable for boost::program_options::error_with_option_name", referenced from:
boost::program_options::error_with_option_name::~error_with_option_name()in cgalcachetest.cc.o
boost::program_options::error_with_option_name::error_with_option_name(boost::program_options::error_with_option_name const&)in cgalcachetest.cc.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)", referenced from:
boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits, std::allocator > const&, std::basic_string<char, std::char_traits, std::allocator > const&, int)in cgalcachetest.cc.o
"boost::program_options::error_with_option_name::error_with_option_name(std::basic_string<char, std::char_traits, std::allocator > const&, std::basic_string<char, std::char_traits, std::allocator > const&, std::basic_string<char, std::char_traits, std::allocator > const&, int)", referenced from:
boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits, std::allocator > const&, std::basic_string<char, std::char_traits, std::allocator > const&, int)in cgalcachetest.cc.o
"boost::program_options::detail::cmdline::get_canonical_option_prefix()", referenced from:
boost::program_options::basic_command_line_parser::run() in cgalcachetest.cc.o
"boost::filesystem::detail::current_path(boost::system::error_code_)", referenced from:
main in cgalcachetest.cc.o
parser_init(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
Context::getAbsolutePath(std::basic_string<char, std::char_traits, std::allocator > const&) constin libtests-core.a(context.cc.o)
handle_dep(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(handle_dep.cc.o)
includefile() in libtests-core.a(lexer.cpp.o)
"boost::filesystem::path::operator/=(boost::filesystem::path const&)", referenced from:
main in cgalcachetest.cc.o
parser_init(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
locate_file(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
Context::getAbsolutePath(std::basic_string<char, std::char_traits, std::allocator > const&) constin libtests-core.a(context.cc.o)
handle_dep(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(handle_dep.cc.o)
includefile() in libtests-core.a(lexer.cpp.o)
lexerlex() in libtests-core.a(lexer.cpp.o)
...
"boost::filesystem::detail::current_path(boost::filesystem::path const&, boost::system::error_code
)", referenced from:
main in cgalcachetest.cc.o
"boost::program_options::error_with_option_name::what() const", referenced from:
vtable for boost::program_options::validation_errorin cgalcachetest.cc.o
vtable for boost::exception_detail::error_info_injectorboost::program_options::validation_errorin cgalcachetest.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::program_options::validation_error >in cgalcachetest.cc.o
vtable for boost::program_options::invalid_option_valuein cgalcachetest.cc.o
vtable for boost::exception_detail::error_info_injectorboost::program_options::invalid_option_valuein cgalcachetest.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::program_options::invalid_option_value >in cgalcachetest.cc.o
"boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traits, std::allocator > const&) const", referenced from:
vtable for boost::program_options::validation_errorin cgalcachetest.cc.o
vtable for boost::exception_detail::error_info_injectorboost::program_options::validation_errorin cgalcachetest.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::program_options::validation_error >in cgalcachetest.cc.o
vtable for boost::program_options::invalid_option_valuein cgalcachetest.cc.o
vtable for boost::exception_detail::error_info_injectorboost::program_options::invalid_option_valuein cgalcachetest.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::program_options::invalid_option_value >in cgalcachetest.cc.o
"typeinfo for boost::program_options::error_with_option_name", referenced from:
typeinfo for boost::program_options::validation_errorin cgalcachetest.cc.o
"boost::filesystem::path::extension() const", referenced from:
ImportModule::evaluate(Context const
, ModuleInstantiation const
) constin libtests-cgal.a(import.cc.o)
"boost::filesystem::absolute(boost::filesystem::path const&, boost::filesystem::path const&)", referenced from:
parser_init(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
Context::getAbsolutePath(std::basic_string<char, std::char_traits, std::allocator > const&) constin libtests-core.a(context.cc.o)
includefile() in libtests-core.a(lexer.cpp.o)
"boost::filesystem::path::operator/=(char const_)", referenced from:
parser_init(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
"boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code_)", referenced from:
parser_init(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
locate_file(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(parsersettings.cc.o)
handle_dep(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(handle_dep.cc.o)
includefile() in libtests-core.a(lexer.cpp.o)
lexerlex() in libtests-core.a(lexer.cpp.o)
"boost::filesystem::path::root_directory() const", referenced from:
boost::filesystem::path::has_root_directory() constin libtests-core.a(context.cc.o)
boost::filesystem::path::has_root_directory() constin libtests-core.a(handle_dep.cc.o)
boost::filesystem::path::has_root_directory() constin libtests-core.a(lexer.cpp.o)
"boost::filesystem::detail::file_size(boost::filesystem::path const&, boost::system::error_code_)", referenced from:
builtin_dxf_dim(Context const_, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > > const&, std::vector<Value, std::allocator > const&)in libtests-core.a(dxfdim.cc.o)
builtin_dxf_cross(Context const_, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > > const&, std::vector<Value, std::allocator > const&)in libtests-core.a(dxfdim.cc.o)
"boost::filesystem::detail::last_write_time(boost::filesystem::path const&, boost::system::error_code_)", referenced from:
builtin_dxf_dim(Context const_, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > > const&, std::vector<Value, std::allocator > const&)in libtests-core.a(dxfdim.cc.o)
builtin_dxf_cross(Context const_, std::vector<std::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::basic_string<char, std::char_traits, std::allocator > > > const&, std::vector<Value, std::allocator > const&)in libtests-core.a(dxfdim.cc.o)
"boost::filesystem::path::codecvt()", referenced from:
includefile() in libtests-core.a(lexer.cpp.o)
boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<std::basic_string<char, std::char_traits, std::allocator > >::type>, boost::filesystem::path&>::type boost::filesystem::path::operator=<std::basic_string<char, std::char_traits, std::allocator > >(std::basic_string<char, std::char_traits, std::allocator > const&)in libtests-core.a(lexer.cpp.o)
"boost::filesystem::path::m_append_separator_if_needed()", referenced from:
boost::filesystem::path& boost::filesystem::path::append<std::basic_string<char, std::char_traits, std::allocator > >(std::basic_string<char, std::char_traits, std::allocator > const&, std::codecvt<wchar_t, char, __mbstate_t> const&)in libtests-core.a(lexer.cpp.o)
"boost::filesystem::path::m_erase_redundant_separator(unsigned long)", referenced from:
boost::filesystem::path& boost::filesystem::path::append<std::basic_string<char, std::char_traits, std::allocator > >(std::basic_string<char, std::char_traits, std::allocator > const&, std::codecvt<wchar_t, char, __mbstate_t> const&)in libtests-core.a(lexer.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *_* [cgalcachetest] Error 1
make[1]: *** [CMakeFiles/cgalcachetest.dir/all] Error 2
make: *** [all] Error 2

Owner

kintel commented Dec 10, 2012

Could you run 'make VERBOSE=1' and show me the link line?

tbuser commented Dec 10, 2012

Linking CXX executable cgalcachetest
/usr/local/Cellar/cmake/2.8.10.1/bin/cmake -E cmake_link_script CMakeFiles/cgalcachetest.dir/link.txt --verbose=1
/usr/bin/g++ -fno-strict-aliasing -O2 -g -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cgalcachetest.dir/cgalcachetest.cc.o CMakeFiles/cgalcachetest.dir/bboxhelp.cc.o -o cgalcachetest -F/usr/local/Cellar/qt/4.8.0/lib libtests-cgal.a /Users/tbuser/code/libraries/install/lib/libCGAL.dylib /Users/tbuser/code/libraries/install/lib/libboost_thread.dylib /Users/tbuser/code/libraries/install/lib/libboost_system.dylib /Users/tbuser/code/openscad/../libraries/install/lib/libgmp.dylib /Users/tbuser/code/openscad/../libraries/install/lib/libmpfr.dylib -framework QtCore -framework AGL -framework OpenGL /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /Users/tbuser/code/libraries/install/lib/libGLEW.dylib -framework Cocoa libtests-common.a libtests-core.a -framework AGL -framework OpenGL
Undefined symbols for architecture x86_64:
"boost::filesystem::path::parent_path() const", referenced from:
_main in cgalcachetest.cc.o
...

Owner

kintel commented Dec 10, 2012

You have a stray boost installed in /usr/local - that confuses the build system.
Quickfix: Remove the boost from /usr/local
Better fix: Fix the cmake build system to look more carefully for boost in the prebuilt location (might be a bit tricky)

tbuser commented Dec 10, 2012

That was the problem, I did brew remove boost and now it's compiling. Thanks!

Member

donbright commented Dec 10, 2012

It should already be doing this. It looks for the existence of
$OPENSCAD_LIBRARIES/include/boost and if it's found, it does a

set(Boost_NO_SYSTEM_PATHS "TRUE")

, which should disable /usr/local/ .

I have tested this quite a bit on linux but never on OSX. I'm not sure what
the issue might be. A full log of the 'cmake' command output would be
helpful and sneaking a set(Boost_DEBUG TRUE) into the CMakeLists.txt
wouldn't hurt either.

-DB

On Mon, Dec 10, 2012 at 1:23 PM, Marius Kintel notifications@github.comwrote:

You have a stray boost installed in /usr/local - that confuses the build
system.
Quickfix: Remove the boost from /usr/local
Better fix: Fix the cmake build system to look more carefully for boost in
the prebuilt location (might be a bit tricky)


Reply to this email directly or view it on GitHubhttps://github.com/openscad/openscad/issues/226#issuecomment-11212958.

Owner

kintel commented Apr 10, 2013

I've seen (broken?) homebrew installations of boost causing some confusion, but I haven't had the motivation to set up a broken system on purpose. Closing this for now, and will react if this issue surfaces again with more log file.

kintel closed this Apr 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment