Reputation: 697
Yesterday i was able to configure and compile my project without any issues. Now i did some system updates and the compiler isn't able to pass the check. I'm stuck there for hours now-
I'm running windows 10 with the current MSYS2 installed. Packages are up to date. When i check with --debug-trycompile i see the testCCompiler.c file is created and there is also an executable which i can run without any problems. Therefore i have no clue what exactly is causing this error.
When i go to the directory and execute the exact same command, it is working too.
[cmake] Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
[cmake] Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe -- broken
[cmake] CMake Error at C:/msys64/mingw64/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
[cmake] The C compiler
[cmake]
[cmake] "C:/msys64/mingw64/bin/gcc.exe"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: C:/Users/bscb/Documents/code/MachineLearning/build/CMakeFiles/CMakeTmp
[cmake]
[cmake] Run Build Command(s):C:/Ninja/ninja.exe cmTC_aef7d && [1/2] Building C object CMakeFiles/cmTC_aef7d.dir/testCCompiler.c.obj
[cmake] [2/2] Linking C executable cmTC_aef7d.exe
[cmake] FAILED: cmTC_aef7d.exe
[cmake] cmd.exe /C "cd . && C:\msys64\mingw64\bin\gcc.exe CMakeFiles/cmTC_aef7d.dir/testCCompiler.c.obj -o cmTC_aef7d.exe -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[cmake] Das System kann den angegebenen Pfad nicht finden.
[cmake] ninja: build stopped: subcommand failed.
Upvotes: 1
Views: 745
Reputation: 697
Solution was that there was an init script for cmd.exe created by conda which linked to a non existing batch file.
Upvotes: 1