neuronsimulator/nrn

Sporadic failures to build MacOS wheels due to `install_name_tool` errors

Closed this issue · 0 comments

Context

Sometimes the azure pipeline for building wheels on MacOS fails due to issues with the install_name_tool utility, which happens when changing the rpath of the RXD submodule.

Overview of the issue

The error log from one of the failed builds (happens when calling delocate):

Fixing: dist/NEURON_nightly-9.0a1.dev485-cp313-cp313-macosx_10_15_x86_64.whl
Traceback (most recent call last):
  File "/Users/runner/work/1/s/nrn_build_venv313_-2010360/lib/python3.13/site-packages/delocate/tools.py", line 143, in _run
    return subprocess.run(
           ~~~~~~~~~~~~~~^
        cmd,
        ^^^^
    ...<3 lines>...
        check=check,
        ^^^^^^^^^^^^
    )
    ^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
RuntimeError: Command ['install_name_tool', '-change', '@rpath/libnrnpython3.13.dylib', '@loader_path/../../.data/lib/libnrnpython3.13.dylib', '/private/var/folders/x4/dc0wnrqs60v8cfdj3vx06s1h0000gn/T/tmpwv295vdt/wheel/neuron/rxd/geometry3d/surfaces.cpython-313-darwin.so'] failed with non-zero exit code 1.
stdout:
stderr:error: /Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /private/var/folders/x4/dc0wnrqs60v8cfdj3vx06s1h0000gn/T/tmpwv295vdt/wheel/neuron/rxd/geometry3d/surfaces.cpython-313-darwin.so (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)

Expected result/behavior

The wheel building should not fail.

NEURON setup

  • Version: happens sporadically
  • Installation method: setup.py (pip)
  • OS + Version: exclusive to MacOS
  • Compiler + Version: N/A