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

Unusable MinGW Makefiles generator specified in cmake kit #3125

Closed
tehKaiN opened this issue Apr 21, 2023 · 6 comments
Closed

Unusable MinGW Makefiles generator specified in cmake kit #3125

tehKaiN opened this issue Apr 21, 2023 · 6 comments
Assignees
Labels
bug a bug in the product Feature: kits
Milestone

Comments

@tehKaiN
Copy link

tehKaiN commented Apr 21, 2023

Brief Issue Summary

consider following kit definition:

  {
    "name": "GCC for arm-none-eabi 10.3 2021.10",
    "compilers": {
      "CXX": "C:\\prg\\kompilatory\\gcc-arm-none-eabi-10.3-2021.10\\bin\\arm-none-eabi-g++.exe",
      "C": "C:\\prg\\kompilatory\\gcc-arm-none-eabi-10.3-2021.10\\bin\\arm-none-eabi-gcc.exe"
    },
    "preferredGenerator": {
      "name": "MinGW Makefiles"
    },
    "cmakeSettings": {
      "CMAKE_SIZE": "C:\\prg\\kompilatory\\gcc-arm-none-eabi-10.3-2021.10\\bin\\arm-none-eabi-size",
      "CMAKE_SYSTEM_NAME": "Generic",
      "CMAKE_SYSTEM_PROCESSOR": "arm",
      "CMAKE_TRY_COMPILE_TARGET_TYPE": "STATIC_LIBRARY",
      "OPENOCD": "C:\\prg\\kompilatory\\OpenOCD-20230202-0.12.0\\bin\\openocd.exe"
    },
    "keep": true
  },

on selecting the kit I get in the output window:

[driver] Switching to kit: GCC for arm-none-eabi 10.3 2021.10
[proc] Executing command: C:\prg\kompilatory\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-gcc.exe -v
[proc] The command: mingw32-make --version failed with error: Error: spawn mingw32-make ENOENT
[main] Configuring project: firmware2 
[rollbar] Unhandled exception: Unhandled Promise rejection: selectKit Error: Cannot configure: No kit is active for this CMake project {}

on earlier extension versions (< 1.14) it worked without problems. Additionally, typing where mingw32-make in vscode's command prompt finds the executable without problems.

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.77.3",
  "cmtVersion": "1.14.30",
  "configurations": [
    {
      "folder": "c:\\prg\\_hk\\firmware2",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": null
    }
  ]
}

Debug Log

[main] Starting new CMake driver
[main] Starting CMake driver
[cmakefileapi-driver] Creating instance of CMakeFileApiDriver
[driver] Initializating base driver using kit
[kit] Testing GCC binary: C:\prg\kompilatory\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-gcc.exe
[proc] Executing command: C:\prg\kompilatory\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-gcc.exe -v
[kit] Detected GCC compiler: C:\prg\kompilatory\gcc-arm-none-eabi-10.3-2021.10\bin\arm-none-eabi-gcc.exe
[driver] CMakeDriver Kit set to GCC for arm-none-eabi 10.3 2021.10
[kit] The environment for kit 'GCC for arm-none-eabi 10.3 2021.10': {
  "ALLUSERSPROFILE": "C:\\ProgramData",
  "AMDRMPATH": "C:\\Program Files\\AMD\\RyzenMaster\\",
  "APPDATA": "C:\\Users\\tehKa\\AppData\\Roaming",
  "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
  "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\LOCAL\\crashpad_15076_PJLBNWQHQGMPRQSI",
  "COMPUTERNAME": "KN5700",
  "ComSpec": "C:\\Windows\\system32\\cmd.exe",
  "CommonProgramFiles": "C:\\Program Files\\Common Files",
  "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
  "CommonProgramW6432": "C:\\Program Files\\Common Files",
  "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
  "ELECTRON_RUN_AS_NODE": "1",
  "HOMEDRIVE": "C:",
  "HOMEPATH": "\\Users\\tehKa",
  "LOCALAPPDATA": "C:\\Users\\tehKa\\AppData\\Local",
  "LOGONSERVER": "\\\\KN5700",
  "NODE_TLS_REJECT_UNAUTHORIZED": "0",
  "NUMBER_OF_PROCESSORS": "16",
  "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
  "OS": "Windows_NT",
  "OneDrive": "D:\\usr\\OneDrive",
  "OneDriveConsumer": "D:\\usr\\OneDrive",
  "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
  "PROCESSOR_ARCHITECTURE": "AMD64",
  "PROCESSOR_IDENTIFIER": "AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD",
  "PROCESSOR_LEVEL": "25",
  "PROCESSOR_REVISION": "5000",
  "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
  "PUBLIC": "C:\\Users\\Public",
  "Path": "C:\\Program Files\\Eclipse Adoptium\\jre-17.0.3.7-hotspot\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\CMake\\bin;C:\\prg\\kompilatory\\Python36-32;C:\\prg\\tools;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\GitExtensions\\;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files\\Git\\cmd;C:\\prg\\kompilatory\\ninja;C:\\Users\\tehKa\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\tehKa\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\tehKa\\.dotnet\\tools;C:\\Users\\tehKa\\.dotnet\\tools;C:\\prg\\kompilatory\\gcc-arm-none-eabi-10.3-2021.10\\bin",
  "ProgramData": "C:\\ProgramData",
  "ProgramFiles": "C:\\Program Files",
  "ProgramFiles(x86)": "C:\\Program Files (x86)",
  "ProgramW6432": "C:\\Program Files",
  "SESSIONNAME": "Console",
  "SystemDrive": "C:",
  "SystemRoot": "C:\\Windows",
  "TEMP": "C:\\Users\\tehKa\\AppData\\Local\\Temp",
  "TMP": "C:\\Users\\tehKa\\AppData\\Local\\Temp",
  "USERDOMAIN": "KN5700",
  "USERDOMAIN_ROAMINGPROFILE": "KN5700",
  "USERNAME": "tehKa",
  "USERPROFILE": "C:\\Users\\tehKa",
  "VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
  "VSCODE_CODE_CACHE_PATH": "C:\\Users\\tehKa\\AppData\\Roaming\\Code\\CachedData\\704ed70d4fd1c6bd6342c436f1ede30d1cff4710",
  "VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
  "VSCODE_CWD": "C:\\Users\\tehKa\\AppData\\Local\\Programs\\Microsoft VS Code",
  "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
  "VSCODE_IPC_HOOK": "\\\\.\\pipe\\9a42825cb941d9dd58ae52ba67f85b8c-1.77.3-main-sock",
  "VSCODE_L10N_BUNDLE_LOCATION": "",
  "VSCODE_NLS_CONFIG": "{\"locale\":\"en\",\"osLocale\":\"pl\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
  "VSCODE_PID": "15076",
  "windir": "C:\\Windows"
}
[driver] Trying to detect generator supported by system
[proc] The command: mingw32-make --version failed with error: Error: spawn mingw32-make ENOENT
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
[main] Configuring project: firmware2 
[main] Saving open files before configure/build
[extension] [9007] cmake.configure finished (returned -1)

