Skip to content

Fix usd-core 25.8 / usd-exchange ABI conflict by relaxing version pin#5386

Open
fan-ziqi wants to merge 1 commit intoisaac-sim:developfrom
fan-ziqi:patch-2
Open

Fix usd-core 25.8 / usd-exchange ABI conflict by relaxing version pin#5386
fan-ziqi wants to merge 1 commit intoisaac-sim:developfrom
fan-ziqi:patch-2

Conversation

@fan-ziqi
Copy link
Copy Markdown
Contributor

@fan-ziqi fan-ziqi commented Apr 24, 2026

Description

Bug: usd-core==25.8.0 conflicts with usd-exchange due to overlapping pxr/ modules

Environment

  • Isaac Lab: develop branch, isaaclab 4.6.12
  • Python: 3.12.12
  • OS: Ubuntu (x86_64)
  • Install method: ./isaaclab.sh --install

Problem

Training scripts fail at startup with:

RuntimeError: extension class wrapper for base class                                               
pxrInternal_v0_25_8__pxrReserved__::Tf_PyEnumWrapper has not been created yet                      

Import chain: cartpole_env.pyisaaclab.assets.Articulation
isaaclab.sim.simulation_contextfrom pxr import Usd → crash

Root Cause

Both usd-core 25.8.0 and usd-exchange 2.2.2 ship identical pxr/ Python modules (.py,
.pyc, .so files). When installed together via pip install -e, the later-installed package
overwrites the former's .so files, causing ABI incompatibility.

File usd-core 25.8 built from usd-exchange 2.2.2 built from
pxr/Tf/_tf.so /opt/USD/ /builds/omniverse/usd-ci/USD/
pxr/Usd/_usd.so /opt/USD/ /builds/omniverse/usd-ci/USD/
... (all pxr/ modules)

usd-exchange's _tf.so overwrites usd-core's, but usd-core's monolithic libusd_ms.so still
links against its own ABI. The Boost.Python converter registration fails due to the mismatch.

Verified:

# usd-core 25.8 + usd-exchange 2.2.2 → FAILS                    
python -c "from pxr import Usd"  # RuntimeError                                                    
                                                                                                   
# usd-core 25.11 + usd-exchange 2.2.2 → OK                                                         
pip install usd-core==25.11                                                                        
python -c "from pxr import Usd"  # works                                                           

usd-core 25.11+ is ABI-compatible with usd-exchange 2.2.2. Only 25.8 triggers the conflict.

Current Constraints

source/isaaclab/setup.py:73:

f"usd-core==25.8.0 ; ({SUPPORTED_ARCHS})",                      
f"usd-exchange>=2.2 ; ({SUPPORTED_ARCHS_ARM})",                                                    

usd-core is pinned to exactly 25.8.0, while usd-exchange>=2.2 allows 2.2.2 (which is
incompatible with 25.8).

Fix

Relax the version constraint:

-    f"usd-core==25.8.0 ; ({SUPPORTED_ARCHS})",
+    f"usd-core>=25.8.0,<26.0.0 ; ({SUPPORTED_ARCHS})",                                            

Long-term Recommendations

  1. usd-exchange should not ship pxr/ modules — it should depend on usd-core instead of
    repackaging the same files. This is a packaging issue on NVIDIA's side.
  2. Pin compatible version pairsusd-core and usd-exchange should be constrained to
    known-compatible combinations.
  3. CI smoke test — verify from pxr import Usd works after install.

Fixes #5025

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Signed-off-by: Ziqi Fan <fanziqi614@gmail.com>
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Apr 24, 2026
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Isaac Lab Review Bot

Summary

This PR relaxes the usd-core version pin from ==25.8.0 to >=25.8.0,<26.0.0 to resolve an ABI conflict between usd-core 25.8.0 and usd-exchange 2.2.2, where overlapping pxr/ modules cause RuntimeError at import time. The fix allows pip to resolve to a compatible version (25.11+) that doesn't conflict with usd-exchange.

Architecture Impact

Self-contained. This change affects only the dependency specification in setup.py. The usd-core package provides OpenUSD Python bindings used throughout Isaac Lab's simulation layer (isaaclab.sim, asset loading, USD stage manipulation). The fix enables the packages to coexist without ABI conflicts, but introduces version flexibility that could theoretically bring in untested USD versions. No code changes to Isaac Lab internals.

Implementation Verdict

Minor fixes needed

Test Coverage

No tests are included in this PR. For a dependency version change fixing a runtime crash, adding a CI smoke test that verifies from pxr import Usd succeeds when both usd-core and usd-exchange are installed would be valuable, though the existing CI should implicitly catch regressions if it runs any simulation tests.

CI Status

No CI checks available yet. This is concerning for a dependency change—we need to verify the fix works and doesn't break existing functionality.

Findings

🟡 Warning: source/isaaclab/setup.py:73 — Version range may allow untested USD versions
The range >=25.8.0,<26.0.0 allows any 25.x release (25.8, 25.11, future 25.12, etc.). While the author verified 25.11 works, future 25.x releases are untested. Consider whether >=25.11.0,<26.0.0 would be safer since 25.8.0 is known-broken with usd-exchange:

f"usd-core>=25.11.0,<26.0.0 ; ({SUPPORTED_ARCHS})",

