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

CMake Error at CMakeLists.txt:2 (project): Running 'nmake' '-?' failed with: The system cannot find the file specified #35

Closed
athenicantiableism opened this issue Mar 17, 2023 · 7 comments

Comments

@athenicantiableism
Copy link

I get the following error on running cmake .
`CMake Error at CMakeLists.txt:2 (project):
Running

'nmake' '-?'

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
PS C:\Users[...]\OneDrive\Documents\GitHub\alpaca.cpp>`

@0xmatriksh
Copy link

[Windows] same error

@HCBlackFox
Copy link

https://stackoverflow.com/questions/69338088/error-while-configuring-cmake-project-running-nmake-failed

The solution was to append -G "MinGW Makefiles" to cmake -S . -B Build command. This worked for me, you can also try to use another variants. Just write a "cmake -G" and see full list of posible variants.

Also, there is a release for now, and you dont anymore need to buld project by yourself.

@adamjames
Copy link

I installed mingw to get mingw-make.exe, and then told cmake to use the MinGW Makefiles generator:

PS C:\Tools\alpaca\alpaca.cpp> scoop install mingw
Installing 'mingw' (12.2.0-rt_v10-rev1) [64bit] from main bucket
x86_64-12.2.0-release-posix-seh-rt_v10-rev1.7z (67.7 MB) [====================================================] 100%
Checking hash of x86_64-12.2.0-release-posix-seh-rt_v10-rev1.7z ... ok.
Extracting x86_64-12.2.0-release-posix-seh-rt_v10-rev1.7z ... done.
Linking ~\scoop\apps\mingw\current => ~\scoop\apps\mingw\12.2.0-rt_v10-rev1
Running post_install script...
'mingw' (12.2.0-rt_v10-rev1) was installed successfully!

PS C:\Tools\alpaca\alpaca.cpp> cmake . -G "MinGW Makefiles"
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Adam/scoop/apps/mingw/current/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/Adam/scoop/apps/mingw/current/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR: AMD64
-- x86 detected
-- Configuring done (2.1s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Tools/alpaca/alpaca.cpp
PS C:\Tools\alpaca\alpaca.cpp>

@mundahl
Copy link

mundahl commented Mar 19, 2023

adamjames's step helped me! if you don't have scoop yet installed, like me, call the following in Windows PowerShell

iwr -useb get.scoop.sh | iex

Such as:

PS C:\repo\AI\llm\alpaca\antimatter15\alpaca.cpp> iwr -useb get.scoop.sh | iex Initializing... Downloading ... Creating shim... Adding ~\scoop\shims to your path. Scoop was installed successfully! Type 'scoop help' for instructions.

@hjude
Copy link

hjude commented Mar 19, 2023

In this case for installation you should use it in Developer Command Prompt window (Developer Command Prompt for VS 2022), you can find it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools.

  1. Remove old alpaca.cpp folder
  2. Reinstall using Developer Command Prompt for VS 2022

@athenicantiableism
Copy link
Author

athenicantiableism commented Mar 21, 2023

It seems I didn't have Visual Studio installed. I was just following main page install instructions (github.com/antimatter15/alpaca.cpp) and they didn't mention that requirement. However, many thanks! It seems the code works after installing VS (Visual Studio).

@parabath
Copy link

C:\Users\kumar\Documents\vk_raytracing_tutorial_KHR-master\ray_tracing_animation>cmake ..
CMake Error at CMakeLists.txt:2 (project):
Running

'nmake' '-?'

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

This is my Problem
I can.t slow it
This is my web
http://wppsk.epizy.com/?i=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants