Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017 build Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. #1442

Closed
leekwunfung817 opened this issue Aug 19, 2018 · 18 comments
Labels
Solved The problem is solved using the correct settings

Comments

@leekwunfung817
Copy link

leekwunfung817 commented Aug 19, 2018

When build darknet.exe from darknet.sln, I have only 1 bug to solve.
I am using Visual Studio 2017 and OpenCV 3.3.0.

Path:

  • Not found file: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\cl.exe
  • Build Source: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 9.0.targets

I don't understand the purpose of cl.exe

  1. What is this?
  2. What matter it is?
  3. How to get it or install it?

I don't understand the purpose of CUDA 9.0.targets

  1. Is that related to cuda or visual studio version?
  2. What is this?

image

Python Environments:
Anaconda 5.2.0 (3.6, 64-bit)

Error Information:
Error MSB6003

The specified task executable "cl.exe" could not be run.
The system cannot find the file specified

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations

CUDA 9.0.targets Line 428 Build

@leekwunfung817 leekwunfung817 changed the title Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. build darknet.exe from darknet.sln. Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. Aug 19, 2018
@leekwunfung817 leekwunfung817 changed the title build darknet.exe from darknet.sln. Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. Aug 19, 2018
@leekwunfung817 leekwunfung817 changed the title Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. Visual Studio build Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. Aug 19, 2018
@leekwunfung817 leekwunfung817 changed the title Visual Studio build Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. Visual Studio 2017 build Error MSB6003: The specified task executable "cl.exe" could not be run. The system cannot find the file specified. When build darknet.exe from darknet.sln. Aug 19, 2018
@AlexeyAB
Copy link
Owner

@leekwunfung817
Copy link
Author

leekwunfung817 commented Aug 19, 2018

1. Try to build x64 & Release

  • I have been try. The above method is not working. The Error is the same.
  • Thank you that you tell me build in x64

2. Do you set check for CUDA 9.1 in the: \darknet.sln -> (right click on project) -> Build Dependecies ?
The CUDA 9.1 have been set.

  • Thank you that you tell me the CUDA 9.1 and Build Dependecies
  • I have been try. The above method is not working. The Error is the same.
    image

MSB6003 The specified task executable "cl.exe" could not be run. The system cannot find the file specified darknet 1 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 9.1.targets 428 Build

3. What CUDA version do you use?

  • CUDA 9.0
  • After this, I try 9.1

4. Try this: https://stackoverflow.com/questions/8125826/error-compiling-cuda-from-command-prompt

  • I have no cl.exe in my whole C drive (use file explorer search)

image

@AlexeyAB
Copy link
Owner

  • Can you build darknet_no_gpu.sln successfully?

  • What is the path to your Darknet directory?

  • Visual Studio 2017 doesn't install C++ by default. You have to rerun the setup, select Modify and then check Programming Language -> C++
    (Then you can also run vcvars32.bat from there to set up your environment.)

  • It should be somewhere like there: C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\bin\cl.exe

@leekwunfung817
Copy link
Author

Problem solved

Using the following tutorial
#1455 (comment)

@AlexeyAB AlexeyAB added the Solved The problem is solved using the correct settings label Sep 3, 2018
@koutini
Copy link

koutini commented Mar 8, 2019

Hello, thanks for the tutorial. i get 11 errors with the same description :
Severity Code Description Project File Line Suppression State
Error MSB3721 The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\bin\nvcc.exe" -gencode=arch=compute_30,code="sm_30,compute_30" -gencode=arch=compute_75,code="sm_75,compute_75" --use-local-env --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64" -IC:\opencv_3.0\opencv\build\include\opencv2 -IC:\opencv_3.0\opencv\build\include\opencv -IC:\opencv_3.0\opencv\build\include -I....\include -I....\3rdparty\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\include" -I\include -I\include -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DOPENCV -DCUDNN -D_TIMESPEC_DEFINED -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_CRT_RAND_S -DGPU -DWIN32 -DNDEBUG -D_CONSOLE -D_LIB -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /FS /Zi /MD " -o x64\Release\convolutional_kernels.cu.obj "C:\Users\assus\darknet\src\convolutional_kernels.cu"" exited with code 1. darknet C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 8.0.targets 689

can you help me please ??

@AlexeyAB
Copy link
Owner

AlexeyAB commented Mar 8, 2019

@koutini Try to compile darknet by using Cmake.

@koutini
Copy link

koutini commented Mar 8, 2019 via email

@AlexeyAB
Copy link
Owner

AlexeyAB commented Mar 8, 2019

@koutini

  • Rename this file to cmd-file: run_cmake.cmd.txt and put to the Darknet directory
  • Run run_cmake.cmd
  • Press Configure
  • Set MSVS 15 or 17 (and x64 in the Optional platform for generator)
  • Press Finish
  • Press Generate
  • Press Open Project
  • Set Release in the opened MSVS
  • in the MSVS press: Build -> Build solution

@koutini
Copy link

koutini commented Mar 8, 2019

i get this error : project file invalid Cmake -gui what i set in "where is the code source" ??

@koutini
Copy link

koutini commented Mar 8, 2019

now i get one error : Severity Code Description Project File Line Suppression State
Error MSB3191 Unable to create directory "darknet.dir\Release\C:\Users\assus\darknet\src". The given path's format is not supported. darknet C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 8.0.targets 420

@AlexeyAB
Copy link
Owner

AlexeyAB commented Mar 8, 2019

@koutini Can you show fullscreen screenshot of this error?

@koutini
Copy link

koutini commented Mar 8, 2019

image

@AlexeyAB
Copy link
Owner

AlexeyAB commented Mar 8, 2019

@koutini Thanks!

  • What MSVS version do you use?
  • And what CUDA version do you use?

@koutini
Copy link

koutini commented Mar 8, 2019

VS 2015 and cuda 8.0

@AlexeyAB
Copy link
Owner

AlexeyAB commented Mar 8, 2019

@koutini
It seems you have installed MSVS after CUDA. You MSVS doesn't have nsight plugin as I see on screenshot.

Try to reinstall CUDA 8.0, or better install CUDA 10.0 https://developer.nvidia.com/cuda-downloads

@koutini
Copy link

koutini commented Mar 8, 2019

image
i have nsight and yes i update MSVS after CUDA

@koutini
Copy link

koutini commented Mar 8, 2019

okey thank you so much i will try to use CUDA10

@koutini
Copy link

koutini commented Mar 9, 2019

it's work thank you so much for helping

@cenit cenit closed this as completed Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solved The problem is solved using the correct settings
Projects
None yet
Development

No branches or pull requests

4 participants