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

[MAYA-122322] Compiling maya-usd using Visual Studio 2019: "could not find instance" #2196

Closed
scratchapixel opened this issue Mar 17, 2022 · 8 comments
Assignees

Comments

@scratchapixel
Copy link

scratchapixel commented Mar 17, 2022

Hi there)

I have been trying to compile the plugin for a while (looking for solution myself) but without any luck. I started a command prompt window from Visual Studio 2019. When I type the command:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>python d:\libraries\maya-usd\build.py ..._

I keep getting

_cmake -DCMAKE_INSTALL_PREFIX="D:\libraries\maya-usd-build\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo - 
DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="D:\Program 
Files\Autodesk\Maya2022" -DPXR_USD_LOCATION="D:\libraries\USD_BUILD" -DMAYA_DEVKIT_LOCATION="D:\Program 
Files\Autodesk\Maya2022\devkit" -DMAYAUSD_DEFINE_BOOST_DEBUG_PYTHON_FLAG=OFF "d:\libraries\maya-usd"
CMake Error at CMakeLists.txt:18 (project):
      Generator

Visual Studio 15 2017 Win64

could not find any instance of Visual Studio.

This is strange as I managed to compile USD fine from this window. I have both MSCV v140 and v141 installed but I am not sure whether this where I should be looking. I tried to setup the toolchain for older version using:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 -vcvars_ver=14.0

For example but I didn't get any luck.

Any help would be greatly appreciated.

@scratchapixel scratchapixel changed the title Compiling maya-use using Visual Studio 2019: "could not find instance" Compiling maya-usd using Visual Studio 2019: "could not find instance" Mar 17, 2022
@seando-adsk
Copy link
Collaborator

@scratchapixel I think you have found a bug in build.py script. It is making an assumption about the generator when one isn't supplied: https://github.com/Autodesk/maya-usd/blob/dev/build.py#L247

I can think of three options:

  1. In our internal builds we use Ninja by adding --generator Ninja.
  2. Tell build.py the correct Visual Studio generator. I think this will work --generator "Visual Studio 16 2019 -A x64"
  3. Make change 2 locally in build.py around line 249. Note: starting at VS2019 you have to add the -A flag for architecture.

Sean

@ppt-adsk
Copy link
Collaborator

@scratchapixel sorry about that, and thanks for the report, much appreciated!

@scratchapixel
Copy link
Author

Thanks Sean for the feedback. I will close it for now and will give it another go later, trying your solution and eventually looking for an update. Thanks again for the swift and useful reply.

@seando-adsk
Copy link
Collaborator

@santosd Can you please log this in JIRA so we can make sure it gets fixed.

@santosd santosd changed the title Compiling maya-usd using Visual Studio 2019: "could not find instance" [MAYA-122322] Compiling maya-usd using Visual Studio 2019: "could not find instance" Mar 22, 2022
@santosd
Copy link
Collaborator

santosd commented Mar 22, 2022

Logged the issue internally as: MAYA-122322

@seando-adsk
Copy link
Collaborator

@scratchapixel FYI, I just committed the fix for this generator issue in PR #2575

@santosd
Copy link
Collaborator

santosd commented Sep 9, 2022

@scratchapixel could you confirm that this is fixed on your end?

@scratchapixel
Copy link
Author

scratchapixel commented Sep 10, 2022 via email

@neilh-adsk neilh-adsk moved this to Done in maya-usd Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants