gcc install/upgrade question

Stephen Croll scroll at airmail.net
Mon Nov 5 23:32:02 UTC 2007

bruce wrote:
> thanks for the replies. however, i'm not sure if anything else has to be
> done to be able to access the new gcc4.2 compiler/libs from the compiler.
> i'm pretty certain that i'd have to modify my env vars/paths, but i'm not
> sure where/what files...
In general, I believe you'll need/want to set the three environment

For convenience, in my .bashrc I do something similar to this:

      local tools_path=/opt/tools
      export PATH=$tools_path/bin:$PATH
      export LD_LIBRARY_PATH=$tools_path/lib64:$LD_LIBRARY_PATH
      export MANPATH=$tools_path/man:$MANPATH

I can then type 'toolspath' in a shell to have my environment
variables set when I want to use/access the compiler and other tools
I've installed.

Note that if you have other tools and libraries that you want to
install along with your compiler and you don't want to include a path
for each tool/lib (e.g. for /opt/gcc4.2.1, /opt/foo, /opt/bar, etc),
then you might want to check into something like GNU stow.

 From the web site http://www.gnu.org/software/stow/:

  GNU Stow is a program for managing the installation of software
  packages, keeping them separate (/usr/local/stow/emacs
  vs. /usr/local/stow/perl, for example) while making them appear to
  be installed in the same place (/usr/local).

The nice thing about GNU stow is that it is easy to completely replace
packages without worrying about leftover files littering a common
directory structure.

Compilation and installation is a bit more complicated though.
Steve Croll

More information about the fedora-list mailing list