This is the mail archive of the 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]

faq question about installation of several versions of gcc and linking at runtime of compiled programs


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
libraries at

This question is addressed early on in the FAQ about GCC published for
example at

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
least if
I understand the information in the section 2.3 about dynamic linker is
unable ...

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
some other
ways which you probably are well aware of, but none is implemented by
default when
the --prefix option at configure time is a non-standard location.

Thus I fail to see how libraries are found in the recommended solution
to installing
different versions of gcc. 

What is your views on this issue? Have I missed something or is the
information in
the FAQ incomplete?

Anders Lennartsson

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