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

build maya-usd error #1

Closed
785415581 opened this issue Jul 31, 2019 · 21 comments
Closed

build maya-usd error #1

785415581 opened this issue Jul 31, 2019 · 21 comments

Comments

@785415581
Copy link

I am getting an error when compiling maya-usd.

C:\maya-usd>python build.py --maya-location "C:\Program Files\Autodesk\maya2018" --pxrusd-location C:\usd C:\workspace

Building with settings:
Source directory C:\maya-usd
Workspace directory C:\workspace
Build directory C:\workspace\build\RelWithDebInfo
Install directory C:\workspace\install\RelWithDebInfo
Variant RelWithDebInfo
CMake generator Default
Build Log C:\workspace\build\RelWithDebInfo\build_log.txt
2019-07-31 19:20
cmake -DCMAKE_INSTALL_PREFIX="C:\workspace\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="C:\Program Files\Autodesk\maya2018" -DPXR_USD_LOCATION="C:\usd" "C:\maya-usd"
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.16299.
-- _PYTHON_VERSION_LIST: 2.7.16.final.0
-- PYTHON_PREFIX: C:\Python27
-- PYTHON_INCLUDE_DIR: C:\Python27\include
-- PYTHON_SITE_PACKAGES: C:\Python27\Lib\site-packages
-- PYTHON_MODULE_EXTENSION: .pyd
-- PYTHON_IS_DEBUG: 0
-- PYTHON_SIZEOF_VOID_P: 8
-- PYTHON_LIBRARY_SUFFIX: 27
-- PYTHON_LIBDIR:
-- PYTHON_MULTIARCH:
Updated PYTHONPATH: C:\usd\lib\python
Updated PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\CMake\bin;C:\Program Files (x86)\QuickTime\QTSystem;D:\Program Files\Git\cmd;C:\Users\timeaxis\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip;C:\Python27;C:\Python27\Scripts;C:\Program Files\Intel\Embree3 x64\lib;C:\Program Files\3Delight\bin;C:\Program Files\Side Effects Software\Houdini 17.0.506;C:\python36;C:\python36\Scripts;C:\Program Files\Autodesk\Maya2018;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\usd\bin;C:\usd\lib
-- C++ namespace configured to (external) pxr, (internal) pxrInternal_v0_19
========== Pixar USD Plugin ==========
CMake Error at C:/usd/cmake/pxrTargets.cmake:522 (message):
The imported target "hdStream" references the file

 "C:/usd/plugin/usd/hdStream.lib"

but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and contained

    "C:/usd/cmake/pxrTargets.cmake"

but not all the files it references.

Call Stack (most recent call first):
C:/usd/pxrConfig.cmake:9 (include)
plugin/pxr/CMakeLists.txt:24 (include)

-- Configuring incomplete, errors occurred!
See also "C:/workspace/build/RelWithDebInfo/CMakeFiles/CMakeOutput.log".

Traceback (most recent call last):
File "build.py", line 458, in
InstallMayaUSD(context, context.forceBuild, context.buildArgs)
File "build.py", line 307, in InstallMayaUSD
RunCMake(context, force, extraArgs)
File "build.py", line 281, in RunCMake
extraArgs=(" ".join(extraArgs) if extraArgs else "")))
File "build.py", line 189, in Run
.format(cmd=cmd, log=os.path.abspath(context.logFileLocation)))
RuntimeError: Failed to run 'cmake -DCMAKE_INSTALL_PREFIX="C:\workspace\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="C:\Program Files\Autodesk\maya2018" -DPXR_USD_LOCATION="C:\usd" "C:\maya-usd"'
See C:\workspace\build\RelWithDebInfo\build_log.txt for more details.

I compiled usd successfully compiled. But the prompt asks there is no "C:/usd/plugin/usd/hdStream.lib" file. I don't know what to do. Can someone help me with this? thank you very much

win10
vs2017

@785415581
Copy link
Author

I opened the "C:/usd/plugin/usd/hdStream.lib" folder and found only "C:/usd/plugin/usd/hdStream.dll". Only the .dll file did not find the .lib file. So what is the problem?

@seando-adsk
Copy link
Collaborator

