Skip to content

Commit d88c6f0

Browse files
dulinrileymeta-codesync[bot]
authored andcommitted
Add conda lib to static linker search path for builds (meta-pytorch#1972)
Summary: Pull Request resolved: meta-pytorch#1972 Our install instructions say to use `conda install libunwind`, but the rust compiler is unable to locate it. Add a `-L` flag when building from within python to add the conda environment libraries. This should help rust locate the libraries it needs. Reviewed By: colin2328 Differential Revision: D87665225 fbshipit-source-id: 75393719c1feec435aa31915687929ce74f1cd43
1 parent b1aeca9 commit d88c6f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ def run(self):
154154
"link-arg=-Wl,-rpath,$ORIGIN/../../..",
155155
"-C",
156156
"link-arg=-Wl,-rpath," + conda_lib,
157+
# Add the conda lib to the search path for the linker, as libraries like
158+
# libunwind may be installed there.
159+
"-L",
160+
conda_lib,
157161
]
158162
if py_lib:
159163
flags += ["-C", "link-arg=-Wl,-rpath," + py_lib]

0 commit comments

Comments
 (0)