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

[1.4.0-beta] VS environment not set correctly #1243

Closed
bobbrow opened this issue May 15, 2020 · 9 comments
Closed

[1.4.0-beta] VS environment not set correctly #1243

bobbrow opened this issue May 15, 2020 · 9 comments
Labels
bug a bug in the product fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Milestone

Comments

@bobbrow
Copy link
Member

bobbrow commented May 15, 2020

@andreeis Now it initializes a correct cross-compiler for MSVC CMake generator, but there is an issue.

If you have "cmake.preferredGenerators": ["Ninja"], in global settings - CMake-Tools'll never initialize vcvarsall.bat. It's a bit unexpected. Shouldn't it initialize a correct environment anyway if both visualStudio and visualStudioArchitecture are present as per documentation?

Originally posted by @Minimonium in #1084 (comment)

@bobbrow
Copy link
Member Author

bobbrow commented May 15, 2020

Confirmed. We'll fix this before releasing 1.4.0

varsForVSInstallation path:'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' version:16.5.30011.22 host arch:x86 - target arch:undefined
main.js:60823
Error running C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat x86_undefined, can not found INCLUDE

@lygstate
Copy link
Contributor

same issue

[main] 正在配置文件夹: aeron 
[driver] 删除 e:/CI-Cor-Ready/xemu-rpc/aeron/build-cmake/RelWithDebInfo/CMakeCache.txt
[driver] 删除 e:\CI-Cor-Ready\xemu-rpc\aeron\build-cmake\RelWithDebInfo\CMakeFiles
[proc] 执行命令: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -He:/CI-Cor-Ready/xemu-rpc/aeron -Be:/CI-Cor-Ready/xemu-rpc/aeron/build-cmake/RelWithDebInfo -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] CMake Error at CMakeLists.txt:51 (project):
[cmake]   No CMAKE_C_COMPILER could be found.
[cmake] 
[cmake]   Tell CMake where to find the compiler by setting either the environment
[cmake]   variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
[cmake]   the compiler, or to the compiler name if it is in the PATH.
[cmake] 
[cmake] 
[cmake] CMake Error at CMakeLists.txt:51 (project):
[cmake]   No CMAKE_CXX_COMPILER could be found.
[cmake] 
[cmake]   Tell CMake where to find the compiler by setting either the environment
[cmake]   variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
[cmake]   to the compiler, or to the compiler name if it is in the PATH.
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "E:/CI-Cor-Ready/xemu-rpc/aeron/build-cmake/RelWithDebInfo/CMakeFiles/CMakeOutput.log".
[cmake] See also "E:/CI-Cor-Ready/xemu-rpc/aeron/build-cmake/RelWithDebInfo/CMakeFiles/CMakeError.log".

@andreeis andreeis added the fixed (release pending) fixed in pre-release and is pending official release label May 18, 2020
@andreeis
Copy link
Contributor

This fix is available in CMake Tools #1.4.0 which has been released.

@AndWass
Copy link

AndWass commented May 22, 2020

I am still having this issue with 1.4.0, downgrading to 1.3.1 fixes it.

@HenryAWE
Copy link

Still having the same issue, launching VS Code from VS command prompt fixes it

@andreeis
Copy link
Contributor

You shouldn't need to launch from the VS command prompt, but it's good that's a temporary workaround.
You can also try to delete the build folder and reopen your project. This fixed the configure process for all the users that upgraded to 1.4.0.
There is a migration incompatibility that we're fixing now for 1.4.1 but in the mean time I hope the above will unblock you.

@benvanik
Copy link

I'm also having issues with 1.4.0 of the fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory kind, which is new. Downgrading to 1.3.1 works. A coworker had the same issue.

@andreeis
Copy link
Contributor

andreeis commented Jun 1, 2020

@benvanik, please let me know the following: what kit you are using (which VS exactly, which host-target platforms), do you set any generator explicitly in settings. Please share the contents of your kits file right after migration (only the VS section is fine, no need to include anything else).

Then, are you able to get unblocked with using 1.4.0 after deleting the build folder, reload project and rescanning kits? Do this after you paste us the kits content.

@andreeis
Copy link
Contributor

This should be fixed in CMake Tools 1.4.1 which was published today.
Let us know if you encounter any issues with this release.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Projects
None yet
Development

No branches or pull requests

6 participants