[opensource-dev] Building the viewer after the latest commits

Henri Beauchamp sldev at free.fr
Thu Aug 28 11:11:58 PDT 2014


On Thu, 28 Aug 2014 15:53:43 +0200, Lance Corrimal wrote:

> Hi,
> 
> So how do I get gcc 4.6 on debian squeeze? Building the whole gcc
> toolchain from source?

I don't know Debian distros well enough, but I suppose that their
packaging system got the equivalent of rpm-based ones and allow
you to grab a source package from a newer or older Debian version
and recompile it under your installed version...

So yes, you'd have to rebuild gcc and ancillary programs (cpp, g++,
etc) and libraries (especially libstdc++), that should normally be
packaged together.

Note that if you are running a *newer* version of Debian (which should
be the case if you have got gcc 4.7+ installed on your system), then
you may even grab the binaries from the older Debian versions and
install them on your system: since your glibc library will be newer
than the one the older gcc was built against, the old binaries will
run just fine on your system.
However, note that distros usually make a distinction between the
"system compiler" (the one used to build all the packages, and
especially the kernel and modules for your distro version) and other
(often older) compilers (sometimes required to be able to build
antiquated software): you shall not overwrite your system compiler
with another one when installing the latter... Rpm-based distros
use different binary names for all compilers (for example:
/usr/bin/gcc4.6 instead of just /usr/bin/gcc) and use "alternative"
links (have a look at /etc/alternatives) to link the various compiler
versions to a soft link (/usr/bin/gcc); an "update-alternatives"
command is available to automatically update all the links (links to
gcc, g++, cpp, libstdc++, etc must also be updated together)
automatically, allowing you to easily switch from one version to
another.

Henri.


More information about the opensource-dev mailing list