Additional Information

No response

@ckidder
Copy link

ckidder commented Apr 24, 2023

I'm having a similar issue. I pulled up VS Code that I compiled successfully with on the 21st and today I'm getting:
[proc] Executing command: C:\arm\bin\arm-none-eabi-gcc.exe -v [proc] The command: ninja --version failed with error: Error: spawn ninja ENOENT [proc] The command: ninja-build --version failed with error: Error: spawn ninja-build ENOENT [proc] The command: make --version failed with error: Error: spawn make ENOENT [main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found. [main] Configuring project:

if I specify "cmake.preferredGenerators": ["MSYS Makefiles"]
I get :

[proc] Executing command: C:\arm\bin\arm-none-eabi-gcc.exe -v [proc] The command: make --version failed with error: Error: spawn make ENOENT [main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found. [main] Configuring project:

I've reinstalled VS Code multiple times and blown away the cache. I've gone back to other, known good projects and have the same issue new. Here's the CMake: Diagnostics

{ "os": "win32", "vscodeVersion": "1.77.3", "cmtVersion": "1.14.30", "configurations": [ { "folder": "c:\\mrt\\products\\Infinity\\inf-firmware", "cmakeVersion": "unknown", "configured": false, "generator": "unknown", "usesPresets": false, "compilers": {} } ], "cpptoolsIntegration": { "isReady": false, "hasCodeModel": false, "activeBuildType": "", "buildTypesSeen": [], "requests": [], "responses": [], "partialMatches": [], "targetCount": 0, "executablesCount": 0, "librariesCount": 0, "targets": [] }, "settings": [ { "communicationMode": "automatic", "useCMakePresets": "auto", "configureOnOpen": null } ] }

When running cmake -G "MSYS Makefiles" CMakeLists.txt or cmake -G Ninja CMakeLists.txt from the VS Code terminal, they do not throw errors.
I'm running v1.14.30 of the cmake tools extension.

@benmcmorran
Copy link
Member

Thanks for the report! I think this is the same issue as #3136 which should be resolved by #3138.

@benmcmorran benmcmorran added bug a bug in the product Feature: kits labels Apr 25, 2023
@benmcmorran benmcmorran added this to the 1.15 milestone Apr 25, 2023
@benmcmorran
Copy link
Member

A potential fix for this issue from #3138 is now publicly available in pre-release channel extension version 1.15.3. Let us know if you're still seeing this issue in the pre-release version.

@tehKaiN
Copy link
Author

tehKaiN commented Apr 27, 2023

Works like a charm! Do you have any ETA on official release with that fix?

@benmcmorran
Copy link
Member

Glad it works! We're aggregating a few bugfixes related to the 1.14 release and should be able to push them to the official channel next week.

@benmcmorran
Copy link
Member

This should be fixed in version 1.14.31 that was just released to the marketplace.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: kits
Projects
None yet
Development

No branches or pull requests

3 participants