OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

Build issue on Windows

Open Lumengine opened this issue 1 year ago • 8 comments

Description of Issue

Trying to build with latest VS2022 toolset on windows 11

Steps to Reproduce

  1. Run

python build_scripts/build_usd.py ../Build/Release --build-variant release --toolset v143 --generator "Visual Studio 17 2022" --materialx

I get the same error as https://github.com/PixarAnimationStudios/OpenUSD/issues/3102 Fixing with this https://github.com/boostorg/boost/issues/914#issuecomment-2262146091 But after this issue, another one


-- Found Boost: C:/Users/perri/Software/USD/Build/Debug/include/boost-1_82 (found version "1.82.0")
-- Disabling boost-provided cmake config
-- Found Python3: C:\Users\perri\AppData\Local\Programs\Python\Python311\python.exe (found version "3.11.9") found components: Interpreter Development Development.Module Development.Embed
CMake Warning (dev) at cmake/defaults/Packages.cmake:132 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:23 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Boost (missing: python311) (found version "1.82.0")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.30/Modules/FindBoost.cmake:2409 (find_package_handle_standard_args)
  cmake/defaults/Packages.cmake:132 (find_package)
  CMakeLists.txt:23 (include)

Seems that boost is creating some python library but unavailable with cmake find_package. The cmake line is in Packages.cmake

    set(python_version_nodot "${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
    find_package(Boost
        COMPONENTS
        python${python_version_nodot}
        REQUIRED
    )

System Information (OS, Hardware)

Microsoft Windows 11 Version 10.0.22631 Build 22631

Package Versions

24.08

Build Flags

Lumengine avatar Aug 27 '24 17:08 Lumengine

Filed as internal issue #USD-10036

jesschimein avatar Aug 28 '24 18:08 jesschimein

I am having the exact same issue on Windows 10 with Visual Studio 17.11.2, cannot find a fix and this is completely preventing me from using OpenUSD.

Do any precompiled downloads exist ?

fschlaef avatar Sep 03 '24 10:09 fschlaef

@fschlaef You can check this out. It worked for me. But it's a workaround. https://forum.aousd.org/t/build-usd-py-issues-with-b2-and-boost-and-latest-visualstudio-2022/1725

Lumengine avatar Sep 03 '24 11:09 Lumengine

I also have a repo that suits my need where I precompiled USD. https://github.com/Lumengine/OpenUSDBuild

Lumengine avatar Sep 03 '24 11:09 Lumengine

@fschlaef You can check this out. It worked for me. But it's a workaround. https://forum.aousd.org/t/build-usd-py-issues-with-b2-and-boost-and-latest-visualstudio-2022/1725

I've also found it, but it only fixes the b2 issue (the one in https://github.com/PixarAnimationStudios/OpenUSD/issues/3102) and not this one :(

fschlaef avatar Sep 03 '24 13:09 fschlaef

@fschlaef It worked for me. Installing previous msvc solve both the b2 issue and the python311 for me. What about desinstalling old msvc version. Not sure Microsoft allows it though.

Lumengine avatar Sep 03 '24 13:09 Lumengine

@fschlaef It worked for me. Installing previous msvc solve both the b2 issue and the python311 for me. What about desinstalling old msvc version. Not sure Microsoft allows it though.

I was using Python 3.12, tried removing everything and performing a clean build on Python 3.11 It got stuck on "Installing OpenUSD" for over 30 minutes and generated more than 15GB of build files while slowing my PC to a crawl, after which I interrupted the build.

No idea if that is normal, I ended up finding and using the precompiled build from NVIDIA's website : https://developer.nvidia.com/usd#section-getting-started

fschlaef avatar Sep 03 '24 14:09 fschlaef

Depending on your hardware configuration, it can take a while indeed ! With my oldest laptop it took more than an hour to build USD with more than 17 GB on the "build" folder.

Lumengine avatar Sep 03 '24 16:09 Lumengine

I had this as well with cmake trying to generate a Visual studio 2022 solution and fixed it by adding : -DBoost_PYTHON311_LIBRARY=D:/GIT/maya/builds/main/maya/build/RelWithDebInfo/runTime/lib/python311.lib To : cmake .. -G "Visual Studio 17 2022" -A x64 -DBOOST_ROOT=PathToBoost/boost-1_82 -DBoost_PYTHON311_LIBRARY=D:/GIT/maya/builds/main/maya/build/RelWithDebInfo/runTime/lib/python311.lib

lanierd-adsk avatar Oct 25 '24 13:10 lanierd-adsk