husky-team / husky

A more expressive and most importantly, more efficient system for distributed data analytics.
http://www.husky-project.com/
Other
98 stars 55 forks source link

MacOS building error #288

Open kygx-legend opened 7 years ago

kygx-legend commented 7 years ago

The is reported by Sajad Norouzi.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
RT_LIBRARY

One reason is that librt library is not available in MacOS. But this library is only required when building with MongoDBClient. The solution is to check the building system first in order to decide whether it is able to use -lrt as the link flags. Moreover, we may think about checking other systems in cmake as the following:

if(WIN32)
  set(WINDOWS TRUE)
elseif(UNIX AND NOT APPLE)
  if(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
    set(LINUX TRUE)
  endif()
elseif(APPLE)
  if(CMAKE_SYSTEM_NAME MATCHES ".*Darwin.*")
    set(DARWIN TRUE)
  elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
    set(MACOSX TRUE)
  endif()
endif()
kygx-legend commented 7 years ago

When not including MongoDBClient in building, another error below is also occurred:

ld: symbol(s) not found for architecture x86_64

kygx-legend commented 7 years ago

I‘ll create a page in our Wiki about how to build in Mac OS X later.

kygx-legend commented 7 years ago

That some file system in Mac OS X is not case-sensitive causes failure to make Master, where there is a directory also called master in building path. So the work around for this is to change the target name Master with HuskyMaster.

kygx-legend commented 6 years ago

Failed to run PI application even through it is successful to compile. It can be traced to core/network.cpp and there is no corresponding processing to get the ip list on Mac OS. Will be fixed.