TheFoundryVisionmongers / KatanaUsdPlugins

Katana USD Plugins Repo
Other
48 stars 20 forks source link

Katana USD lib names using USE_KATANA_THIRDPARTY_LIBS #3

Closed fdan closed 4 years ago

fdan commented 4 years ago

I'm having an issue building with the USD_KATANA_THIRDPARTY_LIBS flag, I get the following errors:

FATAL-ERRORUnable to add library gf, could not be found in location /opt/Foundry/Katana3.5v2/bin/Fngf.so
FATAL-ERRORUnable to add library hio, could not be found in location /opt/Foundry/Katana3.5v2/bin/Fnhio.so
FATAL-ERRORUnable to add library sdf, could not be found in location /opt/Foundry/Katana3.5v2/bin/Fnsdf.so
FATAL-ERRORUnable to add library tf, could not be found in location /opt/Foundry/Katana3.5v2/bin/Fntf.so
FATAL-ERRORUnable to add library usdGeom, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdGeom.so
FATAL-ERRORUnable to add library usdHydra, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdHydra.so
FATAL-ERRORUnable to add library usdImagingGL, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdImagingGL.so
FATAL-ERRORUnable to add library usdLux, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdLux.so
FATAL-ERRORUnable to add library usdRi, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdRi.so
FATAL-ERRORUnable to add library usdShade, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdShade.so
FATAL-ERRORUnable to add library usdSkel, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdSkel.so
FATAL-ERRORUnable to add library usdUI, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdUI.so
FATAL-ERRORUnable to add library usdUtils, could not be found in location /opt/Foundry/Katana3.5v2/bin/FnusdUtils.so
FATAL-ERRORUnable to add library vt, could not be found in location /opt/Foundry/Katana3.5v2/bin/Fnvt.so

I'm using cmake-3.12.0 as suggested, and the 19.11_fn2 release. My build command is basically:

cmake .. -DUSE_KATANA_THIRDPARTY_LIBS=ON -DKATANA_API_LOCATION=/opt/Foundry/Katana3.5v2/

I forked and modified cmake/macros/SetupInterfaces.cmake so that the PXR_LIB_PREFIX is libFn rather than Fn, and it then seems to build ok:

https://github.com/UTS-AnimalLogicAcademy/KatanaUsdPlugins/commit/daf4e0981dd7129d1b6656644da285baf4684787

In the Pixar USD Options.cmake it seems to be lib:

https://github.com/PixarAnimationStudios/USD/blob/v19.11/cmake/defaults/Options.cmake#L96

JamesPedFoundry commented 4 years ago

Hi fdan,

Thanks for raising this issue! This is indeed a bug which was introduced when we fixed another issue in our core USD build where Linux shared libraries did not include the lib prefix. I have logged this as a bug on our end under number #427390 to ensure we search for libFn on Linux when using the USE_KATANA_THIRDPARTY_LIBS option.

The change you have applied is going to be similar to the patch I apply, so you're good to continue with that.

Cheers, James

JamesPedFoundry commented 4 years ago

Hi fdan,

This issue should now be resolved in the latest 19.11_fn3 version on this repo. Thanks again, and let us know if it still causes issues!

Cheers, James