Compilation error of openFrameworks for Android on Ubuntu 11.04

Dears,

I would like ask for help here.
First, thanks for reading this.

Platform: Ubuntu 11.04 64 bit
IDE: Eclipse
NDK: android-ndk-r5b
openFrameworks version: https://github.com/openframeworks/openFrameworks.git

Descriptions:
According to the instructions from http://www.openframeworks.cc/setup/android-eclipse/. I was trying to build the openframeworks for android. When starting to compile the openFrameworks project, the linking errors happened.

Please have a look as the below image.

I tried to find the glut library in the openFrameworks folder.

At the folder $PATH_TO_OF/openFrameworks/libs/glut/lib, I just found osx, vs2010, and win_cb.
So does this cause the linking error ?
Could anyone provide the glut libraries for Linux platform ?

Again, thanks very much for any help.

Thanks & Regards,
Hans Chen

Dear all,

I tried to build the openFrameworks on the Mac platform, and it succeeded.
So could anyone provide the glut library for linux version ?
Thank you.

Regards,
Hans

hi , have a similar error… i receive an error about ofFBo and openlges…i have ubuntu 11.04 32 bit. Look at the image below. i have the last eclipse version fresh installed, Android NDK r7, android SDK 2.2 (API 8).
this is the log of errors:

Description Resource Path Location Type
‘glBindFramebufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 425 C/C++ Problem
‘glBindFramebufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 496 C/C++ Problem
‘glBindFramebufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 543 C/C++ Problem
‘glBindFramebufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 551 C/C++ Problem
‘glBindRenderbufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 482 C/C++ Problem
‘glCheckFramebufferStatusOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 690 C/C++ Problem
‘glDeleteFramebuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 144 C/C++ Problem
‘glDeleteFramebuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 148 C/C++ Problem
‘glDeleteRenderbuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 172 C/C++ Problem
‘glDeleteRenderbuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 176 C/C++ Problem
‘glFramebufferRenderbufferOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 489 C/C++ Problem
‘glFramebufferTexture2DOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 503 C/C++ Problem
‘glGenFramebuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 379 C/C++ Problem
‘glGenRenderbuffersOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 481 C/C++ Problem
‘glRenderbufferStorageOES’ was not declared in this scope ofFbo.cpp /openFrameworks/gl line 487 C/C++ Problem
make: *** [android] Errore 2 openFrameworks C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidAssimpExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidAudioExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidCameraExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidEmptyExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidFontExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidImageExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidOpenCVExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidPolygonExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidTouchExample C/C++ Problem
make: *** [AndroidDebug] Errore 2 androidVBOExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidAssimpExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidAudioExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidCameraExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidEmptyExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidFontExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidImageExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidOpenCVExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidPolygonExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidTouchExample C/C++ Problem
make[1]: *** Nessuna regola per generare l’obiettivo “…/…/…/libs/openFrameworksCompiled/lib/android/libopenFrameworksDebug.a”, necessario per “libs/armeabi/libOFAndroidApp.so”. Arresto. androidVBOExample C/C++ Problem
make[1]: *** [obj/DebugAndroid/openFrameworks/gl/ofFbo.o] Errore 1 openFrameworks C/C++ Problem

@Hanssey are you sure to have build for Android?

Apart of this, is it possible to run the apps in emulation without an Android device connected to the pc?

Thanks

glut is not used in android so you must be trying to compile the linux target somehow. Also check that you don’t have any white spaces in the path to you OF folder and your application, the Makefiles cannot handle spaces in the paths

Of which withe spaces are you refering? maybe in OF/libs/openFrameworksCompiled/project/android/paths.make ?
this is mine paths.make:

NDK_ROOT=/home/walter/android-ndk-r7
SDK_ROOT=/home/walter/android-sdk-linux
ANT_HOME=/usr
ANT_BIN=$(ANT_HOME)/bin/

the OF folder should be in a path with no spaces in it, and the same for the names of the examples

also OF is not compatible yet with ndk r7, better to use ndk r6

ok,then i need switch to ndk r6… thanks . i will post the result. thanks!

switching to NDK revision 6 solves my problems at 97% : all examples and openframeworks project succesfully builded exept for assimpExample :

Description Resource Path Location Type
Conversion to Dalvik format failed with error 1 androidAssimpExample Unknown Android Packaging Problem

i have tryed to clean and build the solution again , but error remain and cannot build the assimpExample project.

try from a console in the folder of the assimp project:

  
path_to_android_sdk/tools/android update  

ok launching :

/home/walter/android-sdk-linux/tools/android update
Error: Missing object name for verb ‘update’.

