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

Cannot run test compile #21

Open
djsmith1000 opened this issue Aug 8, 2024 · 1 comment
Open

Cannot run test compile #21

djsmith1000 opened this issue Aug 8, 2024 · 1 comment

Comments

@djsmith1000
Copy link

djsmith1000 commented Aug 8, 2024

I am unable to compile any model on Windows. It looks like it fails to run the test compile. Output below. I can compile on linux in a docker container, but have tried two different windows machines with VS 2017 and 2019 with the desktop C++ packages installed and it won't compile. I've played with paths extensively, trying 32 and 64 bit compiler versions.

Help please!

-- The C compiler identification is MSVC 19.16.27027.1
-- The CXX compiler identification is MSVC 19.16.27027.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - broken
-- Configuring incomplete, errors occurred!
CMake Error at C:/Users/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/Users/AppData/Local/Programs/Python/Python311/Lib/site-packages/__pycache__/pysimlink/simple_compile_test/build/CMakeFiles/CMakeScratch/TryCompile-ox8ssx'

Run Build Command(s): C:/Users/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/cmake.exe -E env VERBOSE=1 nmake -f Makefile /nologo cmTC_3facb\fast
	"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe"  -f CMakeFiles\cmTC_3facb.dir\build.make /nologo -L                  CMakeFiles\cmTC_3facb.dir\build
Building C object CMakeFiles/cmTC_3facb.dir/testCCompiler.c.obj
	C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\cmake\data\bin\cmake.exe -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_3facb.dir\testCCompiler.c.obj.d --working-dir=C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\__pycache__\pysimlink\simple_compile_test\build\CMakeFiles\CMakeScratch\TryCompile-ox8ssx --filter-prefix="Note: including file: " -- C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1416~1.270\bin\Hostx86\x86\cl.exe @C:\Users\AppData\Local\Temp\nmA978.tmp
testCCompiler.c
Linking C executable cmTC_3facb.exe
	C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\cmake\data\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_3facb.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1416~1.270\bin\Hostx86\x86\link.exe /nologo @CMakeFiles\cmTC_3facb.dir\objects1.rsp @C:\Users\AppData\Local\Temp\nmA9C7.tmp
Visual Studio Incremental Link with embedded manifests
Create CMakeFiles\cmTC_3facb.dir/manifest.rc
Create empty: CMakeFiles\cmTC_3facb.dir/embed.manifest
RC Pass 1:
rc /fo CMakeFiles\cmTC_3facb.dir/manifest.res CMakeFiles\cmTC_3facb.dir/manifest.rc
RC Pass 1: command "rc /fo CMakeFiles\cmTC_3facb.dir/manifest.res CMakeFiles\cmTC_3facb.dir/manifest.rc" failed (exit code 0) with the following output:
no such file or directoryNMAKE : fatal error U1077: 'C:\Users\AppData\Local\Programs\Python\Python311\Lib\site-packages\cmake\data\bin\cmake.exe' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe"' : return code '0x2'
Stop.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)

@lharri73
Copy link
Owner

lharri73 commented Aug 8, 2024

This is an environment issue (or a bug for the cmake python package).
Some things you can try:

  • Delete the pycache folder that it's putting the cmake cache in (C:\Users\hj397\AppData\Local\Programs\Python\Python311\Lib\site-packages\__pycache__\)
  • Delete any local pycache folders
  • log out and back in (not lock). This makes path changes take effect on Windows.
  • make sure rc.exe is on the path (run where rc.exe). also nmake. If you installed VS, it should be.

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

2 participants