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

Error in Build_usd.py (Windows) - Such as mess... #1992

Closed
OldManMeta opened this issue Aug 13, 2022 · 2 comments
Closed

Error in Build_usd.py (Windows) - Such as mess... #1992

OldManMeta opened this issue Aug 13, 2022 · 2 comments

Comments

@OldManMeta
Copy link

OldManMeta commented Aug 13, 2022

Steps to Reproduce

  1. Read your documentation....
  2. Add Build Scripts to C:\USD
  3. Create a c:\Program Files\USD directory ( Because the documentation states the install command... Which is nuts, because these are protected folder locations on Windows)
  4. Sort out the permissions of that folder, just to run the script....
  5. Run command (as specified in your docs) - python USD\build_scripts\build_usd.py "C:\Program Files\USD"

First errors you will come across are because of the white space in the folder name "Program Files"

Ok - so then, head back and create an Install directory in your C:\USD folder

Then run the command: python build_usd.py "C:\USD\Install"

Goes through the dependency installations... but then dies at the boost location.

This is the output of the boost log.txt file

log.txt

Searching for the word Fail, we find:

...failed compile-c-c++ C:\USD\Install\build\boost\bin.v2\libs\python\build\msvc-14.2\release\python-3.10\threading-multi\exec.obj...

Thoughts?
Cheers for your help.

@meshula
Copy link
Member

meshula commented Aug 13, 2022

Hi @OldManMeta, there are two issues here. For the first one, can I suggest opening a second issue for "Instructions suggest installing USD into a protected area in Windows", we should address that separately.

The source of the build failure is that you are using Python 3.10. There was a breaking change in python 3.10 that breaks boost python. We can see the problem here in your log:

compile-c-c++ C:\USD\Install\build\boost\bin.v2\libs\program_options\build\msvc-14.2\release\threading-multi\positional_options.obj
positional_options.cpp
common.copy C:\USD\Install\include\boost-1_70\boost\config.hpp
C:\USD\Install\src\boost_1_70_0\boost\config.hpp
        1 file(s) copied.
compile-c-c++ C:\USD\Install\build\boost\bin.v2\libs\python\build\msvc-14.2\release\python-3.10\threading-multi\exec.obj
exec.cpp
libs\python\src\exec.cpp(109): error C3861: '_Py_fopen': identifier not found

The python developers removed _Py_fopen and replaced it with _Py_fwopen.

If it's an option for you, one solution is to install Python 3.9 instead. That may not make sense in your situation, so the other solution is patch build_usd.py to use the same version of boost that is used for macos.

Look for the setting of the BOOST_URL variable for windows in build_usd.py, and change it to:

    BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz"

and that will resolve the problem today. On our end, we will need to bump the boost version for windows.

@OldManMeta
Copy link
Author

@meshula - thanks for the response and clarity on the issue. Makes sense for sure - and as noted, python 3.9 is going to hurt me with other dependencies - such is life eh?

Thanks again.

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

No branches or pull requests

2 participants