You are not logged in.

#1 2009-06-13 13:31:36

Yes
Member
Registered: 2008-03-29
Posts: 163

[SOLVED] Two different versions of a program, how to tell bash

I've got two different versions of arm-elf-gcc installed, one in /usr/bin and one in /usr/local/arm-elf/bin.  I'm trying to compile something that needs the version in /usr/local/arm-elf/bin, how do I tell bash that I want to use that one, and not the one in /usr/bin?

Thanks!

Last edited by Yes (2009-06-13 14:24:22)

Offline

#2 2009-06-13 13:36:05

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [SOLVED] Two different versions of a program, how to tell bash

export PATH="$PATH:/usr/local/arm-elf/bin"

should do the trick


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-06-13 13:36:57

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] Two different versions of a program, how to tell bash

Probably with something like:

CC=/usr/local/arm-elf/bin/gcc ./configure

Offline

#4 2009-06-13 13:54:27

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [SOLVED] Two different versions of a program, how to tell bash

@arkham: bash will use the binary in the first path it finds, so it should be the other way around.

Offline

#5 2009-06-13 13:59:56

Yes
Member
Registered: 2008-03-29
Posts: 163

Re: [SOLVED] Two different versions of a program, how to tell bash

arkham wrote:
export PATH="$PATH:/usr/local/arm-elf/bin"

should do the trick

I tried that, and then when I run 'which arm-elf-gcc' it still says '/usr/bin/arm-elf-gcc'.  That means it's still using the wrong one right?

Running 'CC=/usr/local/arm-elf/bin/gcc ./configure' doesn't seem to have any change.

e: Running 'export PATH="/usr/local/arm-elf/bin:$PATH"' seems to have worked.  Lemme see if this compiles though...

Thanks : D

e: It worked! Thank you all!

Last edited by Yes (2009-06-13 14:24:06)

Offline

#6 2009-06-13 14:29:04

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [SOLVED] Two different versions of a program, how to tell bash

Procyon wrote:

@arkham: bash will use the binary in the first path it finds, so it should be the other way around.

Yeah.. I was 100% sure to have that written it the right way yikes


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

Board footer

Powered by FluxBB