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.
0 Answers