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

Failing to find pxr headers #19

Closed
Svenito opened this issue Aug 16, 2019 · 5 comments
Closed

Failing to find pxr headers #19

Svenito opened this issue Aug 16, 2019 · 5 comments

Comments

@Svenito
Copy link

Svenito commented Aug 16, 2019

I'm trying to build on Centos 7.5 and am running into errors finding the USD headers
for example:

fatal error: pxr/pxr.h: No such file or directoryfatal error: pxr/pxr.h: No such file or directory #include "pxr/pxr.h"

The command I use is (some paths redacted)

python build.py --maya-location path/maya2018 --pxrusd-location /tmp/usd-optix/ --build-args="-DBOOST_LIBRARYDIR=BOOST/1.55.0/linux-x86-64/gcc-4.8.5/lib, -DBOOST_INCLUDEDIR=BOOST/1.55.0/linux-x86-64/gcc-4.8.5/include, -DBUILD_ADSK_PLUGIN=ON,-DBUILD_AL_PLUGIN=ON, -DBUILD_PXR_PLUGIN=OFF" --install-location /tmp/maya-usd pwd``

I compiled PXR USD 19.05 with the Maya plugin disabled and the header files it is looking for are present in the pxrusd-location /tmp/usd-optix/include

@rhaleblian
Copy link

rhaleblian commented Aug 16, 2019

Ran into this also, on the update... branch, on RHEL 7.6.

I worked around it by adding ${USD_INCLUDE_DIR} to specific CMakeLists.txt. I am not convinced this was a good way; it suggests some existing include list is incomplete.

diff --git a/lib/usd/schemas/CMakeLists.txt b/lib/usd/schemas/CMakeLists.txt
index 9164054f1..aab76e583 100644
--- a/lib/usd/schemas/CMakeLists.txt
+++ b/lib/usd/schemas/CMakeLists.txt
@@ -60,6 +60,11 @@ add_library(${SCHEMA_PLUGIN}
 #    ModuleDeps.cpp
 )
 
+target_include_directories(${SCHEMA_PLUGIN}
+    PRIVATE
+        ${USD_INCLUDE_DIR}
+)
+
 target_compile_definitions(${SCHEMA_PLUGIN}
     PRIVATE
         MFB_PACKAGE_NAME=${SCHEMA_PLUGIN}

diff --git a/plugin/al/mayautils/AL/maya/CMakeLists.txt b/plugin/al/mayautils/AL/maya/CMakeLists.txt
index 9532d057e..946d09c66 100755
--- a/plugin/al/mayautils/AL/maya/CMakeLists.txt
+++ b/plugin/al/mayautils/AL/maya/CMakeLists.txt
@@ -57,7 +57,8 @@ target_include_directories(${MAYAUTILS_LIBRARY_NAME}
     ${UTILS_INCLUDE_LOCATION}
     ${MAYAUTILS_INCLUDE_LOCATION}
     ${MAYA_INCLUDE_DIRS}
-   ${MAYAUSD_INCLUDE_DIR}
+    ${MAYAUSD_INCLUDE_DIR}
+    ${USD_INCLUDE_DIR}
     )
 
diff --git a/plugin/al/schemas/AL/usd/schemas/maya/CMakeLists.txt b/plugin/al/schemas/AL/usd/schemas/maya/CMakeLists.txt
index 26f6ae4f0..6b2b4e8e0 100644
--- a/plugin/al/schemas/AL/usd/schemas/maya/CMakeLists.txt
+++ b/plugin/al/schemas/AL/usd/schemas/maya/CMakeLists.txt
@@ -61,6 +61,11 @@ add_library(AL_USDMayaSchemas
     ModuleDeps.cpp
 )
 
+target_include_directories(AL_USDMayaSchemas
+    PRIVATE
+        ${USD_INCLUDE_DIR}
+)
+
 target_compile_definitions(AL_USDMayaSchemas
     PRIVATE
         MFB_PACKAGE_NAME=AL_USDMayaSchemas
@@ -101,6 +106,11 @@ add_library(_AL_USDMayaSchemas
     wrapFrameRange.cpp
 )
 
+target_include_directories(_AL_USDMayaSchemas
+    PRIVATE
+        ${USD_INCLUDE_DIR}
+)
+
 target_compile_definitions(_AL_USDMayaSchemas
     PRIVATE
         MFB_PACKAGE_NAME=AL_USDMayaSchemas
diff --git a/plugin/al/usdutils/AL/usd/utils/CMakeLists.txt b/plugin/al/usdutils/AL/usd/utils/CMakeLists.txt
index ce1d49fc9..ee78fcbfa 100755
--- a/plugin/al/usdutils/AL/usd/utils/CMakeLists.txt
+++ b/plugin/al/usdutils/AL/usd/utils/CMakeLists.txt
@@ -38,6 +38,7 @@ target_include_directories(${USDUTILS_LIBRARY_NAME}
     PUBLIC
     ${UTILS_INCLUDE_LOCATION} 
     ${USDUTILS_INCLUDE_LOCATION} 
+    ${USD_INCLUDE_DIR}
     )
 
 target_link_libraries(${USDUTILS_LIBRARY_NAME}
diff --git a/plugin/pxr/maya/lib/usdMaya/CMakeLists.txt b/plugin/pxr/maya/lib/usdMaya/CMakeLists.txt
index b7f30f739..4a3d86614 100644
--- a/plugin/pxr/maya/lib/usdMaya/CMakeLists.txt
+++ b/plugin/pxr/maya/lib/usdMaya/CMakeLists.txt
@@ -29,7 +29,8 @@ pxr_shared_library(${PXR_PACKAGE}
     INCLUDE_DIRS
         ${MAYA_INCLUDE_DIRS}
         ${MAYAUSD_INCLUDE_DIR}
-
+        ${USD_INCLUDE_DIR}
+        
     PUBLIC_HEADERS
         api.h

@seando-adsk
Copy link
Collaborator

Please see the discussion here: #5
I believe this is the same problem and could come from the way you built USD (using cmake directly vs build_usd.py script).

@rhaleblian
Copy link

Took the changes @mattyjams cited in #5 by hand, removed my changes cited before, rebuilt successfully.
thanks @seando-adsk and @mattyjams .

@BigRoy
Copy link
Contributor

BigRoy commented Dec 8, 2019

@Svenito are you still running into problems? As in, is this still an open issue?

@Svenito
Copy link
Author

Svenito commented Dec 9, 2019

i think we're good here. thanks

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