Skip to content

Fix nlopt version issue#6717

Merged
kellyguo11 merged 3 commits into
isaac-sim:developfrom
StafaH:mh/fix_nlopt
Jul 25, 2026
Merged

Fix nlopt version issue#6717
kellyguo11 merged 3 commits into
isaac-sim:developfrom
StafaH:mh/fix_nlopt

Conversation

@StafaH

@StafaH StafaH commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Fix nlopt error due to version mismatch with cmake in the docker build for ARM.

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

@StafaH
StafaH requested a review from a team July 24, 2026 21:48
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team infrastructure labels Jul 24, 2026
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the ARM-specific nlopt pre-install workaround that was failing on ARM Linux (e.g. DGX Spark) because CMake 4.x dropped support for the cmake_minimum_required value declared by nlopt==2.6.2. The fix is valid: both isaacteleop and dex-retargeting (the only packages that pull in nlopt) carry platform_machine in 'x86_64 AMD64' markers in pyproject.toml, so they are never installed on aarch64/arm64.

  • Both Dockerfile.base and Dockerfile.curobo are simplified by removing the conditional swig/nlopt pre-install block, leaving a plain isaaclab.sh --install.
  • Three helper functions (_maybe_preinstall_arm_nlopt, _ensure_swig_installed, _purge_swig) and their call site are removed from install.py; the is_arm import remains because other code paths still use it.
  • The test patch list is updated to drop the now-deleted _maybe_preinstall_arm_nlopt mock.

Confidence Score: 5/5

Safe to merge. The change is a pure deletion of a broken workaround, and the root assumption — that nlopt consumers carry platform_machine in 'x86_64 AMD64' markers — is confirmed in the repository's pyproject.toml.

The removed code was actively broken (CMake 4.x incompatibility on ARM), and the replacement is simply letting isaaclab.sh --install run without the pre-install shim. The underlying correctness — that isaacteleop and dex-retargeting are guarded by platform_machine in 'x86_64 AMD64' environment markers — is verified directly in pyproject.toml lines 150–151.

Files Needing Attention: No files require special attention. The Dockerfile and install.py changes are consistent with each other, and the test patch list correctly reflects the removed function.

Important Files Changed

Filename Overview
docker/Dockerfile.base Removes the 17-line conditional ARM swig/nlopt block; leaves a plain isaaclab.sh --install. Clean simplification.
docker/Dockerfile.curobo Same ARM-specific swig/nlopt block removed; the unconditional isaaclab_teleop install at line 171 is unaffected and safe because nlopt's consumers have x86_64-only platform markers.
source/isaaclab/isaaclab/cli/commands/install.py Deletes _ensure_swig_installed, _purge_swig, and _maybe_preinstall_arm_nlopt (86 lines). The is_arm import is preserved and still used by two other code paths.
source/isaaclab/test/cli/test_install_command_parsing.py Removes the _maybe_preinstall_arm_nlopt patch entry that is no longer needed. No other test changes required.
source/isaaclab/changelog.d/fix-arm-nlopt-install.rst New changelog entry accurately describes the root cause (CMake 4.x incompatibility) and the rationale (nlopt consumers are x86_64-only).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Docker ARM build\nfor e.g. DGX Spark] --> B{platform_machine?}
    B -- aarch64/arm64 --> C[isaaclab.sh --install]
    B -- x86_64 --> C
    C --> D[Install core deps]
    C --> E{teleop extra requested?}
    E -- No --> F[Skip isaacteleop + dex-retargeting]
    E -- Yes --> G{platform marker check\nplatform_machine in x86_64 AMD64?}
    G -- ARM: No --> H[Skip isaacteleop\nSkip dex-retargeting\nSkip nlopt]
    G -- x86: Yes --> I[Install isaacteleop\nInstall dex-retargeting\nInstall nlopt]
    F --> J[Build succeeds]
    H --> J
    I --> J

    style H fill:#90EE90
    style J fill:#90EE90
Loading

Reviews (1): Last reviewed commit: "Fix nlopt version issue" | Re-trigger Greptile

@kellyguo11
kellyguo11 merged commit b22b6b4 into isaac-sim:develop Jul 25, 2026
40 of 43 checks passed
kellyguo11 added a commit that referenced this pull request Jul 26, 2026
# Description

Backports #6717 to `release/3.0.0-beta2`.

This fixes ARM Linux dependency installation with CMake 4.x. The
backport:

- removes the unnecessary ARM-only `nlopt==2.6.2` and temporary `swig`
pre-install from the Docker images and installer;
- temporarily sets `CMAKE_POLICY_VERSION_MINIMUM=3.5` while ARM
dependencies are installed, then restores the user's previous
environment value; and
- adds regression coverage for the ARM compatibility context and install
dispatch.

The `nlopt` pre-install is unnecessary because that dependency is only
selected by Linux x86_64 requirements. Other legacy ARM source builds,
including `egl-probe==1.0.2`, still need the temporary CMake policy
compatibility setting.

## Type of change

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

## Screenshots

Not applicable.

## Validation

- `.\isaaclab.bat -f`
- `.\isaaclab.bat -p tools/changelog/cli.py check backport-base-6717`
- `.\isaaclab.bat -p -m pytest
source/isaaclab/test/cli/test_install_commands.py::TestArmCmakePolicyCompatibility
source/isaaclab/test/cli/test_install_command_parsing.py::TestCommandInstallDispatch::test_wraps_dependency_installs_with_arm_cmake_compatibility`
(4 passed)
- Full CLI-file sweep: 88 passed; 22 pre-existing symlink tests could
not run because this Windows host lacks symbolic-link privilege
(`WinError 1314`).

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation (not
applicable; no public documentation change)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [ ] I have added my name to `CONTRIBUTORS.md` or my name already
exists there (not changed in this backport)

---------

Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants