MEX Build Failed "Build error: C++ compiler produced errors."

3 views (last 30 days)
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 Comments
David Fink
David Fink on 8 Feb 2021
If changing to other writeable folders results in the same issue, please reach out to MathWorks Technical Support.
Marin Genov
Marin Genov on 30 Aug 2021
Edited: Marin Genov on 30 Aug 2021
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?

Sign in to comment.

Answers (0)

Categories

Find more on Get Started with GPU Coder in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!