From d8888f749702288e715136ce8157a8db887029b5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 9 Oct 2022 20:22:33 +0800 Subject: [PATCH] rust: glibc: add Rustc library search path --- chapter08/glibc.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index f4f553bc3..24e160963 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -469,18 +469,23 @@ unset ZONEINFO EOF - If desired, the dynamic loader can also search a directory and + The dynamic loader can also search a directory and include the contents of files found there. Generally the files in this include directory are one line specifying the desired library path. - To add this capability run the following commands: + Add this capability: -cat >> /etc/ld.so.conf << "EOF" +cat >> /etc/ld.so.conf << "EOF" # Add an include directory include /etc/ld.so.conf.d/*.conf EOF mkdir -pv /etc/ld.so.conf.d + Tell the dynamic loader how to find the libraries for Rustc: + +echo /opt/rustc/lib > /etc/ld.so.conf.d/rust.conf +ldconfig +