PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.99k stars 1.18k forks source link

Build issue on Windows #3252

Open Lumengine opened 2 weeks ago

Lumengine commented 2 weeks ago

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

jesschimein commented 2 weeks ago

Filed as internal issue #USD-10036

fschlaef commented 1 week ago

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 ?

Lumengine commented 1 week ago

@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 commented 1 week ago

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

fschlaef commented 1 week ago

@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 :(

Lumengine commented 1 week ago

@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.

fschlaef commented 1 week ago

@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

Lumengine commented 1 week ago

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.