You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, the generated pxrTargets.cmake will set an absolute path to libm.so inside of arch'sINTERFACE_LINK_LIBRARIES.
This means that when compiling a plugin using the pxrConfig.cmake, if the path to libm.so differs from that used on the machine where USD was compiled, a linking error will be generated, because it can't find that exact absolute path.
In practice, this often makes the generated pxrConfig.cmake specific to the Linux distro used to generate it - for instance, if you compile on CentOS 7 (which uses /usr/lib64/libm.so), you can't use that pxrConfig.cmake on Ubuntu 20.04 (/lib/x86_64-linux-gnu/libm.so)
Steps to Reproduce
Compile USD on CentOS 7 (or, likely, any CentOS version)
Copy the resulting install to an Ubuntu 20.04 machine (or, likely, any Ubuntu version)
Try to build a cmake project, using the default Makefile generator, that uses the generated pxrConfig.cmake, and links against pretty much any USD lib (ie, anything that transitively requires the arch lib
CMake configuring will work successfully, but you will see an error like this from make when building:
make[2]: *** No rule to make target '/usr/lib64/libm.so', needed by 'my_usd_plugin.so'. Stop.
The text was updated successfully, but these errors were encountered:
pmolodo
changed the title
gererated pxrConfig.cmake on Linux not usable between distros due to absolute path of libm.so
pxrConfig.cmake generated on Linux not usable between distros due to absolute path of libm.so
Nov 8, 2023
Description of Issue
On Linux, the generated
pxrTargets.cmake
will set an absolute path tolibm.so
inside ofarch's
INTERFACE_LINK_LIBRARIES
.This means that when compiling a plugin using the
pxrConfig.cmake
, if the path tolibm.so
differs from that used on the machine where USD was compiled, a linking error will be generated, because it can't find that exact absolute path.In practice, this often makes the generated
pxrConfig.cmake
specific to the Linux distro used to generate it - for instance, if you compile on CentOS 7 (which uses/usr/lib64/libm.so
), you can't use thatpxrConfig.cmake
on Ubuntu 20.04 (/lib/x86_64-linux-gnu/libm.so
)Steps to Reproduce
pxrConfig.cmake
, and links against pretty much any USD lib (ie, anything that transitively requires thearch
libSystem Information (OS, Hardware)
Linux
Package Versions
USD 24.02 (dcbc1ca)
The text was updated successfully, but these errors were encountered: