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
Our platform is Ubuntu 22.04. We import the OpenUSD package as a prebuilt tarball (built with clang) into bazel targets for use within our code-base. A small test program that exercises some basic functionality in OpenUSD crashes during static initialization with an error like this:
After much debugging, the culprit appears to be -fuse-ld=lld, which also apparently causes libc++.a, libc++abi.a and libunwind.a to be statically linked. Either of these by themselves is fine, but together, they cause the crash.
Also: using clang++ instead of clang also fixes the problem (without changing anything else).
The workaround is to add linkopts to the build rule for the test program:
Our platform is Ubuntu 22.04. We import the OpenUSD package as a prebuilt tarball (built with clang) into bazel targets for use within our code-base. A small test program that exercises some basic functionality in OpenUSD crashes during static initialization with an error like this:
After much debugging, the culprit appears to be
-fuse-ld=lld
, which also apparently causeslibc++.a
,libc++abi.a
andlibunwind.a
to be statically linked. Either of these by themselves is fine, but together, they cause the crash.Also: using
clang++
instead ofclang
also fixes the problem (without changing anything else).The workaround is to add linkopts to the build rule for the test program:
The text was updated successfully, but these errors were encountered: