{"action":"created","issue":{"url":"https://api.github.com/repos/esa/pagmo/issues/90","labels_url":"https://api.github.com/repos/esa/pagmo/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/esa/pagmo/issues/90/comments","events_url":"https://api.github.com/repos/esa/pagmo/issues/90/events","html_url":"https://github.com/esa/pagmo/issues/90","id":50376434,"number":90,"title":"OS X build failures","user":{"login":"John-Colvin","id":1867189,"avatar_url":"https://avatars.githubusercontent.com/u/1867189?v=3","gravatar_id":"","url":"https://api.github.com/users/John-Colvin","html_url":"https://github.com/John-Colvin","followers_url":"https://api.github.com/users/John-Colvin/followers","following_url":"https://api.github.com/users/John-Colvin/following{/other_user}","gists_url":"https://api.github.com/users/John-Colvin/gists{/gist_id}","starred_url":"https://api.github.com/users/John-Colvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/John-Colvin/subscriptions","organizations_url":"https://api.github.com/users/John-Colvin/orgs","repos_url":"https://api.github.com/users/John-Colvin/repos","events_url":"https://api.github.com/users/John-Colvin/events{/privacy}","received_events_url":"https://api.github.com/users/John-Colvin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-11-28T13:55:25Z","updated_at":"2015-01-26T19:21:51Z","closed_at":"2015-01-26T15:50:27Z","body":"After doing this: https://github.com/esa/pagmo/pull/89\r\n\r\nI was able get the following steps to work:\r\n```\r\n$ cmake ../ -DBUILD_PYGMO=1\r\n-- The C compiler identification is AppleClang 6.0.0.6000054\r\n-- The CXX compiler identification is AppleClang 6.0.0.6000054\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- OS detected: Darwin\r\n-- CXX Compiler detected: Clang\r\n-- CMake Library search path: /usr/local/lib\r\n-- Performing Test CLANG_TEMPLATE_DEPTH\r\n-- Performing Test CLANG_TEMPLATE_DEPTH - Success\r\n-- Enabling '-ftemplate-depth=256' compiler flag required since boost 1.54.\r\n-- Performing Test ALL_C11\r\n-- Performing Test ALL_C11 - Success\r\n-- Enabling '-std=c++11' compiler flag\r\n-- m library found: /usr/lib/libm.dylib\r\n-- Found PythonInterp: /usr/bin/python (found version \"2.7.6\") \r\n-- Python version 2.7.6 found.\r\n-- Found PythonInterp: /usr/bin/python2.7 (found suitable version \"2.7.6\", minimum required is \"2.7.6\") \r\n-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found suitable version \"2.7.6\", minimum required is \"2.7.6\") \r\n-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version \"2.7.6\") \r\n-- Python interpreter: /usr/bin/python2.7\r\n-- Python library: /usr/lib/libpython2.7.dylib\r\n-- Python include path: /System/Library/Frameworks/Python.framework/Headers\r\n-- Python packages dir is: site-packages\r\n-- OSX system detected.\r\n-- Python interpeter returns string: 'Python 2.7.6'\r\n-- Python library version: 27\r\n-- Python modules install path: lib/python2.7/site-packages\r\n-- Required Boost libraries: system;serialization;thread;python\r\n-- Boost version: 1.56.0\r\n-- Found the following Boost libraries:\r\n--   system\r\n--   serialization\r\n--   thread\r\n--   python\r\n-- Detected Boost version: 105600\r\n-- Boost include dirs: /usr/local/include\r\n-- Boost libraries: /usr/local/lib/libboost_system-mt.dylib;/usr/local/lib/libboost_serialization-mt.dylib;/usr/local/lib/libboost_thread-mt.dylib;/usr/local/lib/libboost_python-mt.dylib\r\n-- Looking for include file pthread.h\r\n-- Looking for include file pthread.h - found\r\n-- Looking for pthread_create\r\n-- Looking for pthread_create - found\r\n-- Found Threads: TRUE  \r\n-- Thread library: \r\n-- Build flags:  -ftemplate-depth=256 -std=c++11 -DBOOST_THREAD_USE_DLL -DBOOST_SERIALIZATION_DYN_LINK=1\r\n-- Module linker flags: \r\n-- Shared linker flags: \r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /Users/john/Git/pagmo/build\r\n```\r\nfollowed by\r\n```\r\n$ cmake ../ -DBUILD_PYGMO=1 -DPYGMO_PYTHON_VERSION=3.4.2 -DCMAKE_PREFIX_PATH=/usr/local/Frameworks/Python.framework/Versions/3.4/\r\n-- OS detected: Darwin\r\n-- CXX Compiler detected: Clang\r\n-- CMake Library search path: /usr/local/lib\r\n-- Enabling '-ftemplate-depth=256' compiler flag required since boost 1.54.\r\n-- Enabling '-std=c++11' compiler flag\r\n-- m library found: /usr/lib/libm.dylib\r\n-- Found PythonInterp: /usr/local/Frameworks/Python.framework/Versions/3.4/bin/python3.4 (found suitable version \"3.4.2\", minimum required is \"3.4.2\") \r\n-- Could NOT find PythonLibs: Found unsuitable version \"2.7.6\", but required is at least \"3.4.2\" (found /usr/local/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib)\r\n-- Found PythonLibs: /usr/local/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib (found version \"2.7.6\") \r\n-- Python interpreter: /usr/local/Frameworks/Python.framework/Versions/3.4/bin/python3.4\r\n-- Python library: /usr/local/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib\r\n-- Python include path: /System/Library/Frameworks/Python.framework/Headers\r\n-- Python packages dir is: site-packages\r\n-- OSX system detected.\r\n-- Python interpeter returns string: 'Python 3.4.2'\r\n-- Python library version: 34\r\n-- Python modules install path: lib/python3.4/site-packages\r\n-- Required Boost libraries: system;serialization;thread;python3\r\n-- Boost version: 1.56.0\r\n-- Found the following Boost libraries:\r\n--   system\r\n--   serialization\r\n--   thread\r\n--   python3\r\n-- Detected Boost version: 105600\r\n-- Boost include dirs: /usr/local/include\r\n-- Boost libraries: /usr/local/lib/libboost_system-mt.dylib;/usr/local/lib/libboost_serialization-mt.dylib;/usr/local/lib/libboost_thread-mt.dylib;/usr/local/lib/libboost_python3-mt.dylib\r\n-- Thread library: \r\n-- Build flags:  -ftemplate-depth=256 -std=c++11 -DBOOST_THREAD_USE_DLL -DBOOST_SERIALIZATION_DYN_LINK=1\r\n-- Module linker flags: \r\n-- Shared linker flags: \r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /Users/john/Git/pagmo/build\r\n```\r\n\r\nso aside from the weird stuff going on with PythonLibs things are looking ok.\r\n\r\nI then run:\r\n```$ make```\r\nand everything compiles happily, but the linking step fails:\r\n```\r\nLinking CXX shared library _algorithm.so\r\nUndefined symbols for architecture x86_64:\r\n  \"_PyInt_FromLong\", referenced from:\r\n      boost::python::api::proxy<boost::python::api::item_policies> boost::python::api::object_operators<boost::python::api::object>::operator[]<int>(int const&) in algorithm.cpp.o\r\n      boost::python::objects::caller_py_function_impl<boost::python::detail::caller<int (pagmo::algorithm::cmaes::*)() const, boost::python::default_call_policies, boost::mpl::vector2<int, pagmo::algorithm::cmaes&> > >::operator()(_object*, _object*) in algorithm.cpp.o\r\n  \"_PyInt_Type\", referenced from:\r\n      boost::python::detail::converter_target_type<boost::python::to_python_value<int const&> >::get_pytype() in algorithm.cpp.o\r\n  \"_PyString_FromStringAndSize\", referenced from:\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::sa_corana const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::sa_corana const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      boost::python::tuple boost::python::make_tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in algorithm.cpp.o\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::de_1220 const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::de_1220 const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::mde_pbx const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::mde_pbx const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::jde const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::jde const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::de const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::de const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      boost::python::detail::caller_arity<1u>::impl<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (*)(pagmo::algorithm::spea2 const&), boost::python::default_call_policies, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, pagmo::algorithm::spea2 const&> >::operator()(_object*, _object*) in algorithm.cpp.o\r\n      ...\r\n  \"_PyString_Type\", referenced from:\r\n      boost::python::detail::converter_target_type<boost::python::to_python_value<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&> >::get_pytype() in algorithm.cpp.o\r\n  \"boost::python::detail::init_module(char const*, void (*)())\", referenced from:\r\n      _init_algorithm in algorithm.cpp.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake[2]: *** [PyGMO/algorithm/_algorithm.so] Error 1\r\nmake[1]: *** [PyGMO/algorithm/CMakeFiles/_algorithm.dir/all] Error 2\r\nmake: *** [all] Error 2\r\n```"},"comment":{"url":"https://api.github.com/repos/esa/pagmo/issues/comments/71520219","html_url":"https://github.com/esa/pagmo/issues/90#issuecomment-71520219","issue_url":"https://api.github.com/repos/esa/pagmo/issues/90","id":71520219,"user":{"login":"darioizzo","id":3327087,"avatar_url":"https://avatars.githubusercontent.com/u/3327087?v=3","gravatar_id":"","url":"https://api.github.com/users/darioizzo","html_url":"https://github.com/darioizzo","followers_url":"https://api.github.com/users/darioizzo/followers","following_url":"https://api.github.com/users/darioizzo/following{/other_user}","gists_url":"https://api.github.com/users/darioizzo/gists{/gist_id}","starred_url":"https://api.github.com/users/darioizzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darioizzo/subscriptions","organizations_url":"https://api.github.com/users/darioizzo/orgs","repos_url":"https://api.github.com/users/darioizzo/repos","events_url":"https://api.github.com/users/darioizzo/events{/privacy}","received_events_url":"https://api.github.com/users/darioizzo/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T19:21:51Z","updated_at":"2015-01-26T19:21:51Z","body":"Thats weird, I also have homebrew and python 2.7 but all works for me. \r\nI have compiled boost and python using homebrew and use these versions. If you use the systemwide python (from OSX) PyGMO will not work. \r\n\r\nI have never tried on osx python 3 and PyGMO, on linux this works just fine, but, as I said, I have tried on osx, I might give it a try to see if I can help you there .... In case I can reproduce your problem I will reopen the ticket and try to solve ..."}}