MEX Build Failed "Build error: C++ compiler produced errors."
古いコメントを表示
I'm currenty trying to follow the tutorial supplied by MathWorks to use GPU Coder and I keep receiving "MEX Build Failed" Errors. Below is the build log:
[1/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_data.cu -o build\win64\mandelbrot_count_data.obj
FAILED: build/win64/mandelbrot_count_data.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_data.cu -o build\win64\mandelbrot_count_data.obj
CreateProcess failed: The system cannot find the file specified.
[2/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
FAILED: build/win64/rt_nonfinite.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
CreateProcess failed: The system cannot find the file specified.
[3/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_terminate.cu -o build\win64\mandelbrot_count_terminate.obj
FAILED: build/win64/mandelbrot_count_terminate.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_terminate.cu -o build\win64\mandelbrot_count_terminate.obj
CreateProcess failed: The system cannot find the file specified.
[4/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count.cu -o build\win64\mandelbrot_count.obj
FAILED: build/win64/mandelbrot_count.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count.cu -o build\win64\mandelbrot_count.obj
CreateProcess failed: The system cannot find the file specified.
[5/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_initialize.cu -o build\win64\mandelbrot_count_initialize.obj
FAILED: build/win64/mandelbrot_count_initialize.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" mandelbrot_count_initialize.cu -o build\win64\mandelbrot_count_initialize.obj
CreateProcess failed: The system cannot find the file specified.
[6/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_mex.cu -o build\win64\_coder_mandelbrot_count_mex.obj
FAILED: build/win64/_coder_mandelbrot_count_mex.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_mex.cu -o build\win64\_coder_mandelbrot_count_mex.obj
CreateProcess failed: The system cannot find the file specified.
[7/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
FAILED: build/win64/cpp_mexapi_version.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
CreateProcess failed: The system cannot find the file specified.
[8/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_api.cu -o build\win64\_coder_mandelbrot_count_api.obj
FAILED: build/win64/_coder_mandelbrot_count_api.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_api.cu -o build\win64\_coder_mandelbrot_count_api.obj
CreateProcess failed: The system cannot find the file specified.
[9/10] nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_info.cu -o build\win64\_coder_mandelbrot_count_info.obj
FAILED: build/win64/_coder_mandelbrot_count_info.obj
nvcc -c -rdc=true -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -I "." -I "C:\Users\matth\OneDrive\Desktop\Test" -I ".\interface" -I "C:\Program Files\MATLAB\R2020b\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=mandelbrot_count_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Program Files\MATLAB\R2020b/simulink/include" -I "C:\Program Files\MATLAB\R2020b/toolbox/shared/simtargets" interface\_coder_mandelbrot_count_info.cu -o build\win64\_coder_mandelbrot_count_info.obj
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
??? Build error: C++ compiler produced errors. See the Build Log
for further details.
Code generation failed: View Error Report
Thank you for all the help!
5 件のコメント
Walter Roberson
2021 年 1 月 25 日
Are you in a directory where you do not have permission to create subdirectory build and build\win64 ?
Matthew Currie
2021 年 1 月 25 日
編集済み: Matthew Currie
2021 年 1 月 25 日
Walter Roberson
2021 年 1 月 26 日
編集済み: Walter Roberson
2021 年 1 月 26 日
Desktop should generally be okay.
It might plausibly help to create build\ and build\win64\ folders ahead of time in the directory.
David Fink
2021 年 2 月 8 日
If changing to other writeable folders results in the same issue, please reach out to MathWorks Technical Support.
Marin Genov
2021 年 8 月 30 日
編集済み: Marin Genov
2021 年 8 月 30 日
I just found out about this post. It appears that I am having the same issue with R2021a. Was the problem ever resolved? And if yes, what was the solution?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with GPU Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!