This is actually a problem with USD on Windows. The libraries hdStream, usdObj & usdShaders are dynamic libraries and have no .lib file on Windows. In your USD build open the file "cmake/pxrTargets.cmake" and find the line "if(NOT EXISTS "${file}" and substitute these lines:

get_filename_component(barename "${file}" NAME_WE)
# HACK - the following are dynamic libs in Windows (no .lib) - these will be dll's only
set(skip_dynamic_libs "hdStream" "usdObj" "usdShaders")
list(FIND skip_dynamic_libs ${barename} _index)
if(NOT EXISTS "${file}" AND NOT ((${_index} GREATER -1) AND WIN32))

@785415581
Copy link
Author

Thank you for your reply. After the change, there will still be an error in the missing library file. What should I do next?

C:\maya-usd>python build.py --maya-location "C:\Program Files\Autodesk\maya2018" --pxrusd-location C:\usd C:\workspace

Building with settings:
Source directory C:\maya-usd
Workspace directory C:\workspace
Build directory C:\workspace\build\RelWithDebInfo
Install directory C:\workspace\install\RelWithDebInfo
Variant RelWithDebInfo
CMake generator Default
Build Log C:\workspace\build\RelWithDebInfo\build_log.txt
2019-08-02 10:45
cmake -DCMAKE_INSTALL_PREFIX="C:\workspace\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="C:\Program Files\Autodesk\maya2018" -DPXR_USD_LOCATION="C:\usd" "C:\maya-usd"
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.16299.
-- Found PythonInterp: C:/Python27/python.exe (found suitable version "2.7.16", minimum required is "2.7")
-- _PYTHON_VERSION_LIST: 2.7.16.final.0
-- PYTHON_PREFIX: C:\Python27
-- PYTHON_INCLUDE_DIR: C:\Python27\include
-- PYTHON_SITE_PACKAGES: C:\Python27\Lib\site-packages
-- PYTHON_MODULE_EXTENSION: .pyd
-- PYTHON_IS_DEBUG: 0
-- PYTHON_SIZEOF_VOID_P: 8
-- PYTHON_LIBRARY_SUFFIX: 27
-- PYTHON_LIBDIR:
-- PYTHON_MULTIARCH:
Updated PYTHONPATH: C:\usd\lib\python
Updated PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\CMake\bin;C:\Program Files (x86)\QuickTime\QTSystem;D:\Program Files\Git\cmd;C:\Users\timeaxis\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip;C:\Python27;C:\Python27\Scripts;C:\Program Files\Intel\Embree3 x64\lib;C:\Program Files\3Delight\bin;C:\Program Files\Side Effects Software\Houdini 17.0.506;C:\python36;C:\python36\Scripts;C:\Program Files\Autodesk\Maya2018;C:\Program Files\Java\jdk1.8.0_221\bin;C:\usd\lib\python;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\usd\bin;C:\usd\lib
-- C++ namespace configured to (external) pxr, (internal) pxrInternal_v0_19
========== Pixar USD Plugin ==========
CMake Error at C:/usd/cmake/pxrTargets.cmake:526 (message):
The imported target "usdDancingCubesExample" references the file

 "C:/usd/share/usd/examples/plugin/usdDancingCubesExample.lib"

but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and contained

    "C:/usd/cmake/pxrTargets.cmake"

but not all the files it references.

Call Stack (most recent call first):
C:/usd/pxrConfig.cmake:9 (include)
plugin/pxr/CMakeLists.txt:24 (include)

-- Configuring incomplete, errors occurred!
See also "C:/workspace/build/RelWithDebInfo/CMakeFiles/CMakeOutput.log".
See also "C:/workspace/build/RelWithDebInfo/CMakeFiles/CMakeError.log".

Traceback (most recent call last):
File "build.py", line 458, in
InstallMayaUSD(context, context.forceBuild, context.buildArgs)
File "build.py", line 307, in InstallMayaUSD
RunCMake(context, force, extraArgs)
File "build.py", line 281, in RunCMake
extraArgs=(" ".join(extraArgs) if extraArgs else "")))
File "build.py", line 189, in Run
.format(cmd=cmd, log=os.path.abspath(context.logFileLocation)))
RuntimeError: Failed to run 'cmake -DCMAKE_INSTALL_PREFIX="C:\workspace\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="C:\Program Files\Autodesk\maya2018" -DPXR_USD_LOCATION="C:\usd" "C:\maya-usd"'
See C:\workspace\build\RelWithDebInfo\build_log.txt for more details.

