This is the mail archive of the
mailing list for the GCC project.
faq question about installation of several versions of gcc and linking at runtime of compiled programs
- From: Anders Lennartsson <anders dot lennartsson at foi dot se>
- To: gcc at gnu dot org
- Date: Tue, 13 Aug 2002 12:04:58 +0200
- Subject: faq question about installation of several versions of gcc and linking at runtime of compiled programs
- Organization: FOI
I have read the GCC FAQ, in particular the parts about installation.
In addition I have read a number of documents, FAQs and manual pages
about libraries etc. and have a long experience of using these tools.
The background is that for obscure reasons we need to have several
different versions of gcc and related tools/libraries available on
a Solaris 8 machine. Compiling them is no big deal, with the --prefix
at configure time it is very straightforward.
However, sometimes I have had problems with binaries compiled
with a particular version of gcc, that does not find the runtime
This question is addressed early on in the FAQ about GCC published for
example at http://www.gnu.org/software/gcc/faq.html
The recommendation is to configure each build/version for installation
a separate directory structure and then with links in /usr/local/bin
fix the inclusion of the names.
It is not to different from the way I've set things up.
Based on my experience, this solution suggested in the FAQ will also
suffer from some libraries not found at startup time, because nowhere is
this information brought to the linker in a standard configuration. At
I understand the information in the section 2.3 about dynamic linker is
There is of course the possibility, detailed in section 2.3, of
some rpath option (or relative of that depending on linker etc) in the
always given to gcc. But this solution is not recommended. There are
ways which you probably are well aware of, but none is implemented by
the --prefix option at configure time is a non-standard location.
Thus I fail to see how libraries are found in the recommended solution
different versions of gcc.
What is your views on this issue? Have I missed something or is the
the FAQ incomplete?