PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.22k stars 5.58k forks source link

Paddle Inference 2.4 compilation failed - C1083 sys/ioctl.h not found #48514

Closed sdcb closed 1 year ago

sdcb commented 1 year ago

bug描述 Describe the Bug

date: 2022/11/29 environment: Windows Server 2019, Visual Studio 2019

pull command:

git checkout release/2.4
git pull

Compilation command:

SET CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
cmake .. -GNinja -DWITH_MKL=OFF -DWITH_GPU=ON -DON_INFER=ON -DWITH_PYTHON=OFF -DWITH_UNITY_BUILD=ON -DCUDA_ARCH_NAME=Manual -DCUDA_ARCH_BIN="61 75 86"

error message:

C:\_\code\Paddle\paddle\fluid\inference\utils\table_printer.cc(22): fatal error C1083: Cannot open include file: 'sys/ioctl.h': No such file or directory

Whole error message:

C:\_\code\Paddle\build>ninja
[9/2597] Performing build step for 'extern_openblas'
ninja: no work to do.
[11/2597] Performing install step for 'extern_openblas'
-- Install configuration: "Release"
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/lib/openblas.lib
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/bin/openblas.dll
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/include/openblas/openblas_config.h
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/include/openblas/f77blas.h
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/include/openblas/cblas.h
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/share/cmake/OpenBLAS/OpenBLASConfig.cmake
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/share/cmake/OpenBLAS/OpenBLASConfigVersion.cmake
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/share/cmake/OpenBLAS/OpenBLASTargets.cmake
-- Installing: C:/_/code/Paddle/build/third_party/install/openblas/share/cmake/OpenBLAS/OpenBLASTargets-release.cmake
[0/1] Install the project...
[13/2597] Performing build step for 'extern_warpctc'
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.24/Modules/FindCUDA.cmake:690 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  CMakeLists.txt:13 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- cuda found TRUE
-- Torch found
-- Building shared library with GPU support
-- NVCC_ARCH_FLAGS -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75
-- Configuring done
-- Generating done
-- Build files have been written to: C:/_/code/Paddle/build/third_party/warpctc/src/extern_warpctc-build
[0/1] Re-running CMake...
ninja: no work to do.
[15/2597] Building CXX object paddle\fluid\inference\utils\CMakeFiles\table_printer.dir\table_printer.cc.obj
FAILED: paddle/fluid/inference/utils/CMakeFiles/table_printer.dir/table_printer.cc.obj
C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DCUDA_TOOLKIT_ROOT_DIR="\"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2\"" -DCUDA_VERSION_MAJOR=\"10\" -DCUDA_VERSION_MINOR=\"2\" -DCUDNN_MAJOR_VERSION=\"8\" -DEIGEN_STRONG_INLINE=inline -DEIGEN_USE_GPU -DGOOGLE_GLOG_DLL_DECL="" -DNOMINMAX -DPADDLE_DISABLE_PROFILER -DPADDLE_DLL_EXPORT -DPADDLE_DLL_INFERENCE -DPADDLE_NO_PYTHON -DPADDLE_ON_INFERENCE -DPADDLE_USE_OPENBLAS -DPADDLE_VERSION=0.0.0 -DPADDLE_VERSION_INTEGER=0 -DPADDLE_WITH_AVX -DPADDLE_WITH_CRYPTO -DPADDLE_WITH_CUDA -DPADDLE_WITH_POCKETFFT -DPADDLE_WITH_SSE3 -DTHRUST_IGNORE_CUB_VERSION_CHECK -DTRT_PLUGIN_FP16_AVALIABLE -DUTF8PROC_STATIC -D_XKEYCHECK_H -IC:\_\code\Paddle\build -IC:\_\code\Paddle\paddle\fluid\framework\io -IC:\_\code\Paddle\patches\thrust -IC:\_\code\Paddle\build\third_party\install\zlib\include -IC:\_\code\Paddle\build\third_party\install -IC:\_\code\Paddle\build\third_party\install\gflags\include -IC:\_\code\Paddle\build\third_party\install\glog\include -IC:\_\code\Paddle\build\third_party\eigen3\src\extern_eigen3 -IC:\_\code\Paddle\build\third_party\threadpool\src\extern_threadpool -IC:\_\code\Paddle\build\third_party\dlpack\src\extern_dlpack\include -IC:\_\code\Paddle\build\third_party\install\xxhash\include -IC:\_\code\Paddle\build\third_party\install\warpctc\include -IC:\_\code\Paddle\build\third_party\install\utf8proc\include -IC:\_\code\Paddle\build\third_party\install\openblas\include\openblas -IC:\_\code\Paddle\build\third_party\install\protobuf\include -IC:\_\code\Paddle\build\third_party\cub\src\extern_cub -IC:\_\code\Paddle\build\third_party\install\cryptopp\include -IC:\_\code\Paddle\build\third_party\pocketfft\src -IC:\_\code\Paddle\build\third_party\dirent\src\extern_dirent\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" -IC:\_\code\Paddle -IC:\_\code\Paddle\build\..\paddle\fluid\framework\io /w /wd4068 /wd4129 /wd4244 /wd4267 /wd4297 /wd4530 /wd4577 /wd4819 /wd4838 /arch:AVX /MT /O2 /Ob2 /DNDEBUG /bigobj /Zc:inline -std:c++14 /showIncludes /Fopaddle\fluid\inference\utils\CMakeFiles\table_printer.dir\table_printer.cc.obj /Fdpaddle\fluid\inference\utils\CMakeFiles\table_printer.dir\table_printer.pdb /FS -c C:\_\code\Paddle\paddle\fluid\inference\utils\table_printer.cc
C:\_\code\Paddle\paddle\fluid\inference\utils\table_printer.cc(22): fatal error C1083: Cannot open include file: 'sys/ioctl.h': No such file or directory
[20/2597] Performing configure step for 'extern_protobuf'
ninja: build stopped: subcommand failed.

C:\_\code\Paddle\build>

其他补充信息 Additional Supplementary Information

No response

paddle-bot[bot] commented 1 year ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

sdcb commented 1 year ago

it seems related to VS2019

ccrrong commented 1 year ago

it seems related to VS2019

when CUDA<11.2, please use VS2017

sdcb commented 1 year ago

Close because found the root cause reason.

maobaoqi commented 1 year ago

Close because found the root cause reason.

Hello, how to do ?

dfaqw commented 1 year ago

一模一样的报错,请问解决了吗