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

Fix Windows MSVC Compilation #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zalo
Copy link

@zalo zalo commented Mar 19, 2023

Clang and Ninja can be a bit squirrely to work with on Windows, but commenting out this section in norm_test.cc allows the rest of the system to compile and run great with MSVC!

EDIT: Also, you folks might appreciate this little hobby project I've been working on on the side:
https://github.com/zalo/mujoco_wasm
https://zalo.github.io/mujoco_wasm

MSVC doesn't seem to like this way of instantiating test suites...
Copy link
Collaborator

@nimrod-gileadi nimrod-gileadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you paste the error message you get before this PR in the PR comment thread?

@@ -94,6 +94,7 @@ TEST_P(NormTest, Hessian) {
}
}

#ifndef _MSC_VER
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write a comment as to why this is needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting the same issue @saran-t was getting here: #21

It was inscrutable to me, but I bisected commenting out regions of the file until I came to INSTANTIATE_TEST_SUITE_P, which is apparently only ever used in NormTest.cc.

I guess the Google Testing System has trouble with MSVC? Perhaps it's fixed in an updated version. 🤷‍♂️

@zalo
Copy link
Author

zalo commented Mar 22, 2023

Ah, perhaps it's addressed by this commit:
1106f74
And may get rolled in when #89 gets merged... I'll test that PR.

@zalo
Copy link
Author

zalo commented Mar 22, 2023

Nope, MSVC still dies on NormTest.cc, even in that PR with the inscrutable norm_test.cc(97): fatal error C1001: Internal compiler error.:

26>------ Build started: Project: task_test, Configuration: Release x64 ------
26>Building Custom Rule C:/Repositories/mujoco_mpc/mjpc/test/tasks/CMakeLists.txt
21>C:\Repositories\mujoco_mpc\mjpc\test\agent\norm_test.cc(97): fatal error C1001: Internal compiler error.
21>(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 213)
21> To work around this problem, try simplifying or changing the program near the locations listed above.
21>If possible please provide a repro here: https://developercommunity.visualstudio.com
21>Please choose the Technical Support command on the Visual C++
21> Help menu, or open the Technical Support help file for more information

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

Successfully merging this pull request may close these issues.

2 participants