This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Manual intallation with admin priviledges: what to put in my path?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Sebastian Kroppen <zwiebel dot genuss at gmx dot de>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 20 Jul 2017 20:44:16 +0100
- Subject: Re: Manual intallation with admin priviledges: what to put in my path?
- Authentication-results: sourceware.org; auth=none
- References: <98649c7c-f0ab-6459-dd76-d4881038ac8b@gmx.de>
On 20 July 2017 at 18:24, Sebastian Kroppen wrote:
> Hello,
>
> I have been in a situation where I needed to install a recent GCC from
> scratch in my home directory (Linux). I do not have administrator
> priviledges on my machine.
>
> I have followed an answer to a question on stackoverflow [1], which in turn
> refers to a wiki page of yours [2].
>
> [1] https://stackoverflow.com/a/10662297/
> [2] https://gcc.gnu.org/wiki/InstallingGCC/
>
> I have replaced 4.6.2 with 7.1.0 in those commands. My configure command was
> $PWD/../gcc-7.1.0/configure --prefix=$HOME/gcc-7.1.0 --disable-multilib
>
> Running make and make install completed without fatal errors.
>
> However, where do I find the executables?
Did you try looking under the --prefix location?
Specifically in $HOME/gcc-7.1.0/bin
> More generally: how do I make GCC-7.1.0 available in my daily work?
>
> Yes, I am able to amend my path variable.
So do that then :-)
You might also want to read
https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths
> Additional question:
> the script on the two linked pages seems to install GCC in the same
> directory as the source files. Is that a good idea?
No, it's a terrible idea, but it only does that if you unpack the
source files in your home directory. I didn't think of that case when
writing the wiki page (I would never litter my home directory with
unpacked tarballs and "objdir", I'd do it in /tmp/ or a less permanent
location.)