From 667e17a4212f491b41096c1b193bef06723591e3 Mon Sep 17 00:00:00 2001 From: Riley Dulin Date: Mon, 24 Nov 2025 11:04:31 -0800 Subject: [PATCH] Add conda lib to static linker search path for builds (#1972) Summary: 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 --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index c1e0fb38d..1f1ec13d3 100644 --- a/setup.py +++ b/setup.py @@ -154,6 +154,10 @@ def run(self): "link-arg=-Wl,-rpath,$ORIGIN/../../..", "-C", "link-arg=-Wl,-rpath," + conda_lib, + # Add the conda lib to the search path for the linker, as libraries like + # libunwind may be installed there. + "-L", + conda_lib, ] if py_lib: flags += ["-C", "link-arg=-Wl,-rpath," + py_lib]