Re: Can't install gcc 3.2 alongside gcc 2.96 on Red Hat 7.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 19, 2004 at 03:28:39PM +0000, Jonathan Watt wrote:
> Claudio Bley wrote:
> 
> >On Wed, Feb 18, 2004 at 07:54:00PM +0000, Jonathan Watt wrote:
> >
> >>./configure
> >>make bootstrap
> >
> >
> >Hm, according to the installation instructions it is not supported to build
> >GCC in its source directory. Maybe you meant to run something like
> >../gcc-src/configure by the configure line above or you were just lucky
> >enough that the built succeeded.
> 
> Sorry, that was slightly misleading. I did use a build directory. I just 
> meant I didn't use any options.

OK, that's what I presumed.

> >>Everything seems to have gone okay (at least it didn't terminate with an 
> >>error message). Am I correct in thinking that if I now do 'make 
> >>install', all the files - including library files for the standard C++ 
> >>library etc - will be installed below /usr/local? 
> >
> >
> >Yes.
> >
> >
> >>What will the directories be? 
> >
> >
> >lib files into /usr/local/lib; gcc specific libs in /usr/local/lib/gcc-lib
> >include files into /usr/local/include
> >
> >etc.
> >
> >Just do a 'make -n install' to see what would be done.
> 
> That command gave me a flood of far, far too much information to 
> decipher. But I assume there are other directories, for example I assume 
> the binaries go in /usr/local/bin? Would you, or anyone else, know what 
> they are?
> 
> >>I absolutely must not overwrite the gcc 2.96 files.
> >
> >
> >Eventually, in the worst case you could alwys re-install the gcc-2.96 RPM
> >files...
> 
> Okay, that's reassuring.
> 
> >If you're really paranoid about this you could just change permissions on 
> >the
> >/usr/local directory and do "make install" with an unprivileged user.
> 
> Wouldn't I also need to change the privileges on the other existing 
> directories that the install will need to write to, like 
> /usr/local/include? Another reasons for wanting to know about all such 
> directories.

Yes, you'd had to, like 'chown -R user /usr/local/'. After installation just
change it back to be owned by root.

But, I just found out that you may just use 'make DESTDIR=path-to-rootdir
install' as mentioned at http://gcc.gnu.org/install/finalinstall.html to
have it install (temporarily) to a different location. 

> >The include directories are basically the same for both compilers except 
> >for
> >the libstdc++ headers. You should not have to specify any option to gcc in
> >order to let it find its specific headers or libraries. 
> 
> So gcc 2.96 uses /usr/local/include too? That doesn't seem to be the 
> case on my computer. How do the compilors tell which are their 
> (standard) headers and libraries? A file naming convention? I'm just 
> curious.

Yes, gcc 2.96 should search /usr/local/include too because it's a standard
system include directory. Generally, the /usr/local hierarchy is for use by
the system administrator when installing software locally.

Try 'cat /dev/null | gcc -v -E -':

...]
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc-lib/i486-linux/3.3.3/include
/usr/include
[...]

GCC itself does not supply many headers and libraries. Instead it uses the C
standard library of the system and other headers/libraries installed in the
standard locations (/usr/{include,lib} and /usr/local/{include,lib}) by
default.

Have a look at http://gcc.gnu.org/install/finalinstall.html which gives a
good overview where the various files are to be installed.

Cheers.
-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux user                         - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux