From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4842 invoked by alias); 6 Aug 2014 10:24:06 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 4832 invoked by uid 89); 6 Aug 2014 10:24:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Aug 2014 10:24:04 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 06 Aug 2014 11:24:01 +0100 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 6 Aug 2014 11:23:59 +0100 Message-ID: <53E2023E.90404@arm.com> Date: Wed, 06 Aug 2014 10:24:00 -0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Syed Ahsan Ali Bokhari , Jonathan Wakely CC: =?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?= , gcc-help Subject: Re: How to uninstall pre-installed previous version and install new References: <53E0A4B6.1090007@gmail.com> In-Reply-To: X-MC-Unique: 114080611240106001 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00041.txt.bz2 On 06/08/14 11:11, Syed Ahsan Ali Bokhari wrote: > I have set following paths in .bashrc to correspond to the latest > installation of gcc > export PATH=3D$PATH:/opt/gcc-4.9.1/bin > export LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/opt/gcc-4.9.1/lib:/opt/gcc-4.9= .1/lib64 > > but still on run time the previous binaries/libraries are being found > > [rcm@rcm ~]$ which gcc > /usr/bin/gcc > > How to handle this? PATH is usually read left to right, so you'd want to add your new path=20 to the beginning like so: export PATH=3D/opt/gcc-4.9.1/bin:$PATH Kyrill > On Wed, Aug 6, 2014 at 8:16 AM, Syed Ahsan Ali Bokhari > wrote: >> Well explained Jonathan >> Thanks >> >> On Tue, Aug 5, 2014 at 10:10 PM, Jonathan Wakely = wrote: >>> On 5 August 2014 17:54, Syed Ahsan Ali Bokhari wrote: >>>> Yes I did that before, I removed the gcc and when I tried to build a >>>> new gcc from source it crashed complaining that no C compiler is >>>> present. Isn't it weird that installation of C compiler needs C >>>> compiler as a pre-requisite.? >>> You don't need a compiler to install a C compiler, you need a compiler >>> to *compile* a C compiler, just like you need a compiler to compile >>> any program. >>> >>> If you just want to install gcc you use 'yum' or 'rpm' to do that, >>> instead of compiling it yourself. >>> >>> If you want to compile gcc, obviously you need a compiler of some kind. >>> >>> It might seem weird but it's not, it's quite normal. >>> http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29 >> >> >> -- >> Syed Ahsan Ali Bokhari >> Electronic Engineer >> Research & Development Division >> Pakistan Meteorological Department H-8/2, Islamabad. >> Phone # off +92519250361 >> Cell # +923155145014 >> Fax # +92519250368 >> www.pmd.gov.pk > >