Giter VIP home page Giter VIP logo

Comments (21)

785415581 avatar 785415581 commented on August 28, 2024

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?

from maya-usd.

seando-adsk avatar seando-adsk commented on August 28, 2024

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))

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

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

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

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😂

from maya-usd.

seando-adsk avatar seando-adsk commented on August 28, 2024

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.

from maya-usd.

seando-adsk avatar seando-adsk commented on August 28, 2024

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

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

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

from maya-usd.

BigRoy avatar BigRoy commented on August 28, 2024

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

from maya-usd.

seando-adsk avatar seando-adsk commented on August 28, 2024

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.

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

@seanofnine ok

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

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: //

from maya-usd.

asluk avatar asluk commented on August 28, 2024

@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

from maya-usd.

785415581 avatar 785415581 commented on August 28, 2024

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

from maya-usd.

asluk avatar asluk commented on August 28, 2024

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

from maya-usd.

dronepiece avatar dronepiece commented on August 28, 2024

@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

from maya-usd.

seando-adsk avatar seando-adsk commented on August 28, 2024

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))

from maya-usd.

asluk avatar asluk commented on August 28, 2024

The USD issue tracking this is PixarAnimationStudios/OpenUSD#530

from maya-usd.

HamedSabri-adsk avatar HamedSabri-adsk commented on August 28, 2024

@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

from maya-usd.

dronepiece avatar dronepiece commented on August 28, 2024

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

from maya-usd.

BigRoy avatar BigRoy commented on August 28, 2024

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

from maya-usd.

fowlertADSK avatar fowlertADSK commented on August 28, 2024

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

from maya-usd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.