Oneflow-Inc / oneflow

OneFlow is a deep learning framework designed to be user-friendly, scalable and efficient.
http://www.oneflow.org
Apache License 2.0
5.88k stars 666 forks source link

complie error! NOT find c-ares #3780

Closed bringtree closed 3 years ago

bringtree commented 3 years ago

Hello, when I try to build the project. It throws an error.

python: 3.7.3 gcc: 10.1.0 cmake: 3.19.0-rc1 OS: centos 7

[  0%] Performing configure step for 'libjpeg-turbo'
[  1%] Built target cocoapi
[  1%] Built target absl
[  3%] Built target zlib
[  3%] Built target googletest
[  4%] Built target cub
[  4%] Built target nccl
[  4%] Built target gflags
[  4%] Built target half
[  6%] Built target json
[  6%] Built target eigen
[  7%] Built target re2
[  8%] Built target openssl
loading initial cache file /oneflow/build/libjpeg-turbo/tmp/libjpeg-turbo-cache-Debug.cmake
[  9%] Built target cares
[ 11%] Built target flatbuffers
[ 11%] Built target lz4
[ 11%] Built target of_git_version_create_dir
-- CMAKE_BUILD_TYPE = Debug
-- VERSION = 1.5.91, BUILD = 20201107
-- 64-bit build (x86_64)
-- CMAKE_INSTALL_PREFIX = /opt/libjpeg-turbo
-- CMAKE_INSTALL_BINDIR = bin (/opt/libjpeg-turbo/bin)
-- CMAKE_INSTALL_DATAROOTDIR =  (/opt/libjpeg-turbo)
-- CMAKE_INSTALL_DOCDIR = doc (/opt/libjpeg-turbo/doc)
-- CMAKE_INSTALL_INCLUDEDIR = include (/opt/libjpeg-turbo/include)
-- CMAKE_INSTALL_LIBDIR = lib64 (/opt/libjpeg-turbo/lib64)
-- CMAKE_INSTALL_MANDIR = man (/opt/libjpeg-turbo/man)
-- Shared libraries enabled (ENABLE_SHARED = 1)
-- Static libraries enabled (ENABLE_STATIC = 1)
-- 12-bit JPEG support disabled (WITH_12BIT = 0)
-- Arithmetic decoding support enabled (WITH_ARITH_DEC = 1)
-- Arithmetic encoding support enabled (WITH_ARITH_ENC = 1)
-- TurboJPEG API library enabled (WITH_TURBOJPEG = 1)
-- TurboJPEG Java wrapper disabled (WITH_JAVA = 0)
-- In-memory source/destination managers enabled (WITH_MEM_SRCDST = 1)
-- Emulating libjpeg API/ABI v6.2 (WITH_JPEG7 = 0, WITH_JPEG8 = 0)
-- libjpeg API shared library version = 62.3.0
-- Compiler flags =  -g
-- Linker flags =  
-- Compiler supports pointers to undefined structures.
-- INLINE = __inline__ __attribute__((always_inline)) (FORCE_INLINE = 1)
-- Linker supports GNU-style version scripts
[ 11%] Built target cocoapi_create_header_dir
[ 11%] Built target gflags_create_library_dir
[ 11%] Built target zlib_create_header_dir
[ 11%] Built target json_create_header_dir
[ 11%] Generating of_git_version/_version.cpp
[ 11%] Built target googlemock_create_library_dir
[ 12%] Built target protobuf
[ 12%] Built target googletest_create_header_dir
[ 12%] Built target zlib_create_library_dir
[ 12%] Built target half_create_header_dir
[ 12%] Built target cocoapi_create_library_dir
[ 12%] Built target googlemock_create_header_dir
[ 12%] Built target gflags_create_header_dir
[ 12%] Built target nccl_create_header_dir
[ 12%] Built target cub_create_header_dir
[ 12%] Built target nccl_create_library_dir
[ 12%] Built target lz4_create_library_dir
[ 12%] Built target googletest_create_library_dir
[ 12%] Built target lz4_create_header_dir
[ 12%] Built target gflags_copy_libs_to_destination
[ 12%] Built target protobuf_create_header_dir
[ 12%] Built target cocoapi_copy_headers_to_destination
[ 12%] Built target protobuf_create_library_dir
[ 12%] Built target protobuf_create_binary_dir
[ 12%] Built target zlib_copy_libs_to_destination
[ 12%] Built target zlib_copy_headers_to_destination
[ 12%] Built target json_copy_headers_to_destination
[ 12%] Built target cocoapi_copy_libs_to_destination
[ 12%] Built target lz4_copy_libs_to_destination
[ 12%] Built target googletest_copy_libs_to_destination
[ 12%] Built target googlemock_copy_libs_to_destination
[ 12%] Built target half_copy_headers_to_destination
[ 12%] Built target nccl_copy_headers_to_destination
[ 12%] Built target gflags_copy_headers_to_destination
[ 12%] Built target lz4_copy_headers_to_destination
[ 12%] Performing configure step for 'grpc'
[ 12%] Built target nccl_copy_libs_to_destination
[ 12%] Built target protobuf_copy_libs_to_destination
[ 12%] Built target glog
[ 12%] Built target protobuf_copy_binary_to_destination
loading initial cache file /oneflow/build/grpc/tmp/grpc-cache-Debug.cmake
CMake Warning (dev) at /cmake/cmake-3.19.0-rc1-Linux-x86_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:424 (message):
  The package name passed to `find_package_handle_standard_args` (Threads)
  does not match the name of the calling package (absl).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /cmake/cmake-3.19.0-rc1-Linux-x86_64/share/cmake-3.19/Modules/FindThreads.cmake:234 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /oneflow/third_party/absl/lib64/cmake/absl/abslConfig.cmake:3 (include)
  cmake/abseil-cpp.cmake:38 (find_package)
  CMakeLists.txt:188 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

[ 12%] Built target glog_create_header_dir
[ 12%] Built target glog_create_library_dir
CMake Warning at cmake/modules/Findc-ares.cmake:18 (find_package):
  Could not find a configuration file for package "c-ares" that is compatible
  with requested version "1.13.0".

  The following configuration files were considered but not accepted:

    /third_party/cares/lib/cmake/c-ares/c-ares-config.cmake, version: unknown
    /anaconda3/lib/cmake/c-ares/c-ares-config.cmake, version: unknown

Call Stack (most recent call first):
  cmake/cares.cmake:42 (find_package)
  CMakeLists.txt:191 (include)

And I think I can deal with this error if I am free.

doombeaker commented 3 years ago

Thank you for your feedback. I'm not sure, but it may have something to do with the version of cmake.

According the the oneflow README, the 3.14.0 of cmake is recommend, (and yours is 3.19.0).

May this will help you. Looking forward to your follow-up.

jackalcooper commented 3 years ago

You can also try run this script to build oneflow. It will build oneflow in docker and produce wheel packages:

python3 docker/package/manylinux/build_wheel.py --cuda_version=10.1 --python_version=3.6,3.7 --use_tuna --use_system_proxy --use_aliyun_mirror 
bringtree commented 3 years ago

You can also try run this script to build oneflow. It will build oneflow in docker and produce wheel packages:

python3 docker/package/manylinux/build_wheel.py --cuda_version=10.1 --python_version=3.6,3.7 --use_tuna --use_system_proxy --use_aliyun_mirror 

Thanks, I deal with the question by using conda install c-ares and then I again met some questions about envs ..... In the end, I choice docker to build. It is easy and efficient.