This would exclude the broken 25.8.0 entirely rather than hoping pip chooses wisely.

🟡 Warning: source/isaaclab/setup.py:73-74 — Implicit dependency ordering may still cause issues
The fix relies on pip's dependency resolver choosing a compatible usd-core version when usd-exchange is also required. However, pip doesn't guarantee installation order, and the conflict is caused by .so file overwrites during installation. If pip installs usd-core 25.11 after usd-exchange, the ABI mismatch could still occur in reverse. Verify this ordering scenario works in CI.

🔵 Improvement: source/isaaclab/setup.py:71-74 — Add comment explaining the version constraint rationale
Future maintainers will wonder why the version is constrained this way. Add a brief comment:

# Adds OpenUSD dependencies based on architecture for Kit less mode.
# Note: usd-core must be >=25.11 for ABI compatibility with usd-exchange 2.2.x
# (25.8.0 has overlapping pxr/ modules that conflict). Upper bound <26.0.0 for stability.
INSTALL_REQUIRES += [
    f"usd-core>=25.8.0,<26.0.0 ; ({SUPPORTED_ARCHS})",

🔵 Improvement: PR description truncated — missing constraint explanation
The PR description cuts off mid-sentence at source/isaaclab/setup.py:73: with an incomplete code block. The full context of what the original constraint was and why it was pinned to 25.8.0 specifically would help reviewers understand if there were other reasons for the exact pin (e.g., Isaac Sim 5.1.0 compatibility requirements).

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 24, 2026

Greptile Summary

This PR relaxes the usd-core version pin from ==25.8.0 to >=25.8.0,<26.0.0 in source/isaaclab/setup.py to resolve a well-documented ABI conflict where usd-exchange 2.2.2 overwrites usd-core 25.8's pxr/ shared objects with incompatible builds, causing a RuntimeError at Python import time. The fix is minimal and correctly scoped to the 25.x release family. The usd-exchange upper bound (>=2.2) remains unbounded and is the only outstanding gap noted in the PR description's own long-term recommendations.

Confidence Score: 5/5

Safe to merge — the change is a minimal, well-justified dependency relaxation that directly fixes a confirmed ABI conflict.

The single-line change is low-risk: it widens a version pin in a controlled way (within the 25.x major family) and the PR description provides concrete verification evidence that 25.11+ resolves the crash. The only remaining finding is a P2 suggestion to add an upper bound on usd-exchange, which is a pre-existing gap and does not block merge.

No files require special attention.

Important Files Changed

Filename Overview
source/isaaclab/setup.py Relaxes usd-core pin from ==25.8.0 to >=25.8.0,<26.0.0 to resolve ABI conflict with usd-exchange 2.2.2; usd-exchange upper bound remains absent.

Sequence Diagram

sequenceDiagram
    participant pip
    participant usd_core as usd-core (25.8 → 25.11+)
    participant usd_exchange as usd-exchange (2.2.2)
    participant pxr as pxr/ modules (on disk)
    participant Python

    Note over pip: Before fix: ==25.8.0 pinned
    pip->>usd_core: install usd-core==25.8.0
    usd_core->>pxr: writes pxr/_tf.so (ABI v0_25_8)
    pip->>usd_exchange: install usd-exchange>=2.2
    usd_exchange->>pxr: overwrites pxr/_tf.so (ABI v0_25_11)
    Python->>pxr: from pxr import Usd
    pxr-->>Python: RuntimeError (ABI mismatch)

    Note over pip: After fix: >=25.8.0,<26.0.0
    pip->>usd_core: install usd-core==25.11.x
    usd_core->>pxr: writes pxr/_tf.so (ABI v0_25_11)
    pip->>usd_exchange: install usd-exchange>=2.2
    usd_exchange->>pxr: overwrites pxr/_tf.so (same ABI v0_25_11)
    Python->>pxr: from pxr import Usd
    pxr-->>Python: OK
Loading

Reviews (1): Last reviewed commit: "Update usd-core dependency version range" | Re-trigger Greptile

Comment thread source/isaaclab/setup.py
INSTALL_REQUIRES += [
f"usd-core==25.8.0 ; ({SUPPORTED_ARCHS})",
f"usd-core>=25.8.0,<26.0.0 ; ({SUPPORTED_ARCHS})",
f"usd-exchange>=2.2 ; ({SUPPORTED_ARCHS_ARM})",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing upper bound on usd-exchange

usd-exchange>=2.2 has no upper cap. If a future usd-exchange 2.x release ships pxr/ modules built against a different USD ABI, the same class of conflict can recur. The PR description's own recommendation #2 suggests pinning to known-compatible pairs — adding <2.3 (or whichever version is the next known-good boundary) here would make the constraint self-documenting and guard against silent breakage on the next usd-exchange release.

Suggested change
f"usd-exchange>=2.2 ; ({SUPPORTED_ARCHS_ARM})",
f"usd-exchange>=2.2,<2.3 ; ({SUPPORTED_ARCHS_ARM})",

@AntoineRichard
Copy link
Copy Markdown
Collaborator

Thanks for flagging this @fan-ziqi ! I'm looking into flagging these errors a bit more mechanically. Could you elaborate on why this hapens? What your install setup looks like etc... This way we can test it :)

IsaacSim version, which installation etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants