diff options
| author | Ayan Das <bvits@riseup.net> | 2026-02-20 23:14:12 +0530 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-02-22 18:41:11 +0100 |
| commit | 19cac579d7d8885fce841bb536e3af5c596433cf (patch) | |
| tree | a37ae8be07c67d86381899963a5259f1eb7b3c45 | |
| parent | b373a5ccffaa2f9017ec2abd17c70282157f58ca (diff) | |
gnu: python-pytorch-for-r-torch: Fix build and RUNPATH.
* gnu/packages/machine-learning.scm (python-pytorch-for-r-torch):
[arguments] <#:phases>: In 'use-system-libraries', replace the
'build_bundled' import workaround with a no-op 'create_bundled'
binding. Adjust functorch INSTALL_RPATH to "$ORIGIN/../torch/lib".
Change-Id: I6386137d658dc11c6b0a3b553de87524a4b1d708
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #6004
| -rw-r--r-- | gnu/packages/machine-learning.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 66871b229d1..abad5200104 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -5425,6 +5425,12 @@ in the audio domain.") ;; For Vulkan (substitute* "CMakeLists.txt" (("append_cxx_flag.*-Werror=(return-type|range-loop-construct).*") "")) + ;; In this variant functorch is installed directly under + ;; site-packages/functorch, so use a direct rpath to + ;; site-packages/torch/lib. + (substitute* "functorch/CMakeLists.txt" + (("set_target_properties\\(\\$\\{PROJECT_NAME\\} PROPERTIES INSTALL_RPATH \"\\$\\{_rpath_portable_origin\\}/\\.\\./torch/lib\"\\)") + "set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH \"$ORIGIN/../torch/lib\")")) (substitute* (cons* "torch/csrc/Module.cpp" @@ -5454,7 +5460,11 @@ in the audio domain.") (setenv "USE_QNNPACK" "0")) (substitute* '("requirements.txt" "setup.py") (("sympy>=1\\.13\\.3") - "sympy>=1.13.1")))) + "sympy>=1.13.1")) + ;; Avoid ModuleNotFoundError while preserving setup.py flow. + (substitute* "setup.py" + (("from build_bundled import create_bundled") + "create_bundled = lambda *args, **kwargs: None")))) (replace 'skip-nccl-call (lambda _ ;; Comment-out `checkout_nccl()` invokation in build_pytorch(). |
