Changeset View
Changeset View
Standalone View
Standalone View
files/system-libuv.patch
- This file was added.
| --- a/cmake/Dependencies.cmake | |||||
| +++ b/cmake/Dependencies.cmake | |||||
| @@ -1346,7 +1346,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE) | |||||
| set(TP_USE_CUDA ON CACHE BOOL "" FORCE) | |||||
| set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE) | |||||
| endif() | |||||
| - set(TP_BUILD_LIBUV ON CACHE BOOL "" FORCE) | |||||
| + set(TP_BUILD_LIBUV OFF CACHE BOOL "" FORCE) | |||||
| set(TP_STATIC_OR_SHARED STATIC CACHE STRING "" FORCE) | |||||
| add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe) | |||||
| --- a/third_party/gloo/cmake/Dependencies.cmake | |||||
| +++ b/third_party/gloo/cmake/Dependencies.cmake | |||||
| @@ -30,7 +30,7 @@ endif() | |||||
| if(USE_LIBUV) | |||||
| # If the Gloo build is included from another project's build, it may | |||||
| # have already included libuv and we can use it directly here. | |||||
| - if(TARGET uv_a) | |||||
| + if(TARGET uv) | |||||
| # Note: the CMake files in the libuv don't specify an include | |||||
| # directory for the uv and uv_a targets. If you're including the | |||||
| # Gloo build from your own project's build, and include libuv | |||||
| @@ -41,6 +41,17 @@ if(USE_LIBUV) | |||||
| # INTERFACE_INCLUDE_DIRECTORIES "${libuv_SOURCE_DIR}/include" | |||||
| # ) | |||||
| # | |||||
| + find_library( | |||||
| + libuv_LIBRARY | |||||
| + NAMES uv libuv | |||||
| + HINTS ${libuv_ROOT} ENV libuv_ROOT | |||||
| + PATH_SUFFIXES lib/release lib/debug lib | |||||
| + REQUIRED | |||||
| + NO_DEFAULT_PATH) | |||||
| + set(libuv_INCLUDE_DIRS "/usr/include") | |||||
| + if(NOT EXISTS ${libuv_LIBRARY}) | |||||
| + message(FATAL_ERROR "Unable to find static libuv library in " $ENV{libuv_ROOT}) | |||||
| + endif() | |||||
| else() | |||||
| if(MSVC) | |||||
| find_library( | |||||
| @@ -78,19 +89,20 @@ if(USE_LIBUV) | |||||
| set(libuv_INCLUDE_DIRS ${uv_HEADER_PATH}/..) | |||||
| else() | |||||
| include(FindPkgConfig) | |||||
| - pkg_search_module(libuv REQUIRED libuv>=1.26) | |||||
| + pkg_search_module(libuv REQUIRED libuv) | |||||
| find_file( | |||||
| libuv_LIBRARY | |||||
| - NAMES libuv.a libuv_a.a | |||||
| + NAMES libuv.so | |||||
| - PATHS ${libuv_LIBDIR} | |||||
| + PATHS "/usr/lib64" | |||||
| NO_DEFAULT_PATH) | |||||
| + set(libuv_INCLUDE_DIRS "/usr/include") | |||||
| if(NOT EXISTS ${libuv_LIBRARY}) | |||||
| - message(FATAL_ERROR "Unable to find static libuv library in " ${libuv_LIBDIR}) | |||||
| + message(FATAL_ERROR "Unable to find shared libuv library in " ${libuv_LIBDIR}) | |||||
| endif() | |||||
| endif() | |||||
| - add_library(uv_a INTERFACE IMPORTED) | |||||
| - set_target_properties(uv_a PROPERTIES | |||||
| + add_library(uv INTERFACE IMPORTED) | |||||
| + set_target_properties(uv PROPERTIES | |||||
| INTERFACE_INCLUDE_DIRECTORIES ${libuv_INCLUDE_DIRS} | |||||
| INTERFACE_LINK_LIBRARIES ${libuv_LIBRARY} | |||||
| ) | |||||
| --- a/third_party/gloo/gloo/CMakeLists.txt | |||||
| +++ b/third_party/gloo/gloo/CMakeLists.txt | |||||
| @@ -143,7 +143,7 @@ if(USE_ROCM) | |||||
| target_link_libraries(gloo_hip gloo) | |||||
| endif() | |||||
| if(USE_LIBUV) | |||||
| - target_link_libraries(gloo PRIVATE uv_a) | |||||
| + target_link_libraries(gloo PRIVATE uv) | |||||
| endif() | |||||
| target_link_libraries(gloo PRIVATE ${gloo_DEPENDENCY_LIBS}) | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.