bmarkus
Posts: 32
Joined: Sat Sep 15, 2012 10:32 am

Building GCC on Raspbian

Mon Oct 01, 2012 5:47 pm

Hi,

I'm trying to build GCC 4.6.3 and 4.7.2 on Wheezy 2012-7-15 with no success. At different phases, but it fails. Current status building 4.7.2 is

Image

Did anyone built GCC on Raspberry itself?

Thanks... Bela

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Building GCC on Raspbian

Mon Oct 01, 2012 6:37 pm

In general when you see "Killed" in a build failure like that it means you ran out of memory/swap and the kernels OOM killer stepped in and killed one of the build tools. The fix is to add more swap.

Also what source are you building from. Last I heard it was not possible to use unpatched upstream gcc on debian (and by extension raspbian) due to multiarch related issues.

bmarkus
Posts: 32
Joined: Sat Sep 15, 2012 10:32 am

Re: Building GCC on Raspbian

Mon Oct 01, 2012 6:54 pm

Thanks, will increase swap. Trying to compile 4.6.3 I faced to the multilib issue, specially missing header files (bits/predefs.h if I remember well) which were not seen by GCC; symlinking them to /usr/include solved but in building libs got an error of linking incompatible object files, mixed vfp.

Tried to crosscompile GCC on x86 also with a ct-ng created build system. It works fine till the libs (again) where it is using the native x86 LD instead if the crosstool LD and fails obviously. At least it fails faster :D

bmarkus
Posts: 32
Joined: Sat Sep 15, 2012 10:32 am

Re: Building GCC on Raspbian

Sun Oct 07, 2012 6:38 pm

Increasing SWAP did the trick, I could build GCC 4.6.3 native in Raspbian.

Return to “Raspberry Pi OS”