Commit 0d93135
zhangyue
build(pr47): add torch.libs/ to rpath-link for bundled libgfortran
torch wheels on aarch64 (including `torch==2.9.0+cpu` used in the ascend
CI container) are auditwheel-repaired and bundle transitive dependencies
(`libgfortran-<hash>.so`, `libopenblasp-<hash>.so`) into a sibling
`torch.libs/` directory. `torch.utils.cpp_extension.library_paths()`
returns only `torch/lib`, so the linker cannot resolve the bundled NEEDED
entries and fails with `undefined reference to _gfortran_etime@GFORTRAN_8`.
Add `torch.libs/` to both the build and install rpath, plus `-rpath-link`
for link-time resolution without polluting our final NEEDED list.1 parent 006aafd commit 0d93135
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
140 | 162 | | |
141 | 163 | | |
142 | 164 | | |
| |||
0 commit comments