Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Help in installing gcc in ubuntu

Status
Not open for further replies.

Ibaghdadi

Newbie level 6
Joined
Dec 26, 2007
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Lebanon
Activity points
1,398
Hi;
I am having some troubles in installing GCC . Actually i followed the instructions in this website :Installing the GNU tools (avr-gcc) for AVRs But I think after trying all the possible ways I reached to a dead end, I hope if someone can help me. I will explain what I did in details, because I am not sure where the error is:
so after creating the directories and specifying the Path (as mentioned in that website) I had to go to binutils folder to configure it but the following command :
Code:
../configure --target=avr --prefix=/usr/local/avr --program-prefix="avr-"
Code:
bash: ../configure: NO such file or directory
I don't know if what I did is right but I tried to remove a dot from(../configure) and then it worked correctly I guess.
After that I installed it with make and make install without any problems.

Now the problem appeared again in configuring gcc the following command did not work at first.
Code:
../configure --target=avr --prefix=/usr/local/avr --enable-language=c --program-prefix="avr-"
But after some search I downloaded gmp4.3.2 and mpfr 3.0.1, untared them and put them in the gcc folder under the names of gmp and mpfr. and I ran ./configure and make and make install in each folder.

After that the ../configure (mentioned earlier) command in the gcc folder worked and make file was created but the command make did not work and gave me the following error:



I also tried the following command:
Code:
sudo apt-get install build-essential
Can some one help me please?
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,995
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
ission to create /usr/local/avr ?
 

flanello

Advanced Member level 1
Joined
Jan 9, 2008
Messages
435
Helped
91
Reputation
182
Reaction score
81
Trophy points
1,308
Activity points
3,491
Perhaps you can run
Code:
make distclean
as mentioned in the error message.
 

bluehole

Full Member level 6
Joined
Sep 1, 2009
Messages
345
Helped
74
Reputation
148
Reaction score
73
Trophy points
1,308
Location
Some where In INDIA
Activity points
3,290
GCC needs to compile on a separate directory you should pass a build dir kind of thing.

But Why not try CrossTool-NG ? it will take all your hassles and give you a cross compiler.
 

navenmou

Full Member level 4
Joined
Sep 25, 2010
Messages
228
Helped
49
Reputation
98
Reaction score
46
Trophy points
1,318
Location
Bangalore, India
Activity points
2,588
Hii dude

Why didi you all that much of lengthy process...
just follow the below instructions for installing GCC

open your terminal and

type

"sudo apt-get install gcc"

then it automatically download required packages and install it...

so once try it...
 

bluehole

Full Member level 6
Joined
Sep 1, 2009
Messages
345
Helped
74
Reputation
148
Reaction score
73
Trophy points
1,308
Location
Some where In INDIA
Activity points
3,290
Hii dude

type

"sudo apt-get install gcc"

then it automatically download required packages and install it...

so once try it...
Well The OP asked about gcc for AVR. So if your distribution HAS a gcc-avr then only you can use "apt-get".

Well you are very correct but ...:lol:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top