[ https://issues.apache.org/jira/browse/THRIFT-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491487#comment-14491487 ]
Marco Molteni commented on THRIFT-3090: --------------------------------------- Now I think that the linking problem might be related to the fact that I am using a cmake version >= 3.0 on Mac OS X. When running cmake, I get: {noformat} CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning. MACOSX_RPATH is not specified for the following targets: thrift thrift_c_glib thriftqt thriftz {noformat} and looking at http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html it says: {quote} MACOSX_RPATH is enabled by default. CMake 2.8.12 and newer has support for using @rpath in a target’s install name. This was enabled by setting the target property MACOSX_RPATH. The @rpath in an install name is a more flexible and powerful mechanism than @executable_path or @loader_path for locating shared libraries. CMake 3.0 and later prefer this property to be ON by default. Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables. This policy was introduced in CMake version 3.0. CMake version 3.0.2 warns when the policy is not set and uses OLD behavior. Use the cmake_policy command to set it to OLD or NEW explicitly. {quote} Is bumping the minimum required cmake version for Thrift to 3.0 OK (what I would suggest) or do we have to explicitly set the old policy? > cmake build is broken > --------------------- > > Key: THRIFT-3090 > URL: https://issues.apache.org/jira/browse/THRIFT-3090 > Project: Thrift > Issue Type: Bug > Environment: Mac OS X 10.10.3 > C++ compiler: Apple system compiler (clang), Apple LLVM version 6.0 > (clang-600.0.57) (based on LLVM 3.5svn) > boost 1.57 > cmake 3.2.1 > Reporter: Marco Molteni > > A current version of apache/thrift on github as of 2015-04-10 doesn't build > with cmake due to multiple errors: > - some C++ targets fail to link with missing symbols, because they do not > link against the `thrift` library > - the c_glib test targets fail to build because the reference to `shared_ptr` > is considered ambiguous by the compiler (it resolves to both boost and stdlib > shared_ptr) > See pull request https://github.com/apache/thrift/pull/434 -- This message was sent by Atlassian JIRA (v6.3.4#6332)