triplus
Posts: 30
Joined: Thu Nov 21, 2013 9:03 pm
Location: Belgium, Vilvoorde
Contact: Website Facebook Twitter YouTube

Compiling and installing gcc 4.8.x

Sun Jan 05, 2014 8:36 pm

Hello

I've been trying to install gcc 4.8.2 on my raspberry, because i need it to compile something else (http://rathena.org/board/topic/78187-ra ... =raspberry)

I have tried many different ways, but i haven't succeeded so far... What i did so far:

-Make a clone from github and run the "make" command. This worked for a while, but then it began to give missing file errors. I tried fixing some of them, but then i noticed i began to change(duplicate) certain files that i don't think should be moved from position.

-I tried crosscompiling with eclipse, but this also gave me missing file errors.

Is there any guide that will work, or can anyone give me good instructions on how to get a working gcc 4.8 on my raspberry?

I don't care if i have to compile on my raspberry since it is on 24/7.

I found many guides on how to get gcc working on ubuntu, but that did not work. Also corsscompiling worked for a simple hello world program (but i did not run it on my raspberry, but at least it didn't give me errors), but for gcc 4.8 it didn't work.

Thanks in advance
Joren C.
- Raspberry Pi Model B since 2013.
- Raspberry Pi Zero since October 2016
- Raspberry Pi 3 since: December 2016

User avatar
DougieLawson
Posts: 30420
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Compiling and installing gcc 4.8.x

Sun Jan 05, 2014 11:04 pm

Update /etc/apt/sources.list to have jessie wherever you've currently got wheezy

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
reboot

And the stock gcc that gets installed is:
ii gcc 4:4.8.2-1 armhf GNU C compiler
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

triplus
Posts: 30
Joined: Thu Nov 21, 2013 9:03 pm
Location: Belgium, Vilvoorde
Contact: Website Facebook Twitter YouTube

Re: Compiling and installing gcc 4.8.x

Mon Jan 06, 2014 12:39 pm

I never tought of actually upgrading my pi... that seems like the easiest way of doing this. I'm testing this right now, getting the packages ;)

Thanks!
- Raspberry Pi Model B since 2013.
- Raspberry Pi Zero since October 2016
- Raspberry Pi 3 since: December 2016

triplus
Posts: 30
Joined: Thu Nov 21, 2013 9:03 pm
Location: Belgium, Vilvoorde
Contact: Website Facebook Twitter YouTube

Re: Compiling and installing gcc 4.8.x

Mon Jan 06, 2014 2:45 pm

It worked! now onto the next step, thank you!
- Raspberry Pi Model B since 2013.
- Raspberry Pi Zero since October 2016
- Raspberry Pi 3 since: December 2016

zappfinger
Posts: 21
Joined: Tue Nov 26, 2013 7:25 pm

Re: Compiling and installing gcc 4.8.x

Wed Dec 28, 2016 11:15 pm

This does not work for me. I followed the steps but my gcc version stayed the same:

gcc version 4.6.3 (Debian 4.6.3-14+rpi1)

Return to “Advanced users”

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 18 guests