please

@785415581
Copy link
Author

This is actually a problem with USD on Windows. The libraries hdStream, usdObj & usdShaders are dynamic libraries and have no .lib file on Windows. In your USD build open the file "cmake/pxrTargets.cmake" and find the line "if(NOT EXISTS "${file}" and substitute these lines:

get_filename_component(barename "${file}" NAME_WE)
# HACK - the following are dynamic libs in Windows (no .lib) - these will be dll's only
set(skip_dynamic_libs "hdStream" "usdObj" "usdShaders")
list(FIND skip_dynamic_libs ${barename} _index)
if(NOT EXISTS "${file}" AND NOT ((${_index} GREATER -1) AND WIN32))

Always have problems😂

@seando-adsk
Copy link
Collaborator

I believe this is because you are using the latest version of USD. The ‘master’ branch right now is Pixar and Animal Logic plugins at versions 19.05 and 31.1. That was the most common/stable combination being used in pipelines so that’s what we’ve got there. You would need to checkout the 'v19.05' tag in the USD repo and build that.

@seando-adsk
Copy link
Collaborator

FYI, the problem you encountered is because they added new dynamic libraries in v19.07 that will need to be skpped.

@785415581
Copy link
Author

thanks for you reply,I'm very grateful.Let me try

@BigRoy
Copy link
Contributor

BigRoy commented Aug 2, 2019

@qinjiaxin Note that there is pre-built USD 19.05 here - however I'm not sure that build has everything that is required to compile maya-usd on top of it.

Definitely let me know if you were able to compile it either way and if so - I might just hit you up with some targeted questions to get me up and running too. ;)

@seando-adsk
Copy link
Collaborator

Oh and one more thing. When you build USD, do not add the --maya option. The maya plugin is now part of this maya-usd repo.

@785415581
Copy link
Author

@seanofnine ok

@785415581
Copy link
Author

thanks for your help.I successfully compiled maya-usd. However, when I set the environment variable and load it, an error message appears. As follows
# Error: file: C:/Program Files/Autodesk/Maya2018/scripts/others/pluginWin.mel line 290: ImportError: file <maya console> line 1: No module named UsdMaya # // Error: Failed verification: ' plugin ' -- Could not get plugin -- Coding Error in _GetResourcePath at line 67 of C:\Users\UserComputer\Desktop\maya-usd-master\plugin\pxr\maya\plugin\pxrUsdPreviewSurface\plugin.cpp // // Error: Failed to register fragment 'float4ToFloatX' from file: //

@asluk
Copy link
Contributor

asluk commented Aug 13, 2019

@qinjiaxin did you hit this pthread.h error on Windows, and if so, how did you work around it? Thanks!

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Users/aluk/git/maya-usd/workspace/build/RelWithDebInfo/CMakeFiles/CMakeTmp

Run Build Command:"C:/progs/vs/2017/Professional/MSBuild/15.0/Bin/MSBuild.exe" "cmTC_8e1a8.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=15.0"
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Build started 8/13/2019 11:12:11 AM.

Project "C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\cmTC_8e1a8.vcxproj" on node 1 (default targets).

PrepareForBuild:

Creating directory "cmTC_8e1a8.dir\Debug".

Creating directory "C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\Debug".

Creating directory "cmTC_8e1a8.dir\Debug\cmTC_8e1a8.tlog".

InitializeBuildStatus:

Creating "cmTC_8e1a8.dir\Debug\cmTC_8e1a8.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

C:\progs\vs\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_8e1a8.dir\Debug\" /Fd"cmTC_8e1a8.dir\Debug\vc141.pdb" /Gd /TC /FC /errorReport:queue "C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\CheckIncludeFile.c"

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27027.1 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_8e1a8.dir\Debug\" /Fd"cmTC_8e1a8.dir\Debug\vc141.pdb" /Gd /TC /FC /errorReport:queue "C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\CheckIncludeFile.c"

CheckIncludeFile.c

