Skip to content

Commit aa42331

Browse files
guoyuhongpcmoritz
authored andcommitted
Fix build failure while using make -j1. Issue 2257 (#2279)
* Fix build failure while using make -j1 * Fix java test failure
1 parent b108419 commit aa42331

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
9797
add_custom_target(copy_ray ALL
9898
DEPENDS ${build_ray_file_list})
9999

100+
# Make sure redis-server is ready before copying.
101+
add_dependencies(copy_ray copy_redis)
102+
100103
# Make sure that the Python extensions are built before copying the files.
101104
if ("${CMAKE_RAY_LANG_PYTHON}" STREQUAL "YES")
102105
get_local_scheduler_library("python" LOCAL_SCHEDULER_LIBRARY_LANG)

src/global_scheduler/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/../common/cmake/Common.cmake)
77
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall")
88

99
add_executable(global_scheduler global_scheduler.cc global_scheduler_algorithm.cc)
10+
11+
# Make sure ${HIREDIS_LIB} is ready before linking.
12+
add_dependencies(global_scheduler hiredis)
13+
1014
target_link_libraries(global_scheduler common ${HIREDIS_LIB} ray_static ${PLASMA_STATIC_LIB} ${ARROW_STATIC_LIB} ${Boost_SYSTEM_LIBRARY} pthread)

src/local_scheduler/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ add_dependencies(gen_local_scheduler_fbs flatbuffers_ep)
6161

6262
add_library(local_scheduler_client STATIC local_scheduler_client.cc)
6363

64-
add_dependencies(local_scheduler_client gen_local_scheduler_fbs)
64+
# local_scheduler_shared.h includes ray/gcs/client.h which requires gen_gcs_fbs & gen_node_manager_fbs.
65+
add_dependencies(local_scheduler_client gen_local_scheduler_fbs ${COMMON_FBS_OUTPUT_FILES} gen_gcs_fbs gen_node_manager_fbs)
6566

6667
add_executable(local_scheduler local_scheduler.cc local_scheduler_algorithm.cc)
6768
target_link_libraries(local_scheduler local_scheduler_client common ${HIREDIS_LIB} ${PLASMA_STATIC_LIB} ray_static ${ARROW_STATIC_LIB} -lpthread ${Boost_SYSTEM_LIBRARY})

src/ray/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ install(
7777

7878
ADD_RAY_LIB(ray
7979
SOURCES ${RAY_SRCS} ${AE_SRCS} ${HIREDIS_SRCS} ${UTIL_SRCS}
80-
DEPENDENCIES gen_gcs_fbs gen_object_manager_fbs gen_node_manager_fbs gen_local_scheduler_fbs
80+
# TODO: When raylet replaces the old backend, please remove the dependency gen_local_scheduler_fbs.
81+
# TODO: When remove the included Task.h from table.h, please remove the dependency gen_common_python_fbs.
82+
DEPENDENCIES gen_gcs_fbs gen_object_manager_fbs gen_node_manager_fbs gen_local_scheduler_fbs ${COMMON_FBS_OUTPUT_FILES}
8183
SHARED_LINK_LIBS ""
8284
STATIC_LINK_LIBS ${PLASMA_STATIC_LIB} ${ARROW_STATIC_LIB})

src/ray/gcs/tables.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include "ray/raylet/format/node_manager_generated.h"
1616

1717
// TODO(pcm): Remove this
18+
// TODO: While removing "task.h", remove the dependency gen_common_python_fbs
19+
// from src/ray/CMakeLists.txt.
1820
#include "task.h"
1921

2022
struct redisAsyncContext;

src/ray/raylet/node_manager.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "ray/raylet/node_manager.h"
22

33
#include "common_protocol.h"
4+
// TODO: While removing "local_scheduler_generated.h", remove the dependency
5+
// gen_local_scheduler_fbs from src/ray/CMakeLists.txt.
46
#include "local_scheduler/format/local_scheduler_generated.h"
57
#include "ray/raylet/format/node_manager_generated.h"
68
#include "ray/util/util.h"

thirdparty/scripts/setup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ echo "Build language is $LANGUAGE."
2626

2727
unamestr="$(uname)"
2828

29+
##############################################
30+
# boost
31+
##############################################
32+
bash "$TP_SCRIPT_DIR/build_boost.sh"
33+
2934
##############################################
3035
# redis
3136
##############################################
@@ -36,11 +41,6 @@ bash "$TP_SCRIPT_DIR/build_redis.sh"
3641
##############################################
3742
bash "$TP_SCRIPT_DIR/build_credis.sh"
3843

39-
##############################################
40-
# boost
41-
##############################################
42-
bash "$TP_SCRIPT_DIR/build_boost.sh"
43-
4444
##############################################
4545
# flatbuffers if necessary
4646
##############################################

0 commit comments

Comments
 (0)