Compile Error: Wheezy 2013-09-10 Raspberry Pi Rev A (256 mb) dies on ofColor.cpp

I’ve got a clean install of the 2013-09-10 version of Wheezy installed on a Rev A (256mb RAM) raspberry pi. I’ve got 128 MB memory going to GPU and 128 going to CPU.

I’m following the install direction on the OF site. I get past the VC_IMAGE_TRANSFORM_T issue in ofAppEGLWindow.cpp

Upon running make after fixing for the error above, the compile dies when working on ofColor.cpp

ctangle.o -c ../../../libs/openFrameworks/types/ofRectangle.cpp  
Compiling ../../../libs/openFrameworks/types/ofColor.cpp  
g++ -Os -Wall -march=armv6 -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DTARGET_RASPBERRY_PI -DSTANDALONE -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -pthread -D_REENTRANT -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gstreamer-1.0 -I/usr/include/alsa -I/usr/include/gtk-2.0 -I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I../../../libs/fmodex/include -I../../../libs/glfw/include -I../../../libs/glfw/include/GLFW -I../../../libs/kiss/include -I../../../libs/openssl/include -I../../../libs/openssl/include/openssl -I../../../libs/poco/include -I../../../libs/portaudio/include -I../../../libs/rtAudio/include -I../../../libs/tess2/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/video -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/types  -MMD -MP -MF ../../../libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/types/ofColor.d -MT../../../libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/types/ofColor.o -o ../../../libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/types/ofColor.o -c ../../../libs/openFrameworks/types/ofColor.cpp  
{standard input}: Assembler messages:  
{standard input}:24819: Warning: end of file not at end of a line; newline inserted  
g++: internal compiler error: Killed (program cc1plus)  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.  
make[1]: *** [../../../libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/types/ofColor.o] Error 4  
make: *** [Release] Error 2  
make: Leaving directory `/home/pi/openFrameworks/libs/openFrameworksCompiled/project'  

I’ve tried several times now but no luck. Any thoughts?

In the meantime, I’m going to temporarily allocate more memory to the CPU as it seems like ccplus is using a lot of memory when compiling ofColor.cpp to see if that helps.

when compiling the core on a lower memory device you need to devote more RAM to the CPU. Reduce your CPU/GPU split to the lowest setting.

You can also look into running a distcc VM image. I typically run one when I work on the pi.

filmo - if you can get it to work, let me know the new memory allocation and I will update the docs

128 worked for me last time I tested but .80 may be taking up more elsewhere.

Also let me know if you can’t get it to work as we can create an option to skip all the named colors that are eating up the memory

I changed the split to 64 for GPU 192 for CPU and it compiled.

Now that it’s compiled, do I need to move GPU back to 128 for running OF?? Or should I just leave it at 64 ??

Thanks - I would change it back

As a follow up, I ultimately did need to change it back to 128 GPU in order to get raspivid to work. Raspivid did not work for me at 64 MB GPU on a 256 MB pi.

Curious - are you running X11?

[quote=“filmo, post:4, topic:13291”]
I changed the split to 64 for GPU 192 for CPU and it compiled.[/quote]

Confirming here that this worked for me too: I had the exact same error occurring on the exact same moment (while compiling ofColor) on a first generation model B. Setting the GPU at that moment to 64 MB worked: no more errors.

However, because the compiler continued from the point it got stuck at before I wouldn’t be 100% sure in claiming that setting it to 64 MB to begin with would work fine. Also, because everything is taking ages to compile I’m not enthusiastic about trying it out.

Cool - I’ll change the docs to make the requirement 192MB.

Once you compile OF, simple apps take much less time. However apps with some addons like OpenCv still take some time. If you plan on working with the RPi much I highly recommend trying to set up distcc. If you are on a Mac I have recently put together the below instructions. They should be considered “beta” but I have done it on 3 Macs now

Linux instructions are on the setup guide

After a failed attempt and then a successfull attempt I had problems compiling examples, which failed at retrieving ofColor. I had to recompile openFrameworks using the -B option:
make -B Release -C /home/pi/openFrameworks/libs/openFrameworksCompiled/project