Score:0

ld is unresponsive to both LD_LIBRARY_PATH and LIBRARY_PATH

vn flag

I'm working on a shared CentOS server where I don't have root.

cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)

I recently updated my GCC/G++ version to 9.4.0, but now all of my C++ builds are failing at the linking step. I've tracked down the issue to the fact that ld is looking for libraries in directories that I haven't told it to and picking up old versions of libstdc++ that I can't get rid of. Moreover, it seems to be completely unresponsive to both LD_LIBRARY_PATH and LIBRARY_PATH.

-bash-4.2$ export LD_LIBRARY_PATH=/public/users/jeizenga/.local/lib:/public/users/jeizenga/.local/lib64
-bash-4.2$ export LIBRARY_PATH=/public/users/jeizenga/.local/lib:/public/users/jeizenga/.local/lib64
-bash-4.2$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' '\n'
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")=
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib")

What am I missing here? Everything I've found so far has suggested using these environment variables to solve the problem, but that's not working for me.

cn flag
Add the output of `echo $LIBRARY_PATH` and `echo $LD_LIBRARY_PATH` to the question.
stark avatar
mu flag
check ld.so.conf and ld.so.conf.d
Jordan avatar
vn flag
@NasirRiley the `echo`s give what you'd expect from the `export` statement. @stark from the contents of `ls.so.conf` are `include ld.so.conf.d/*.conf` and `ls /etc/ld.so.conf.d/` gives a bunch of `.conf` files. I'm not quite sure how to interpret these though.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.