Missing cairo-features.h to compile libs/OpenFrameworks

Hi,

I installed Eclipse on OS X 10.6.8 and OF 0072 for android by following instructions.

When it comes to build libs/OpenFrameworks I get this error:

[pre][…]
In file included from …/…/…/openFrameworks/graphics/ofCairoRenderer.cpp:1:0:
…/…/…/openFrameworks/graphics/ofCairoRenderer.h:4:28: fatal error: cairo-features.h: No such file or directory
compilation terminated.[/pre]

The cairo-features.h file seems to be in every other OF version I have but not on the only android one.

What do I miss ?

The file cairo-features.h is in there, the problem is that the libs project somehow isn’t linked to the openFrameworks project. I’m having the same issues when I installed it on Mac OS X 10.7.5 this afternoon. Haven’t found a way to link them yet.

The cairo lib is not in the of 72 android zip file (nor in the OS X one). Is this intended ?

I tried to copy it from a 71 folder (along with the fmodex that was also missing after cairo stuff compiled).
Don’t know if it is the correct version, but now openFrameworks compiles.

Next error now when building androidEmptyExample:

[pre]collect2: ld terminated with signal 5 [Trace/BPT trap]
dyld: lazy symbol binding failed: Symbol not found: _memmem
Referenced from: /Users/prossel/Documents/Android/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/…/lib/gcc/arm-linux-androideabi/4.6.x-google/…/…/…/…/arm-linux-androideabi/bin/ld.gold
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _memmem
Referenced from: /Users/prossel/Documents/Android/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/…/lib/gcc/arm-linux-androideabi/4.6.x-google/…/…/…/…/arm-linux-androideabi/bin/ld.gold
Expected in: /usr/lib/libSystem.B.dylib

make[1]: *** [libs/armeabi/libOFAndroidApp.so] Error 1
make: *** [AndroidDebug] Error 2[/pre]

Could it be because I’m on OS X 10.6 ?

I was also able to compile openFrameworks by adding the cairo and fmodex from the OF0072 Mac OS X package.

Can’t compile the examples as well, but I get other errors.

Hi
sorry, there’s a bug in the android package, you can solve it by deleting:

libs/openFrameworks/sound/ofFmodSoundPlayer.cpp
libs/openFrameworks/sound/ofFmodSoundPlayer.h
libs/openFrameworks/graphics/ofCairoRenderer.cpp
libs/openFrameworks/graphics/ofCairoRenderer.h

those files are not used by the android version so the corresponding libraries are not there but the makefile is trying to compile them anyway, so deleting them is safe. i’ll fix the makefile soon

Thanks arturo, your message solves the compilation problem.

However, I still face this error. My guess is that OS X 10.6 does not provide something that is required by the link operation. Can you confirm ?

10:49:26 **** Build of configuration AndroidDebug for project androidVBOExample ****
make AndroidDebug
make DebugAndroid
linking android libs/armeabi/libOFAndroidApp.so android/armeabi
mkdir -p libs/armeabi
/Users/prossel/Documents/Android/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-g++ -o libs/armeabi/libOFAndroidApp.so obj/androidDebug/src/main.o obj/androidDebug/src/testApp.o obj/androidDebug/addons/ofxAndroid/src/ofAppAndroidWindow.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidAccelerometer.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidGPS.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidLogChannel.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidSoundPlayer.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidSoundStream.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidUtils.o obj/androidDebug/addons/ofxAndroid/src/ofxAndroidVideoGrabber.o obj/androidDebug/addons/ofxAccelerometer/src/ofxAccelerometer.o obj/androidDebug/addons/ofxAndroid/libs/miniunzip/ioapi.o obj/androidDebug/addons/ofxAndroid/libs/miniunzip/miniunz.o obj/androidDebug/addons/ofxAndroid/libs/miniunzip/minizip.o obj/androidDebug/addons/ofxAndroid/libs/miniunzip/unzip.o obj/androidDebug/addons/ofxAndroid/libs/miniunzip/zip.o --sysroot=/Users/prossel/Documents/Android/android-ndk-r8b/platforms/android-8/arch-arm/ -nostdlib -L"/Users/prossel/Documents/Android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi" -fuse-ld=gold -Wl,–fix-cortex-a8 -shared -Wl,–no-undefined …/…/…/libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a …/…/…/libs/poco/lib/android/armeabi/libPocoNet.a …/…/…/libs/poco/lib/android/armeabi/libPocoXML.a …/…/…/libs/poco/lib/android/armeabi/libPocoFoundation.a …/…/…/libs/FreeImage/lib/android/armeabi/libfreeimage.a …/…/…/libs/freetype/lib/android/armeabi/libfreetype.a …/…/…/libs/glu/lib/android/armeabi/libGLU.a …/…/…/libs/tess2/lib/android/armeabi/libtess2.a -L…/…/…/libs/FreeImage/lib/android/armeabi -L…/…/…/libs/freetype/lib/android/armeabi -L…/…/…/libs/glu/lib/android/armeabi -L…/…/…/libs/openFrameworksCompiled/lib/android/armeabi -L…/…/…/libs/poco/lib/android/armeabi -L…/…/…/libs/tess2/lib/android/armeabi -lsupc++ -lz -lGLESv1_CM -llog -ldl -lm -lc /Users/prossel/Documents/Android/android-ndk-r8b/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libgnustl_static.a -lgcc
collect2: ld terminated with signal 5 [Trace/BPT trap]
dyld: lazy symbol binding failed: Symbol not found: _memmem
Referenced from: /Users/prossel/Documents/Android/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/…/lib/gcc/arm-linux-androideabi/4.6.x-google/…/…/…/…/arm-linux-androideabi/bin/ld.gold
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _memmem
Referenced from: /Users/prossel/Documents/Android/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/…/lib/gcc/arm-linux-androideabi/4.6.x-google/…/…/…/…/arm-linux-androideabi/bin/ld.gold
Expected in: /usr/lib/libSystem.B.dylib

make[1]: *** [libs/armeabi/libOFAndroidApp.so] Error 1
make: *** [AndroidDebug] Error 2

10:49:27 Build Finished (took 589ms)

just fixed both problems in develop in this commit:

https://github.com/openframeworks/openFrameworks/commit/9bbdf2149b9c3885e7e44f82e164341654536f3e

if you can use develop or you can just download those two files, makefile.android and makefile.examples that will fix it

Works great.

You’re the king of the makefile (and no doubt other things as well… :slight_smile:

Thanks.

Hi arturo!
I found the same problem in the v.0.9.2 RPI2 edition, so I succesfully inserted some extra “&& !defined(TARGET_RASPBERRY_PI)” into ofGrphics.cpp (avoid to call cairo features on rpi, which is not inc. in rpi package). Is that correct?

no, in the PI cairo is installed in the system so you shouldn’t need to comment that out

Are you sure? There isn’t any cairo in ofroot. (The only one I found is a script in of_v0.9.2_linuxarmv7l_release\scripts\apothecary\formulas\cairo.sh)
thx your answer.

no it’s not in of it’s installed in the system since linux uses cairo as it’s render library for gtk and other gui systems

Sorry for your time! Your first answer was perfect! Should have been enough! I found everything in my system!
“I Bag your pardon” again! :))