On a solaris server where I don't have admin, I am compiling various software and installing in $HOME/usr, and it's mostly working. However, some of the programs that I compile in this way depend on libiconv, which I have also installed in $HOME/usr/lib. These programs will not run unless I export LD_LIBRARY_PATH=$HOME/usr/lib. If I do not do this, I get an error such as the following:
ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory
This is expecially bad for rsync, because it does not always operate in a shell environment, so I don't even have the option of using LD_LIBRARY_PATH to make it work. Is it possible to compile my programs such that I do not have to set LD_LIBRARY_PATH for them to run?