Unsolved error: [rec_cuda.o] Error 2 "....\mingw32-make.exe" exited with code 2"
-
Hello all,
I am a beginner in QT and trying to develop some small applications in the current phase. My senior gave me one of his codes to work on. However, I am getting the following error while running.The project is loaded correctly (after removing the '.pro.user' file). However, the smaller application I am building is not showing any such error.
11:41:26: Running steps for project MGA-GUI... 11:41:26: Configuration unchanged, skipping qmake step. 11:41:26: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" -j4 C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'C:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/build-MGA-GUI-Desktop_Qt_5_9_9_MinGW_32bit-Debug' C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\mainwindow.ui -o ui_mainwindow.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\recomb.ui -o ui_recomb.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\singanalysis.ui -o ui_singanalysis.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\spottrap.ui -o ui_spottrap.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\englimits.ui -o ui_englimits.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\indexuser.ui -o ui_indexuser.h C:\Qt\5.9.9\mingw53_32\bin\uic.exe ..\MGA-final-release\frames.ui -o ui_frames.h /usr//bin/nvcc -D_DEBUG --use_fast_math -I"/usr/local/include/opencv" -I"/home/tosson/Desktop/root/include" -I"/usr/local/include/" -I"C:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/MGA-final-release/../root/include" -I"C:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/MGA-final-release/../root/include" -I"/usr//include" --machine 64 -arch=sm_21 -c -o rec_cuda.o ..\MGA-final-release\rec.cu Makefile.Debug:232: recipe for target 'rec_cuda.o' failed process_begin: CreateProcess(NULL, sh.exe -c "/usr//bin/nvcc -D_DEBUG --use_fast_math -I/usr/local/include/opencv -I/home/tosson/Desktop/root/include -I/usr/local/include/ -IC:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/MGA-final-release/../root/include -IC:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/MGA-final-release/../root/include -I/usr//include --machine 64 -arch=sm_21 -c -o rec_cuda.o ..\MGA-final-release\rec.cu", ...) failed. make (e=2): The system cannot find the file specified. mingw32-make[1]: *** [rec_cuda.o] Error 2 mingw32-make[1]: *** Waiting for unfinished jobs.... mingw32-make[1]: Leaving directory 'C:/Users/ayush/Downloads/MGA-final-release -20200321T183318Z-001/build-MGA-GUI-Desktop_Qt_5_9_9_MinGW_32bit-Debug' Makefile:36: recipe for target 'debug' failed mingw32-make: *** [debug] Error 2 11:41:29: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2. Error while building/deploying project MGA-GUI (kit: Desktop Qt 5.9.9 MinGW 32bit) When executing step "Make"
It appears that the system cannot find one of the files specified. However, not sure if there is some issue with MingW or not.
Thanks -
Hi and welcome to devnet,
Do you have CUDA properly setup to build that project ?
-
Hi SGaist. Sorry if my explanations lack experience here.
However, I tried installing NVIDIA CUDA toolkit 10.2
Should that be enough to properly setup CUDA? Do I need to add something in my .pro file?Thanks
Here is my .pro file (if necessary)
#------------------------------------------------- # # Project created by QtCreator 2018-02-20T14:33:13 # #------------------------------------------------- QT += core gui opengl QT += network QT += opengl QMAKE_CXXFLAGS += -std=c++14 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport TARGET = MGA-GUI TEMPLATE = app INCLUDEPATH += /usr/local/include/opencv /home/tosson/Desktop/root/include /usr/local/include/ LIBS += -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui -L/usr/local/lib/ -lhpdf $$system(root-config --glibs) $$system(root-config --libs --cflags) LIBS += -lglut -lGLU SOURCES += main.cpp\ mainwindow.cpp \ recomb.cpp \ qcustomplot.cpp \ singanalysis.cpp \ maianalysis.cpp \ spottrap.cpp \ qq.cpp \ spottrapped.cpp \ energyspectrumauto.cpp \ matrial.cpp \ englimits.cpp \ indexuser.cpp \ livestream.cpp \ frames.cpp \ gpuconnect.cpp \ parsoptimization.cpp \ progress.cpp \ unitcell.cpp \ baseclass.cpp \ dialog.cpp \ maincal.cpp \ glwidget.cpp \ analysisequation.cpp \ rings.cpp OTHER_FILES += rec.cu \ HEADERS += mainwindow.h \ recomb.h \ qcustomplot.h \ singanalysis.h \ maianalysis.h \ spottrap.h \ qq.h \ spottrapped.h \ energyspectrumauto.h \ matrial.h \ englimits.h \ indexuser.h \ livestream.h \ frames.h \ gpuconnect.h \ parsoptimization.h \ progress.h \ pixelstype.h \ spotstypy.h \ unitcell.h \ baseclass.h \ conv_pixel.h \ dialog.h \ pointtype.h \ analysisequation.h \ rings.h \ glwidget.h FORMS += mainwindow.ui \ recomb.ui \ singanalysis.ui \ spottrap.ui \ englimits.ui \ indexuser.ui \ frames.ui \ RESOURCES += \ pics.qrc win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../root/lib/release/ -lGraf3d else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../root/lib/debug/ -lGraf3d else:unix: LIBS += -L$$PWD/../root/lib/ -lGraf3d INCLUDEPATH += $$PWD/../root/include DEPENDPATH += $$PWD/../root/include win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../root/lib/release/ -lSpectrum else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../root/lib/debug/ -lSpectrum else:unix: LIBS += -L$$PWD/../root/lib/ -lSpectrum INCLUDEPATH += $$PWD/../root/include DEPENDPATH += $$PWD/../root/include DEPENDPATH += /usr/local/lib CUDA_SOURCES += rec.cu CUDA_SDK = "/usr/" # Path to cuda SDK install CUDA_DIR = "/usr/" # Path to cuda toolkit install # DO NOT EDIT BEYOND THIS UNLESS YOU KNOW WHAT YOU ARE DOING.... SYSTEM_NAME = unix # Depending on your system either 'Win32', 'x64', or 'Win64' SYSTEM_TYPE = 64 # '32' or '64', depending on your system CUDA_ARCH = sm_21 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10' NVCC_OPTIONS = --use_fast_math # include paths INCLUDEPATH += $$CUDA_DIR/include # library directories QMAKE_LIBDIR += $$CUDA_DIR/lib/ CUDA_OBJECTS_DIR = ./ # Add the necessary libraries CUDA_LIBS = -lcuda -lcudart # The following makes sure all path names (which often include spaces) are put between quotation marks CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"') #LIBS += $$join(CUDA_LIBS,'.so ', '', '.so') LIBS += $$CUDA_LIBS # Configuration of the Cuda compiler CONFIG(debug, debug|release) { # Debug mode cuda_d.input = CUDA_SOURCES cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} cuda_d.dependency_type = TYPE_C QMAKE_EXTRA_COMPILERS += cuda_d } else { # Release mode cuda.input = CUDA_SOURCES cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} cuda.dependency_type = TYPE_C QMAKE_EXTRA_COMPILERS += cuda } DISTFILES += \ ../streaking/report_Nickel.pdf \ ../streaking/report_Aluminum.pdf \ ../streaking/pole22.jpg \ ../streaking/pole2.jpg \ ../streaking/pole.jpg \ ../streaking/img.jpg \ ../streaking/convimg.jpg \ ../streaking/333.jpg \ ../streaking/3D33_img.jpg \ ../streaking/3D_img2.jpg \ ../streaking/3D_img1.jpg \ ../streaking/3D_img.jpg \ ../streaking/pole2.png \ ../streaking/pole.png