Windows编译出现错误
问题描述 Issue Description
windows编译过程中报错,错误信息如下,编译CPU版本和GPU版本一样错误:
[647/1726] Building CXX object paddle\fluid\operators\CMakeFiles\matmul_v2_op.dir\matmul_v2_op.cc.obj
FAILED: paddle/fluid/operators/CMakeFiles/matmul_v2_op.dir/matmul_v2_op.cc.obj
C:\PROGRA~2\MICROS~4\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\cl.exe /nologo /TP -DBOOST_HAS_STATIC_ASSERT -DEIGEN_STRONG_INLINE=inline -DGOOGLE_GLOG_DLL_DECL="" -DHPPL_STUB_FUNC -DLAPACK_FOUND -DPADDLE_DISABLE_PROFILER -DPADDLE_DLL_EXPORT -DPADDLE_DLL_INFERENCE -DPADDLE_VERSION=0.0.0 -DPADDLE_VERSION_INTEGER=0 -DPADDLE_WITH_AVX -DPADDLE_WITH_CRYPTO -DPADDLE_WITH_MKLDNN -DPADDLE_WITH_MKLML -DPADDLE_WITH_POCKETFFT -DPADDLE_WITH_SSE3 -DUTF8PROC_STATIC -D_XKEYCHECK_H -I. -I..\paddle\fluid\framework\io -Ithird_party\install\zlib\include -Ithird_party\install -Ithird_party\install\gflags\include -Ithird_party\install\glog\include -Ithird_party\boost\src\extern_boost -Ithird_party\eigen3\src\extern_eigen3 -Ithird_party\threadpool\src\extern_threadpool -Ithird_party\dlpack\src\extern_dlpack\include -Ithird_party\install\xxhash\include -Ithird_party\install\warpctc\include -Ithird_party\install\utf8proc\include -Ithird_party\install\mklml\include -Ithird_party\install\mkldnn\include -Ithird_party\install\protobuf\include -IC:\Python37\include -IC:\Python37\Lib\site-packages\numpy\core\include -Ithird_party\pybind\src\extern_pybind\include -Ithird_party\install\cryptopp\include -Ithird_party\pocketfft\src -I..\ /DWIN32 /D_WINDOWS /W0 /GR /EHsc /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\operators\CMakeFiles\matmul_v2_op.dir\matmul_v2_op.cc.obj /Fdpaddle\fluid\operators\CMakeFiles\matmul_v2_op.dir\matmul_v2_op.pdb /FS -c ..\paddle\fluid\operators\matmul_v2_op.cc
Unknown compiler version - please run the configure tests and report the results
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2589: '(': illegal token on right side of '::'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2144: syntax error: 'unknown-type' should be preceded by ')'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2661: 'std::vector<Eigen::DenseIndex,std::allocator<_Ty>>::push_back': no overloaded function takes 0 arguments
with
[
_Ty=Eigen::DenseIndex
]
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2144: syntax error: 'unknown-type' should be preceded by ';'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2131: expression did not evaluate to a constant
..\paddle\fluid\operators\matmul_v2_op.cc(80): note: failure was caused by a read of a variable outside its lifetime
..\paddle\fluid\operators\matmul_v2_op.cc(80): note: see usage of 'i'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2143: syntax error: missing ')' before '>'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2143: syntax error: missing ';' before '>'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2059: syntax error: '>'
..\paddle\fluid\operators\matmul_v2_op.cc(80): error C2059: syntax error: ')'
版本&环境信息 Version & Environment Information
- PaddlePaddle 2.2.2
- Windows 10
- CUDA 10.2
- CUDNN 7.6.5
- VS 2017
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
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 API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
能否使用pip直接安装呢?
你好,请参考 issue #42066 解决。
能否使用pip直接安装呢?
@RainFrost1 直接pip安装缺失DLL库
你好,请参考 issue https://github.com/PaddlePaddle/Paddle/issues/42066 解决。
我试试
你好,现在Paddle已经有编译好的安装包了,请问你在什么任务场景下需要编译Paddle呀?比如是需要新增算子、还是需要修改飞桨源代码,或者有什么其他的用途呢?
@yang131313 如直接安装,会这样子:
Error: Can not import avx core while this file exists: C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core_avx.pyd
Traceback (most recent call last):
File "", line 3, in <module>
import paddle
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\__init__.py", line 25, in <module>
from .fluid import monkey_patch_variable
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\__init__.py", line 36, in <module>
from . import framework
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 37, in <module>
from . import core
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core.py", line 294, in <module>
raise e
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core.py", line 256, in <module>
from .core_avx import *
ImportError: DLL load failed: 找不到指定的程序。
按照这个文档按照试试呢?https://www.paddlepaddle.org.cn/documentation/docs/zh/install/pip/windows-pip.html @yeyupiaoling
@RainFrost1 还是一样的。各种方式都试过了,pip,conda。cpu版本,gpu版本,noavx, avx 都试过。1.8版本,2.1版本,2.1版本
源码编译成功了,但是安装还是出现
Error: Can not import avx core while this file exists: C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core_avx.pyd
Traceback (most recent call last):
File "", line 3, in <module>
import paddle
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\__init__.py", line 25, in <module>
from .fluid import monkey_patch_variable
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\__init__.py", line 36, in <module>
from . import framework
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\framework.py", line 37, in <module>
from . import core
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core.py", line 294, in <module>
raise e
File "C:\Anaconda3\envs\PaddlePaddle\lib\site-packages\paddle\fluid\core.py", line 256, in <module>
from .core_avx import *
ImportError: DLL load failed: 找不到指定的程序。