sai1995
Posts: 9
Joined: Mon Mar 21, 2016 4:58 pm

C++ internal compile error

Tue Mar 29, 2016 6:55 am

Hi again

Im building opencv. I was doing MAKE, but now at 91% after 8 hours of waiting im facing the following issue guys

c++: internal compiler error: killed (program cc1plus)
and it states certain modules have failed target directories and all! normal make interrupt issues! :(

I gave a go at google.. it said that its because of the compiler and it ran out of memory! how to fix this guys..please help me

Im using ubuntu mate 15.10 with pi 2 and i did job 2 -j2 in make command

Thanks in advance

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia

Re: C++ internal compile error

Tue Mar 29, 2016 8:09 am

You can create a swap file. There is a thread about it in the C/C++ sub forum about building g++ on the Raspberry Pi that has the specific ... is it possible to compile a newer gcc/ g++ on the pi itselve

User avatar
jahboater
Posts: 8128
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: C++ internal compile error

Tue Mar 29, 2016 9:28 am

To create a 1GB swapfile. You will need to re-do the swapon if you reboot the Pi.

Code: Select all

sudo dd if=/dev/zero of=/swapfile1GB bs=1M count=1024
sudo mkswap /swapfile1GB
sudo swapon /swapfile1GB

User avatar
topguy
Posts: 7284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: C++ internal compile error

Tue Mar 29, 2016 9:51 am

You could also remove the "-j2" which makes it run two build jobs in parallel, that should also reduce memory usage.

sai1995
Posts: 9
Joined: Mon Mar 21, 2016 4:58 pm

Re: C++ internal compile error

Tue Mar 29, 2016 10:57 am

thank you all !

what topguy suggested did the trick! processing 2 jobs was a bit more for this device! :)

Thank you jahboater and andy.. for suggesting me those idea. As im a noob i followed topguy

Thanks all !

Return to “General discussion”