Skip to content

Commit

Permalink
Fixes nightly CI on macOS (#2219)
Browse files Browse the repository at this point in the history
* Fixes nightly CI on macOS
  • Loading branch information
lidongze0629 committed Nov 14, 2022
1 parent f21754f commit cc51704
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Makefile
Expand Up @@ -91,8 +91,10 @@ gae-install: gae
$(MAKE) -C $(GAE_BUILD_DIR) install
install $(K8S_DIR)/kube_ssh $(INSTALL_PREFIX)/bin/
install -d $(INSTALL_PREFIX)/lib/cmake/graphscope-analytical/cmake
install $(INSTALL_PREFIX)/lib64/cmake/graphscope-analytical/*.cmake $(INSTALL_PREFIX)/lib/cmake/graphscope-analytical
install $(INSTALL_PREFIX)/lib64/cmake/graphscope-analytical/cmake/* $(INSTALL_PREFIX)/lib/cmake/graphscope-analytical/cmake
if [ -d "${INSTALL_PREFIX}/lib64/cmake/graphscope-analytical" ]; then \
install $(INSTALL_PREFIX)/lib64/cmake/graphscope-analytical/*.cmake $(INSTALL_PREFIX)/lib/cmake/graphscope-analytical; \
install $(INSTALL_PREFIX)/lib64/cmake/graphscope-analytical/cmake/* $(INSTALL_PREFIX)/lib/cmake/graphscope-analytical/cmake; \
fi

gae: $(GAE_BUILD_DIR)/grape_engine

Expand Down
25 changes: 17 additions & 8 deletions analytical_engine/CMakeLists.txt
Expand Up @@ -110,8 +110,15 @@ endif ()
set(CMAKE_THREAD_PREFER_PTHREAD ON)

include(GNUInstallDirs)
# reference: https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#always-full-rpath
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64")
if(APPLE)
# the LC_RPATH on Mac seems doesn't support multiple path (seperated with ':seperated with `:`)
# fortunately, we just need to take care `lib` on Mac.
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
else()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:${CMAKE_INSTALL_PREFIX}/lib/x86_64-linux-gnu")
endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

find_package(Threads REQUIRED)
Expand Down Expand Up @@ -181,13 +188,6 @@ if (GLOG_FOUND)
endif ()


include("cmake/FindArrow.cmake")
if (ARROW_FOUND)
include_directories("${ARROW_INCLUDE_DIR}")
else ()
message(FATAL_ERROR "arrow not found")
endif ()

include("cmake/FindLibUnwind.cmake")
if (${LIBUNWIND_FOUND})
add_definitions(-DWITH_LIBUNWIND)
Expand Down Expand Up @@ -220,6 +220,15 @@ else()
set(GRPC_LIBRARIES ${GPR_LIBRARY} ${GRPC_LIBRARY} ${GRPC_GRPC++_LIBRARY})
endif()

# Make sure FindArrow is behind FindGRPC
# fixes the "c-ares::cares_shared" target already exists.
include("cmake/FindArrow.cmake")
if (ARROW_FOUND)
include_directories("${ARROW_INCLUDE_DIR}")
else ()
message(FATAL_ERROR "arrow not found")
endif ()

# Generate proto
execute_process(COMMAND python3 python/graphscope/proto/proto_generator.py "${PROJECT_SOURCE_DIR}" --cpp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/..)
Expand Down
1 change: 1 addition & 0 deletions k8s/Makefile
Expand Up @@ -121,6 +121,7 @@ graphscope-darwin-py3:
sudo strip -s $(WORKING_DIR)/../analytical_engine/exported_symbols_osx.lds /opt/graphscope/bin/grape_engine || true && \
sudo strip /opt/graphscope/bin/gaia_executor && \
export DYLD_LIBRARY_PATH=/usr/local/lib:$$DYLD_LIBRARY_PATH && \
install_name_tool -add_rpath /usr/local/lib /opt/graphscope/bin/gaia_executor && \
package_name=gs-include python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
rm -rf build && \
package_name=gs-apps python3 setup.py bdist_wheel --plat=macosx_10_9_x86_64 && \
Expand Down

0 comments on commit cc51704

Please sign in to comment.