This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to uninstall pre-installed previous version and install new
- From: Raghunath Lolur <raghunathlolur dot subscriptions at gmail dot com>
- To: Syed Ahsan Ali Bokhari <ahsan dot pmd at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 6 Aug 2014 18:49:02 +0530
- Subject: Re: How to uninstall pre-installed previous version and install new
- Authentication-results: sourceware.org; auth=none
- References: <CAOjP03VxDgEAwMGHZoTbGiKbZgE+eNAsOz7rGt9jbFKS=36_og at mail dot gmail dot com> <CAH6eHdQdE=VNB0G1u_bFkC6_8cE34=idAB3jegSVZ4+7EamaaQ at mail dot gmail dot com> <53E0A4B6 dot 1090007 at gmail dot com> <CAOjP03X4u8Q8eDzarSXL6ebxR3ZxZJ2B3aS2vFenomQ1Ddop-g at mail dot gmail dot com> <CAH6eHdRRxKCit_3wJ31CtZU0GhLTi-StbwMoQy-oa4txPZyYNA at mail dot gmail dot com> <CAOjP03WdV9Km2Y6aRscTJjxSuf4eSt3b12V0ftF_wTT7oyW80g at mail dot gmail dot com> <CAOjP03XJ3J4vLWtRrRsafTigW4_g1YzvbLpGt9UrWQqWjhcmSw at mail dot gmail dot com> <53E2023E dot 90404 at arm dot com> <CAOjP03WuEY83wuU9mOdeoBku9yatf3wkM7uESGDUizukb1NDzg at mail dot gmail dot com>
Yes, the same holds for LD_LIBRARY_PATH also.
In fact, a program/library will be searched in the order of sequence
of path specified from left to right in its corresponding environment
variable.
Regards,
Raghunath Lolur.
On Wed, Aug 6, 2014 at 6:21 PM, Syed Ahsan Ali Bokhari
<ahsan.pmd@gmail.com> wrote:
> Thank you Kyrill. Now the new path is being read. Does the same hold
> for LD_LIBRARY_PATH?
>
> On Wed, Aug 6, 2014 at 3:23 PM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>>
>> 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=$PATH:/opt/gcc-4.9.1/bin
>>> export
>>> LD_LIBRARY_PATH=$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 to
>> the beginning like so:
>>
>> export PATH=/opt/gcc-4.9.1/bin:$PATH
>>
>> Kyrill
>>
>>
>>
>>> On Wed, Aug 6, 2014 at 8:16 AM, Syed Ahsan Ali Bokhari
>>> <ahsan.pmd@gmail.com> wrote:
>>>>
>>>> Well explained Jonathan
>>>> Thanks
>>>>
>>>> On Tue, Aug 5, 2014 at 10:10 PM, Jonathan Wakely <jwakely.gcc@gmail.com>
>>>> 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
>>>
>>>
>>>
>>
>>
>
>
>
> --
> 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