This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LD_LIBRARY_PATH


On Sat, Nov 23, 2002 at 07:50:21PM +0100, Gerald Pfeifer wrote:
> This is an issue coming up again and again, and it really seems to
> burn users, especially since we switched to libgcc_s.so.
> 
> http://gcc.gnu.org/java/build-snapshot.html already has a bit on
> LD_LIBRARY_PATH, though I believe we also need something in our main
> installation documentation.
> 
> The questions is: What exactly do we want to document, and how?  Do
> we just want to state
> 
>   After the installation, you will probably need to add $prefix/lib
>   to LD_LIBRARY_PATH, so that dynamic executable can locate their
>   libraries
> 
> or something more elaborate?

If you want to be more elaborate, you can instruct them on how to
modify the specs file to automatically add the runtime path to the
link line. For example, on Solaris, we add:
  *rpath:
  -R/usr/local/lib

  *rpath64:
  -R/usr/local/lib/sparcv9

and change "%{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}" in
*link_command to:
  %{!nostdlib:%{!nodefaultlibs:%{!m64:%(rpath)} %{m64:%(rpath64)} %(link_gcc_c_sequence)}}

-- 
albert chin (china@thewrittenword.com)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]