{"action":"created","issue":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/40","labels_url":"https://api.github.com/repos/CastXML/CastXML/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/CastXML/CastXML/issues/40/comments","events_url":"https://api.github.com/repos/CastXML/CastXML/issues/40/events","html_url":"https://github.com/CastXML/CastXML/issues/40","id":119803825,"number":40,"title":"Can't build with llvm 3.6.2 on OS X","user":{"login":"iMichka","id":3406519,"avatar_url":"https://avatars.githubusercontent.com/u/3406519?v=3","gravatar_id":"","url":"https://api.github.com/users/iMichka","html_url":"https://github.com/iMichka","followers_url":"https://api.github.com/users/iMichka/followers","following_url":"https://api.github.com/users/iMichka/following{/other_user}","gists_url":"https://api.github.com/users/iMichka/gists{/gist_id}","starred_url":"https://api.github.com/users/iMichka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iMichka/subscriptions","organizations_url":"https://api.github.com/users/iMichka/orgs","repos_url":"https://api.github.com/users/iMichka/repos","events_url":"https://api.github.com/users/iMichka/events{/privacy}","received_events_url":"https://api.github.com/users/iMichka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-01T20:44:55Z","updated_at":"2015-12-01T20:52:24Z","closed_at":null,"body":"Hi\r\n\r\nI am trying to work on CastXML's packaging; so that we can provide binaries through homebrew on Mac.\r\nI am on OS X 10.11.1 (El Capitan) and installed llvm through homebrew (brew install llvm --with-clang).\r\nThe install tree is in /usr/local/Cellar/llvm/.\r\n\r\nI tested with the corresponding clang version and with the clang version provided by Apple. I get the following linker error:\r\n\r\n```\r\nUndefined symbols for architecture x86_64:\r\n  \"std::bad_cast::bad_cast()\", referenced from:\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::sync() in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::underflow() in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::overflow(int) in Utils.cxx.o\r\n  \"std::bad_cast::~bad_cast()\", referenced from:\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::seekoff(long long, std::__1::ios_base::seekdir, unsigned int) in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::sync() in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::underflow() in Utils.cxx.o\r\n      std::__1::basic_filebuf<char, std::__1::char_traits<char> >::overflow(int) in Utils.cxx.o\r\n  \"std::terminate()\", referenced from:\r\n      ___clang_call_terminate in castxml.cxx.o\r\n      ___clang_call_terminate in Detect.cxx.o\r\n      ___clang_call_terminate in Output.cxx.o\r\n      ___clang_call_terminate in RunClang.cxx.o\r\n      ___clang_call_terminate in Utils.cxx.o\r\nld: symbol(s) not found for architecture x86_64\r\n```\r\n\r\nCmake was run with the following options:\r\n>  cmake DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/3.6.2/bin/clang++ -DLLVM_DIR=/usr/local/Cellar/llvm/3.6.2/share/llvm/cmake\r\n\r\nHere is cmake's output:\r\nhttps://gist.github.com/iMichka/9e256769e3bbd691b886\r\n\r\nAnd here make:\r\nhttps://gist.github.com/iMichka/32592928dc466be6ff86\r\n\r\nMaybe you can help me out here. It would be great to have a reliable way to compile CastXML on OS X (and I would prefer not to keep multiple llvm versions around on my macbook, this is eating up a lot of space :)).\r\n"},"comment":{"url":"https://api.github.com/repos/CastXML/CastXML/issues/comments/161091806","html_url":"https://github.com/CastXML/CastXML/issues/40#issuecomment-161091806","issue_url":"https://api.github.com/repos/CastXML/CastXML/issues/40","id":161091806,"user":{"login":"bradking","id":87268,"avatar_url":"https://avatars.githubusercontent.com/u/87268?v=3","gravatar_id":"","url":"https://api.github.com/users/bradking","html_url":"https://github.com/bradking","followers_url":"https://api.github.com/users/bradking/followers","following_url":"https://api.github.com/users/bradking/following{/other_user}","gists_url":"https://api.github.com/users/bradking/gists{/gist_id}","starred_url":"https://api.github.com/users/bradking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradking/subscriptions","organizations_url":"https://api.github.com/users/bradking/orgs","repos_url":"https://api.github.com/users/bradking/repos","events_url":"https://api.github.com/users/bradking/events{/privacy}","received_events_url":"https://api.github.com/users/bradking/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T20:52:24Z","updated_at":"2015-12-01T20:52:24Z","body":"> cmake -DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/3.6.2/bin/clang++ -DLLVM_DIR=/usr/local/Cellar/llvm/3.6.2/share/llvm/cmake\r\n\r\nYou don't need to compile CastXML with the Clang that it is linking against.  You should compile CastXML using the same compiler that was used to build LLVM/Clang (i.e. the compiler that brew used to build it).\r\n"}}