c:\users\aluk\git\maya-usd\workspace\build\relwithdebinfo\cmakefiles\cmaketmp\checkincludefile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\cmTC_8e1a8.vcxproj]

Done Building Project "C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\cmTC_8e1a8.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\cmTC_8e1a8.vcxproj" (default target) (1) ->

(ClCompile target) ->

c:\users\aluk\git\maya-usd\workspace\build\relwithdebinfo\cmakefiles\cmaketmp\checkincludefile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Users\aluk\git\maya-usd\workspace\build\RelWithDebInfo\CMakeFiles\CMakeTmp\cmTC_8e1a8.vcxproj]

0 Warning(s)

1 Error(s)

Time Elapsed 00:00:00.38

@785415581
Copy link
Author

@asluk "C:\Python27\python.exe" build_usd.py --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem" --no-maya C:\usd
Compile usd core with this filter.

@asluk
Copy link
Contributor

asluk commented Aug 14, 2019

Thanks @qinjiaxin ! For some reason I I had thought that was already the default in my setup. Cheers~

@dronepiece
Copy link

@qinjiaxin
I got the same problem with the hdStream.lib missing. Not sure what I´m missing here.
I downloaded the 19.05 version of pixar USD and compiled with the
build_usd.py --build-args boost,"--with-date_time --with-thread --with-system --with-filesystem" --no-maya C:\usd
Looks like it succeeded without any problems. I tried the usdview without any problems.
I then downloaded the maya-usd master and built using the command:
build.py --maya-location "C:\Program Files\Autodesk\maya2018" --pxrusd-location C:\usd c:\USD_dev\workspace
This fails with the hdStream.lib error.
The cmake command that is erroring looks like this:

RuntimeError: Failed to run 'cmake -DCMAKE_INSTALL_PREFIX="c:\USD_dev\workspace\install\RelWithDebInfo" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 15 2017 Win64" -DMAYA_LOCATION="C:\Program Files\Autodesk\maya2018" -DPXR_USD_LOCATION="c:\usd" "c:\USD_dev\build\maya-usd-master"'
See c:\USD_dev\workspace\build\RelWithDebInfo\build_log.txt for more details.

If you fixed it by just changing version of pixar USD, I still must have got the wrong version. Or are there any other steps that you did to successfully compile maya-usd?

Thanks
/Erik

@seando-adsk
Copy link
Collaborator

You need to modify the pxrTargets.cmake file in your USD build. From my initial reply way above.

This is actually a problem with USD on Windows. The libraries hdStream, usdObj & usdShaders are dynamic libraries and have no .lib file on Windows. In your USD build open the file "cmake/pxrTargets.cmake" and find the line "if(NOT EXISTS "${file}" and substitute these lines:

get_filename_component(barename "${file}" NAME_WE)
# HACK - the following are dynamic libs in Windows (no .lib) - these will be dll's only
set(skip_dynamic_libs "hdStream" "usdObj" "usdShaders")
list(FIND skip_dynamic_libs ${barename} _index)
if(NOT EXISTS "${file}" AND NOT ((${_index} GREATER -1) AND WIN32))

@asluk
Copy link
Contributor

asluk commented Aug 20, 2019

The USD issue tracking this is PixarAnimationStudios/OpenUSD#530

@HamedSabri-adsk
Copy link
Contributor

@qinjiaxin if you are using master or dev branches, you shouldn't get the Error: Failed to register fragment 'float4ToFloatX'

However, in refactoring_sandbox branch this error shows up because PXR_PLUGINPATH_NAME is not set for PXR_USDMAYA in the mod.

Please see the fix here: #25

kxl-adsk pushed a commit that referenced this issue Aug 23, 2019
@dronepiece
Copy link

#1 (comment)

Thanks that worked flawlessly! I did actually try that before but only with the wrong USD version...

Thanks, and sorry for the late reply.

@BigRoy
Copy link
Contributor

BigRoy commented Dec 8, 2019

@qinjiaxin were you able to compile and use everything correctly? Are you still running into issues? Or can this issue be closed?

@fowlertADSK
Copy link
Contributor

There definitely some issues when this issue was first logged, especially in our documentation, but should be fine to close this one now.

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

7 participants