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

Windows cmake install error due to backslash in Python3_INCLUDE_DIRS #2082

Closed
pmolodo opened this issue Nov 4, 2022 · 5 comments
Closed

Comments

@pmolodo
Copy link
Contributor

pmolodo commented Nov 4, 2022

Description of Issue

When running cmake install on windows, we get a cmake syntax error:

CMake Error at cmake/macros/Public.cmake:367 (pxr_library):
  Syntax error in cmake code at

    W:/f651207570849f20/USD/cmake/macros/Public.cmake:367

  when parsing string

    LIBRARIES;tf;gf;sdf;usd;usdGeom;W:/f651207570849f20/_install/py37.windows-x86_64.usdview.release/lib/draco.lib;INCLUDE_DIRS;W:/f651207570849f20/_install/py37.windows-x86_64.usdview.release/include/boost-1_70;W:/f651207570849f20/_install/py37.windows-x86_64.usdview.release/include;W:\f651207570849f20\_build\target-deps\python\Include;CPPFILES;attributeDescriptor.cpp;attributeFactory.cpp;exportTranslator.cpp;fileFormat.cpp;importTranslator.cpp;writer.cpp;PYTHON_CPPFILES;moduleDeps.cpp;PYMODULE_CPPFILES;module.cpp;wrapDraco.cpp;PYMODULE_FILES;__init__.py;RESOURCE_FILES;plugInfo.json;DOXYGEN_FILES;overview.dox

  Invalid character escape '\f'.

The change seems to be related to dbabdaf, which altered the way that python is found in cmake. It seems that now windows paths are not properly escaped / do not have backslashes converted to forward slashes.

Steps to Reproduce

  1. Run usd_build.py with the --build-python-info flag on windows, where the paths have backslashes. (Note - note actually sure if using --build-python-info is required to reproduce, but that's we we did.)

System Information (OS, Hardware)

Windows 10

Package Versions

USD - dev branch - d27b1be

Build Flags

--build-python-info - ie, we used:

--build-python-info W:\f651207570849f20\_build\target-deps\python\python.exe W:\f651207570849f20\_build\target-deps\python\Include W:\f651207570849f20\_build\target-deps\python\libs\python37.lib 3.7
@sunyab
Copy link
Contributor

sunyab commented Nov 4, 2022

@pmolodo We're seeing this on our Azure builds too. I'm not sure why we didn't see this in our local Windows tests builds, though. What version of CMake are you running?

@sunyab
Copy link
Contributor

sunyab commented Nov 4, 2022

Filed as internal issue #USD-7745

@asluk
Copy link
Collaborator

asluk commented Nov 4, 2022

@pmolodo We're seeing this on our Azure builds too. I'm not sure why we didn't see this in our local Windows tests builds, though. What version of CMake are you running?

I believe we're on cmake 3.24 . Thanks @sunyab !

@sunyab
Copy link
Contributor

sunyab commented Nov 4, 2022

Turns out I didn't run into this because my Python installation is in "C:\Python..." and "\P" isn't an escape sequence that triggers the bug, but your (and Azure's) installation is in a directory that starts with a lower case letter, which does trigger the parsing bug. Should have a fix available with the next dev push.

@tanant
Copy link

tanant commented Nov 9, 2022

Ahhhh.. that explains what i was trying to puzzle out on #2083 which was killing the windows build

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

4 participants