what must i update?

  • update avd : Updates an Android Virtual Device to match the folders
    of a new SDK.
  • update project : Updates an Android project (must already have an
    AndroidManifest.xml).
  • update test-project : Updates the Android project for a test package (must
    already have an AndroidManifest.xml).
  • update lib-project : Updates an Android library project (must already have
    an AndroidManifest.xml).
  • update adb : Updates adb to support the USB devices declared in the
    SDK add-ons.
  • update sdk : Updates the SDK by suggesting new platforms to install
    if available.

thank you for your patience!

update project

hi @ arturo, there are other settings in update i 'm not sure to have done the right thing:

/home/walter/android-sdk-linux/tools/android --verbose update project --path ‘/home/walter/openframeworks007/apps/androidExamples/androidAssimpExample’
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-6’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-4’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-3’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-5’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-1’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-8’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-7’: File not found: manifest.ini
Warning: Ignoring add-on ‘addon-galaxy_tab-samsung_electronics_-8-2’: File not found: manifest.ini
Updated local.properties
No project name specified, using Activity name ‘OFActivity’.
If you wish to change it, edit the first line of build.xml.
Regenerating build.xml with project name OFActivity

but looking at the eclipse prproperties of the assimp project example ( see in the picture), it point to a proguard.cfg file ican see some diferences but i don’t know if i have to change something.
Also running the emulator i got this:

[2012-01-12 13:33:41 - androidPolygonExample] ------------------------------
[2012-01-12 13:33:41 - androidPolygonExample] Android Launch!
[2012-01-12 13:33:41 - androidPolygonExample] adb is running normally.
[2012-01-12 13:33:41 - androidPolygonExample] Performing cc.openframeworks.androidPolygonExample.OFActivity activity launch
[2012-01-12 13:33:41 - androidPolygonExample] Automatic Target Mode: launching new emulator with compatible AVD ‘Galaxy_tab’
[2012-01-12 13:33:41 - androidPolygonExample] Launching a new emulator with Virtual Device ‘Galaxy_tab’
[2012-01-12 13:33:42 - Emulator] emulator: WARNING: Unable to create sensors port: Connection refused
[2012-01-12 13:33:42 - Emulator] emulator: emulator window was out of view and was recentered
[2012-01-12 13:33:42 - Emulator]
[2012-01-12 13:33:42 - androidPolygonExample] New emulator found: emulator-5554
[2012-01-12 13:33:42 - androidPolygonExample] Waiting for HOME (‘android.process.acore’) to be launched…
[2012-01-12 13:34:03 - androidPolygonExample] HOME is up on device ‘emulator-5554’
[2012-01-12 13:34:03 - androidPolygonExample] Uploading androidPolygonExample.apk onto device ‘emulator-5554’
[2012-01-12 13:34:15 - androidPolygonExample] Failed to install androidPolygonExample.apk on device ‘emulator-5554’: No space left on device
[2012-01-12 13:34:15 - androidPolygonExample] com.android.ddmlib.SyncException: No space left on device
[2012-01-12 13:34:15 - androidPolygonExample] Launch canceled!

i leave also a log_cat file attached.

log_cat12012012.txt

from the error messages, it seems like it’s working now but your emulator has run out of space

yes, only assimp example is not working…the others run but i have no so much space on my linux partition of the hard disk…i have to do it bigger . Anyway nice to see Android interface on my notebook! :slight_smile:

Sorry for the hijack but I have some of the same issues. Where did you find the ndk-r6? I can’t find any of the older versions

i’m almost done porting it to ndk-r7, will try to upload the changes to develop tomorrow

That would be great. When I download the android sdk should I download the r16 one?

I am also trying to use the ndk-r7, there is only one error I get when I try to compile the OF lib. I pulled from the develop branch on github today, so everything should be up to date. Any thoughts?

  
  
At global scope:  
/Applications/eclipse/android/android-ndk-r7/platforms/android-8/arch-arm//usr/include/jni.h:504: note: the mangling of 'va_list' has changed in GCC 4.4  
../../../openFrameworks/sound/ofSoundPlayer.cpp: In constructor 'ofSoundPlayer::ofSoundPlayer()':  
../../../openFrameworks/sound/ofSoundPlayer.cpp:55: error: cannot allocate an object of abstract type 'ofxAndroidSoundPlayer'  
../../../../addons/ofxAndroid/src/ofxAndroidSoundPlayer.h:6: note:   because the following virtual functions are pure within 'ofxAndroidSoundPlayer':  
../../../openFrameworks/sound/ofBaseSoundPlayer.h:37: note: 	virtual float ofBaseSoundPlayer::getVolume()  
make[1]: *** [obj/DebugAndroid/openFrameworks/sound/ofSoundPlayer.o] Error 1  
make: *** [android] Error 2  
  

thanks