help-gplusplus
[Top][All Lists]
Advanced

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

Re: Installing gcc4.3.0 without root


From: Lionel B
Subject: Re: Installing gcc4.3.0 without root
Date: Mon, 7 Jul 2008 12:49:12 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

On Mon, 07 Jul 2008 05:07:08 -0700, daviddoria wrote:

> I cannot use the package manager as I don't have root.  I am working on
> RedHat 4.

I'm not very clued up on rpm, but I suspect there might be options to do 
local non-root installs (maybe the --prefix or --relocate option? You 
might like to ask on a rpm or Red Hat forum).

> I did not do a make install.  I thought make install just copied all the
> files into the "proper" directories (ie. /usr/local/lib and others).  I
> thought since I was going to point it to /home/dave/mpfr anyway that I
> didn't need to do a make install?

Who knows what `make install' does for any particular package... I don't 
believe you can assume in general that *not* doing a `make install' will 
leave everything in the right place relative to the build directory.

Here's how I tend to do things (I also work sometimes on a Red Hat system 
without root). I have created a directory /home/lionelb/local with a src 
subdirectory as well as (much of) the hierarchy you'd find under /usr 
(i.e. bin, lib, include, doc, share, etc, man, ...). Then if I want to 
install a tarball, say xxx.tgz, I'll unpack it to
/home/lionelb/local/src/xxx, configure it with
--prefix=/home/lionelb/local, `make' and then `make install'. That way 
everything ends up in the right place under my /home/lionelb/local 
hierarchy. I then make sure /home/lionelb/local/bin is in my PATH and 
Everything Works (tm)*. So you might try something along those lines.

BTW, if you go this route, there are some issues for a GCC install. 
Firstly, make sure you *don't* try to build GCC itself from its own 
source directory - that's a no-no - rather, create a special `build' 
directory for it. Secondly, it may not be advisable to use the same
--prefix for GCC as for your other `local' installs (apart from anything 
else, it may then end up on your PATH and override your system GCC, which 
could potentially be a recipe for mayhem...).

*Not quite - if you install *libraries* in non-standard locations you may 
have to faff about with link options (LDFLAGS) or (yucky) add your non-
standard `lib' directories to LD_LIBRARY_PATH for dynamic linking to 
work. But that shouldn't be an issue for your GCC install as regards 
mpfr, if you specify --with-mpfr (I've a feeling someone is going to tell 
me I'm wrong here...).

-- 
Lionel B


reply via email to

[Prev in Thread] Current Thread [Next in Thread]