Android build quick start guide

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Android build quick start guide

Post by c6burns »

It's not a question of drivers unless I am way off the mark here. I have the sample browser that is published on the app store and I have my own sample browser. They produce different results.

EDIT: Had a bit of time to spend on this. Found a common thread when running the app built by the steps in the wiki
Galaxy Nexus: cubemap sample hangs app, many other issues
Nexus 4: cubemap sample hangs app, some other issues
Nexus 7: cubemap sample hangs app, very few other issues

On all of the devices, the app store build cubemap sample works and the source build does not.

I'll do some logging at my next opportunity and see what I find.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Android build quick start guide

Post by xavier »

c6burns wrote:It's not a question of drivers unless I am way off the mark here. I have the sample browser that is published on the app store and I have my own sample browser. They produce different results.

EDIT: Had a bit of time to spend on this. Found a common thread when running the app built by the steps in the wiki
Galaxy Nexus: cubemap sample hangs app, many other issues
Nexus 4: cubemap sample hangs app, some other issues
Nexus 7: cubemap sample hangs app, very few other issues

On all of the devices, the app store build cubemap sample works and the source build does not.

I'll do some logging at my next opportunity and see what I find.
I don't even see the sample browser main screen. So it's not an issue of shaders either, unless we are using some extraordinarily complex shader code for simple overlays.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Android build quick start guide

Post by c6burns »

Yeah, I mean I get how the existence of the optimizer itself relates to driver issues. if the drivers were competent at optimizing out dummy functions and other 'artifacts' produced by conversions or the output of higher level languages like Cg, then the optimizer wouldn't need to exist. I'm fully with you there and I realize that there can be a considerable advantage to producing your shaders for your target platform by hand; however, there remain issues with either the current 1.9 branch or the build scripts or *something* because I cannot reproduce the quality and stability of the app store sample browser using the build instructions provided.

Is it that, like the case of the glsl optimizer, more of the libraries considered optional by cmake are in fact required for the samples? Can I get a hint as to which ones they might be? :D

Thanks all!
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Android build quick start guide

Post by Wolfmanfx »

I pushed a workaround for rtss in 1.9 for xavier plz try this and tell me if you have black screen.

@c6burns
The crashes you have are produced by the optimizer ;) believe it or not the generated shaders can crash the whole device - i have tested it here local (i have 10 different android devices) and when the optimizer is enabled a few devices freeze or reboot.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Android build quick start guide

Post by c6burns »

Wolfmanfx wrote:I pushed a workaround for rtss in 1.9 for xavier plz try this and tell me if you have black screen.

@c6burns
The crashes you have are produced by the optimizer ;) believe it or not the generated shaders can crash the whole device - i have tested it here local (i have 10 different android devices) and when the optimizer is enabled a few devices freeze or reboot.
The "crashes" would happen with or without the optimizer. I added the optimizer on your recommendation when trying to determine why your build instructions produce different results than your published app.

Lastest changesets to v1-9 have fixed many issues, thank you Wolfman! I assume this is going to work for xavier as it fixeds my black screens as well. Now the only difference between the app store and the build instructions that I noted (in a quick test on my galaxy nexus) is that the main menu background is not rendering quite properly in the custom built apk (this varies from device to device, though). I am impressed by OGRE, but I still find it strange that these inconsistencies exist between the app store samplebrowser and the source build. However, if these issues exist mainly as a result of RTSS (and perhaps some turbulence from v1-9 not being the stable release branch) then I am confident to keep moving forward with OGRE :)

I will further test this on Nexus 4, Nexus 7 and some older devices when I get a chance. Thanks again.
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Android build quick start guide

Post by Wolfmanfx »

Great! But still you have to realize rtss is an optional component and without you have an stable engine on the device! Just start with writing your own shaders ;)
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

I pulled the newest 1.9 today and the JNI dummy throws an error while compiling (following the quickstart guide again)

cmake log:

Code: Select all

-- Configuring OGRE 1.9.0unstable
-- Detected g++ 4.6

-- Enabling GCC visibility flags
-- Search path: D:/master/svn/ogre/ogre/AndroidDependencies;D:/master/svn/ogre/ogre/androidbuild/Dependencies;D:/master/svn/ogre/ogre/Dependencies;D:/master/svn/ogre/ogre/androidbuild/../Dependencies;D:/master/svn/ogre/ogre/../Dependencies
-- Looking for ZLIB...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found ZLIB: optimized;D:/android/ndk/platforms/android-9/arch-arm/usr/lib/libz.so;debug;D:/android/ndk/platforms/android-9/arch-arm/usr/lib/libz.so
-- Looking for ZZip...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found ZZip: optimized;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libzzip.a;debug;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libzzip.a
-- Looking for FreeImage...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found FreeImage: optimized;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libFreeImage.a;debug;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libFreeImage.a
-- Looking for FREETYPE...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- CMAKE_PREFIX_PATH: D:/master/svn/ogre/ogre/AndroidDependencies;D:/master/svn/ogre/ogre/androidbuild/Dependencies;D:/master/svn/ogre/ogre/Dependencies;D:/master/svn/ogre/ogre/androidbuild/../Dependencies;D:/master/svn/ogre/ogre/../Dependencies;/usr/local;/usr/lib/armv5te-linux-gnu
-- CMAKE_PREFIX_PATH: D:/master/svn/ogre/ogre/AndroidDependencies;D:/master/svn/ogre/ogre/androidbuild/Dependencies;D:/master/svn/ogre/ogre/Dependencies;D:/master/svn/ogre/ogre/androidbuild/../Dependencies;D:/master/svn/ogre/ogre/../Dependencies;/usr/local;/usr/lib/armv5te-linux-gnu
-- Found FREETYPE: optimized;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libfreetype.a;debug;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libfreetype.a
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY) 
-- Looking for POCO...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could not locate POCO
-- Looking for TBB...
-- Could not locate TBB
-- Looking for GLSL_Optimizer...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Found OIS: optimized;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libOIS.a;debug;D:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi/libOIS.a
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Looking for Softimage...
-- Could not locate Softimage
-- Looking for CppUnit...
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
-- Could not locate CppUnit
-- 
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ OpenGL ES 3.x
+ OIS
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ OpenGL 3+: Support for the OpenGL 3+ render system <http://www.opengl.org/>
+ boost: Boost (general) <http://boost.org>
+ boost-thread: Used for threading support <http://boost.org>
+ boost-date_time: Used for threading support <http://boost.org>
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ CppUnit: Library for performing unit tests <http://cppunit.sourceforge.net>
-----------------------------------------------------------------------------

-- 
----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + RTShader System
  + RTShader System Core Shaders
  + RTShader System Extensions Shaders
  + Overlay
Building plugins:
  + Octree scene manager
  + Particle FX
Building rendersystems:
  + OpenGL ES 2.x
Building executables:
  + Samples
Building core features:
  + DDS image codec
  + PVRTC image codec
  + ETC1 image codec
  + FreeImage codec
  + ZIP archives

Build type:                      static
Threading support:               none
Use double precision:            disabled
Allocator type:                  nedmalloc (pooling)
STL containers use allocator:    enabled
Strings use allocator:           disabled
Memory tracker (debug):          disabled
Memory tracker (release):        disabled
Use new script compilers:        
Use Boost:                       disabled

----------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: D:/master/svn/ogre/ogre/androidbuild

nmake log:

Code: Select all

[ 51%] Built target OgreMain
[ 63%] Built target RenderSystem_GLES2
Scanning dependencies of target OgreJNIDummy
[ 63%] Building CXX object CMakeFiles/OgreJNIDummy.dir/dummyJNI.cpp.o
Linking CXX shared module lib\libOgreJNIDummy.so
Updated project.properties
Updated local.properties
Updated file D:\master\svn\ogre\ogre\androidbuild\OgreJNI\proguard-project.txt
"Compile++ thumb : OgreJNI <= OgreActivityJNI.cpp
"Compile thumb : android_native_app_glue <= android_native_app_glue.c
"Compile thumb : cpufeatures <= cpu-features.c
Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/
StaticLibrary  : libandroid_native_app_glue.a
StaticLibrary  : libcpufeatures.a
SharedLibrary  : libOgreJNI.so

d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lPlugin_ParticleFXStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lPlugin_OctreeSceneManagerStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lOgreRTShaderSystemStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lOgreOverlayStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./ob
j/local/armeabi/objs/OgreJNI/OgreActivityJNI.o: in function Java_org_ogre3d_andr
oid_OgreActivityJNI_create:D:/master/svn/ogre/ogre/OgreMain/src/Android/JNI/Ogre
ActivityJNI.cpp:86: error: undefined reference to 'Ogre::OctreePlugin::OctreePlu
gin()'
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./ob
j/local/armeabi/objs/OgreJNI/OgreActivityJNI.o: in function Java_org_ogre3d_andr
oid_OgreActivityJNI_create:D:/master/svn/ogre/ogre/OgreMain/src/Android/JNI/Ogre
ActivityJNI.cpp:89: error: undefined reference to 'Ogre::ParticleFXPlugin::Parti
cleFXPlugin()'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libOgreJNI.so] Error 1
NMAKE : fatal error U1077: "D:\android\ndk\ndk-build.CMD": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""d:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""d:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.

Am I missing anything? =)

Edit: Apparently the "all" default target tries to compile the JNI before the particle and such are compiled -> doom

"nmake SampleBrowserDummy" compiles a lot more
ultirock
Gnoblar
Posts: 6
Joined: Fri Feb 01, 2013 5:33 pm

Re: Android build quick start guide

Post by ultirock »

I had the same error than Emerich.

After the cmake command, delete the blank line between the LOCAL_LDLIBS in OgreJNI/jni/Android.mk (line 7), then compile with make or nmake.

After that, I could build and test OgreJNI. However I only get a red screen and I see lot of errors in logcat.

Code: Select all

02-26 16:32:33.340: D/dalvikvm(16658): Trying to load lib /data/data/org.ogre3d.jni/lib/libOgreJNI.so 0x41ea53c8
02-26 16:32:33.672: D/dalvikvm(16658): Added shared lib /data/data/org.ogre3d.jni/lib/libOgreJNI.so 0x41ea53c8
02-26 16:32:33.757: D/libEGL(16658): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
02-26 16:32:33.797: D/libEGL(16658): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
02-26 16:32:33.800: D/libEGL(16658): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
02-26 16:32:33.859: D/OpenGLRenderer(16658): Enabling debug mode 0
02-26 16:32:33.910: I/OGRE(16658): Creating resource group General
02-26 16:32:33.914: I/OGRE(16658): Creating resource group Internal
02-26 16:32:33.914: I/OGRE(16658): Creating resource group Autodetect
02-26 16:32:33.914: I/OGRE(16658): SceneManagerFactory for type 'DefaultSceneManager' registered.
02-26 16:32:33.918: I/OGRE(16658): Registering ResourceManager for type Material
02-26 16:32:33.922: I/OGRE(16658): Registering ResourceManager for type Mesh
02-26 16:32:33.922: I/OGRE(16658): Registering ResourceManager for type Skeleton
02-26 16:32:33.922: I/OGRE(16658): MovableObjectFactory for type 'ParticleSystem' registered.
02-26 16:32:33.922: I/OGRE(16658): ArchiveFactory for archive type FileSystem registered.
02-26 16:32:33.922: I/OGRE(16658): ArchiveFactory for archive type Zip registered.
02-26 16:32:33.922: I/OGRE(16658): ArchiveFactory for archive type EmbeddedZip registered.
02-26 16:32:33.922: I/OGRE(16658): DDS codec registering
02-26 16:32:33.941: I/OGRE(16658): FreeImage version: 3.15.3
02-26 16:32:33.941: I/OGRE(16658): This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
02-26 16:32:33.941: I/OGRE(16658): Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti
02-26 16:32:33.941: I/OGRE(16658): PVRTC codec registering
02-26 16:32:33.941: I/OGRE(16658): ETC1 codec registering
02-26 16:32:33.941: I/OGRE(16658): Registering ResourceManager for type HighLevelGpuProgram
02-26 16:32:33.941: I/OGRE(16658): Registering ResourceManager for type Compositor
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'Entity' registered.
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'Light' registered.
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'BillboardSet' registered.
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'ManualObject' registered.
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'BillboardChain' registered.
02-26 16:32:33.945: I/OGRE(16658): MovableObjectFactory for type 'RibbonTrail' registered.
02-26 16:32:33.945: E/OGRE(16658): OGRE EXCEPTION(6:FileNotFoundException): 'plugins.cfg' file not found! in ConfigFile::load at /home/chris/build/ogre/ogre/OgreMain/src/OgreConfigFile.cpp (line 88)
02-26 16:32:33.957: I/OGRE(16658): plugins.cfg not found, automatic plugin loading disabled.
02-26 16:32:33.957: I/OGRE(16658): *-*-* OGRE Initialising
02-26 16:32:33.957: I/OGRE(16658): *-*-* Version 1.9.0unstable (Ghadamon)
02-26 16:32:33.957: I/OGRE(16658): Installing plugin: OpenGL ES 2.0 RenderSystem
02-26 16:32:33.957: I/OGRE(16658): OpenGL ES 2.x Rendering Subsystem created.
02-26 16:32:33.957: I/OGRE(16658): Plugin successfully installed
02-26 16:32:33.957: I/OGRE(16658): Installing plugin: Octree Scene Manager
02-26 16:32:33.957: I/OGRE(16658): Plugin successfully installed
02-26 16:32:33.961: I/OGRE(16658): Installing plugin: ParticleFX
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'Point' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'Box' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'Ellipsoid' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'Cylinder' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'Ring' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Emitter Type 'HollowEllipsoid' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'LinearForce' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'ColourFader' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'ColourFader2' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'ColourImage' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'ColourInterpolator' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'Scaler' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'Rotator' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'DirectionRandomiser' registered
02-26 16:32:33.961: I/OGRE(16658): Particle Affector Type 'DeflectorPlane' registered
02-26 16:32:33.961: I/OGRE(16658): Plugin successfully installed
02-26 16:32:33.961: I/OGRE(16658): CPU Identifier & Features
02-26 16:32:33.961: I/OGRE(16658): -------------------------
02-26 16:32:33.965: I/OGRE(16658):  *   CPU ID: ARMv7
02-26 16:32:33.965: I/OGRE(16658):  *      VFP: yes
02-26 16:32:33.965: I/OGRE(16658):  *     NEON: yes
02-26 16:32:33.965: I/OGRE(16658): -------------------------
02-26 16:32:33.965: I/OGRE(16658): Registering ResourceManager for type Texture
02-26 16:32:34.019: I/OGRE(16658): GLES2RenderSystem::_createRenderWindow "OgreWindow", 0x0 windowed  miscParams: externalWindowHandle=1368612880 
02-26 16:32:34.047: I/OGRE(16658): GL_VERSION = OpenGL ES 2.0 build 1.8.GOOGLENEXUS.ED945322@2112805
02-26 16:32:34.047: I/OGRE(16658): GL_VENDOR = Imagination Technologies
02-26 16:32:34.047: I/OGRE(16658): GL_RENDERER = PowerVR SGX 540
02-26 16:32:34.047: I/OGRE(16658): GL_EXTENSIONS = GL_EXT_debug_marker GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_vertex_half_float GL_OES_texture_float GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_required_internalformat GL_OES_depth_texture GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_standard_derivatives GL_OES_vertex_array_object GL_OES_egl_sync GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_EXT_discard_framebuffer GL_EXT_shader_texture_lod GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_program_binary GL_IMG_multisampled_render_to_texture
02-26 16:32:34.047: I/OGRE(16658): EXT:GL_EXT_debug_marker
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_rgb8_rgba8
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_depth24
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_vertex_half_float
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_texture_float
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_texture_half_float
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_element_index_uint
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_mapbuffer
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_fragment_precision_high
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_compressed_ETC1_RGB8_texture
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_EGL_image
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_EGL_image_external
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_required_internalformat
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_depth_texture
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_get_program_binary
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_packed_depth_stencil
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_standard_derivatives
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_vertex_array_object
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_OES_egl_sync
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_EXT_multi_draw_arrays
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_EXT_texture_format_BGRA8888
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_EXT_discard_framebuffer
02-26 16:32:34.050: I/OGRE(16658): EXT:GL_EXT_shader_texture_lod
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_shader_binary
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_texture_compression_pvrtc
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_texture_npot
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_texture_format_BGRA8888
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_read_format
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_program_binary
02-26 16:32:34.054: I/OGRE(16658): EXT:GL_IMG_multisampled_render_to_texture
02-26 16:32:34.054: I/OGRE(16658): **************************************
02-26 16:32:34.054: I/OGRE(16658): *** OpenGL ES 2.x Renderer Started ***
02-26 16:32:34.054: I/OGRE(16658): **************************************
02-26 16:32:34.054: I/OGRE(16658): GLSL ES support detected
02-26 16:32:34.054: I/OGRE(16658): Registering ResourceManager for type GpuProgram
02-26 16:32:34.054: I/OGRE(16658): GL ES 2: Using FBOs for rendering to textures
02-26 16:32:34.062: I/OGRE(16658): FBO PF_R5G6B5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.082: I/OGRE(16658): FBO PF_B5G6R5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.093: I/OGRE(16658): FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.109: I/OGRE(16658): FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.129: I/OGRE(16658): FBO PF_R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.140: I/OGRE(16658): FBO PF_B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.152: I/OGRE(16658): FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.164: I/OGRE(16658): FBO PF_A8B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.175: I/OGRE(16658): FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 Packed-D24S8 
02-26 16:32:34.183: I/OGRE(16658): [GLES2] : Valid FBO targets PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_A8B8G8R8 PF_B8G8R8A8 
02-26 16:32:34.183: I/OGRE(16658): RenderSystem capabilities
02-26 16:32:34.183: I/OGRE(16658): -------------------------
02-26 16:32:34.183: I/OGRE(16658): RenderSystem Name: OpenGL ES 2.x Rendering Subsystem
02-26 16:32:34.183: I/OGRE(16658): GPU Vendor: imagination technologies
02-26 16:32:34.183: I/OGRE(16658): Device Name: PowerVR SGX 540
02-26 16:32:34.183: I/OGRE(16658): Driver Version: 0.0.0.0
02-26 16:32:34.183: I/OGRE(16658):  * Fixed function pipeline: no
02-26 16:32:34.183: I/OGRE(16658):  * Hardware generation of mipmaps: yes
02-26 16:32:34.183: I/OGRE(16658):  * Texture blending: yes
02-26 16:32:34.183: I/OGRE(16658):  * Anisotropic texture filtering: no
02-26 16:32:34.183: I/OGRE(16658):  * Dot product texture operation: yes
02-26 16:32:34.183: I/OGRE(16658):  * Cube mapping: yes
02-26 16:32:34.183: I/OGRE(16658):  * Hardware stencil buffer: yes
02-26 16:32:34.183: I/OGRE(16658):    - Stencil depth: 8
02-26 16:32:34.183: I/OGRE(16658):    - Two sided stencil support: yes
02-26 16:32:34.183: I/OGRE(16658):    - Wrap stencil values: yes
02-26 16:32:34.187: I/OGRE(16658):  * Hardware vertex / index buffers: yes
02-26 16:32:34.187: I/OGRE(16658):  * Vertex programs: yes
02-26 16:32:34.187: I/OGRE(16658):  * Number of floating-point constants for vertex programs: 128
02-26 16:32:34.187: I/OGRE(16658):  * Number of integer constants for vertex programs: 128
02-26 16:32:34.187: I/OGRE(16658):  * Number of boolean constants for vertex programs: 128
02-26 16:32:34.187: I/OGRE(16658):  * Fragment programs: yes
02-26 16:32:34.187: I/OGRE(16658):  * Number of floating-point constants for fragment programs: 64
02-26 16:32:34.187: I/OGRE(16658):  * Number of integer constants for fragment programs: 64
02-26 16:32:34.187: I/OGRE(16658):  * Number of boolean constants for fragment programs: 64
02-26 16:32:34.187: I/OGRE(16658):  * Geometry programs: no
02-26 16:32:34.187: I/OGRE(16658):  * Number of floating-point constants for geometry programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of integer constants for geometry programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of boolean constants for geometry programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Tesselation Hull programs: no
02-26 16:32:34.187: I/OGRE(16658):  * Number of floating-point constants for tesselation hull programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of integer constants for tesselation hull programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of boolean constants for tesselation hull programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Tesselation Domain programs: no
02-26 16:32:34.187: I/OGRE(16658):  * Number of floating-point constants for tesselation domain programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of integer constants for tesselation domain programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Number of boolean constants for tesselation domain programs: 0
02-26 16:32:34.187: I/OGRE(16658):  * Compute programs: no
02-26 16:32:34.191: I/OGRE(16658):  * Number of floating-point constants for compute programs: 0
02-26 16:32:34.191: I/OGRE(16658):  * Number of integer constants for compute programs: 0
02-26 16:32:34.191: I/OGRE(16658):  * Number of boolean constants for compute programs: 0
02-26 16:32:34.191: I/OGRE(16658):  * Supported Shader Profiles: glsles
02-26 16:32:34.191: I/OGRE(16658):  * Texture Compression: yes
02-26 16:32:34.191: I/OGRE(16658):    - DXT: no
02-26 16:32:34.191: I/OGRE(16658):    - VTC: no
02-26 16:32:34.191: I/OGRE(16658):    - PVRTC: yes
02-26 16:32:34.191: I/OGRE(16658):    - BC4/BC5: no
02-26 16:32:34.191: I/OGRE(16658):    - BC6H/BC7: no
02-26 16:32:34.191: I/OGRE(16658):  * Scissor Rectangle: yes
02-26 16:32:34.191: I/OGRE(16658):  * Hardware Occlusion Query: no
02-26 16:32:34.191: I/OGRE(16658):  * User clip planes: no
02-26 16:32:34.191: I/OGRE(16658):  * VET_UBYTE4 vertex element type: yes
02-26 16:32:34.191: I/OGRE(16658):  * Infinite far plane projection: yes
02-26 16:32:34.191: I/OGRE(16658):  * Hardware render-to-texture: yes
02-26 16:32:34.191: I/OGRE(16658):  * Floating point textures: yes
02-26 16:32:34.191: I/OGRE(16658):  * Non-power-of-two textures: no
02-26 16:32:34.191: I/OGRE(16658):  * 1d textures: yes
02-26 16:32:34.191: I/OGRE(16658):  * Volume textures: no
02-26 16:32:34.191: I/OGRE(16658):  * Multiple Render Targets: 1
02-26 16:32:34.191: I/OGRE(16658):    - With different bit depths: no
02-26 16:32:34.191: I/OGRE(16658):  * Point Sprites: yes
02-26 16:32:34.191: I/OGRE(16658):  * Extended point parameters: yes
02-26 16:32:34.195: I/OGRE(16658):  * Max Point Size: 0.000000
02-26 16:32:34.195: I/OGRE(16658):  * Vertex texture fetch: no
02-26 16:32:34.195: I/OGRE(16658):  * Number of world matrices: 0
02-26 16:32:34.195: I/OGRE(16658):  * Number of texture units: 8
02-26 16:32:34.195: I/OGRE(16658):  * Stencil buffer depth: 8
02-26 16:32:34.195: I/OGRE(16658):  * Number of vertex blend matrices: 0
02-26 16:32:34.195: I/OGRE(16658):  * Render to Vertex Buffer : no
02-26 16:32:34.195: I/OGRE(16658):  * Hardware Atomic Counters: no
02-26 16:32:34.195: I/OGRE(16658):  * GL 1.5 without VBO workaround: no
02-26 16:32:34.195: I/OGRE(16658):  * Frame Buffer objects: yes
02-26 16:32:34.195: I/OGRE(16658):  * Frame Buffer objects (ARB extension): no
02-26 16:32:34.195: I/OGRE(16658):  * Frame Buffer objects (ATI extension): no
02-26 16:32:34.195: I/OGRE(16658):  * PBuffer support: no
02-26 16:32:34.195: I/OGRE(16658):  * GL 1.5 without HW-occlusion workaround: no
02-26 16:32:34.195: I/OGRE(16658):  * Vertex Array Objects: yes
02-26 16:32:34.195: I/OGRE(16658):  * Separate shader objects: no
02-26 16:32:34.195: I/OGRE(16658): DefaultWorkQueue('Root') initialising on thread main.
02-26 16:32:34.199: I/OGRE(16658): Particle Renderer Type 'billboard' registered
02-26 16:32:34.199: I/OGRE(16658): SceneManagerFactory for type 'OctreeSceneManager' registered.
02-26 16:33:15.644: E/OGRE(16658): OGRE EXCEPTION(3:RenderingAPIException): Fail to SwapBuffers in swapBuffers at /home/chris/build/ogre/ogre/RenderSystems/GLES2/src/EGL/OgreEGLWindow.cpp (line 160)
02-26 16:33:15.656: E/OGRE(16658): OGRE EXCEPTION(3:RenderingAPIException): Fail to SwapBuffers in swapBuffers at /home/chris/build/ogre/ogre/RenderSystems/GLES2/src/EGL/OgreEGLWindow.cpp (line 160)
02-26 16:33:15.769: E/OGRE(16658): OGRE EXCEPTION(3:RenderingAPIException): Fail to SwapBuffers in swapBuffers at /home/chris/build/ogre/ogre/RenderSystems/GLES2/src/EGL/OgreEGLWindow.cpp (line 160)
Any ideas of what could be wrong?
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Re: Android build quick start guide

Post by Wolfmanfx »

will be fixed right now ;)
btw: the red screen is the result i just started to make jni bindings
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

Great to see so much activity here. Thanks to everyone involved.
Just had to say that.

I'm working on a NSight Tegra Visual Studio Edition Project that uses Ogre. Hopefully i'll get it done soon so I can share it.
That might make things a little easier for newbies.
dertom
Gnoblar
Posts: 6
Joined: Mon Sep 10, 2012 8:38 pm
x 1

Re: Android build quick start guide

Post by dertom »

First of all, Wolfmaxfx you do rock! Great stuff and for sure countless hours of mindblowing work. Can't say 'Thank you' enough!! So consider a 'Thank You'-cronjob attached to you :D
...i just started to make jni bindings
Is this just an option or do you consider rendering through jni-calls more stable?

@c6burns: Can you post a screenshot how it looks like? What ndk you are using? Since for some reason freeimage is not found by cmake from ndk>=0.8b you will have to set the path to the lib manually in cmake-gui. Just a guess...
Bibdy
Gnoblar
Posts: 2
Joined: Fri Mar 01, 2013 6:02 pm

Re: Android build quick start guide

Post by Bibdy »

Hi folks,

I'm getting a bunch of errors trying to run 'ndk-build all' on the SampleBrowserNDK project right now:

Code: Select all

D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CameraTrack
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CelShading
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Character
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Compositor
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Lighting
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_BezierPatch
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CubeMapping
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_DynTex
And so on...

I'm a CMAKE newbie at the moment, so I can't really fix this one on my own.

So far I've
  • Extracted the Ogre 1.9 SDK to a folder called \ogre_src_v1-9-0\
  • Extracted the 1.9 dependencies to a subfolder called .\AndroidDependencies\
  • Navigated to the .\AndroidDependencies\CMake\ folder with VS Command Prompt
  • Ran cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\android.toolchain.cmake DANDROID_ABI=armeabi ..
  • Ran nmake
  • Navigated to \ogre_src_v1-9-0\Build (created the folder)
  • Ran cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\toolchain\android.toolchain.cmake -DOGRE_DEPENDENCIES_DIR=..\AndroidDependencies -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=9 ..
  • Ran nmake (had to fix some broken #ifs and redefinitions of things in the GLES2 code, but it eventually compiled - it kinda looks like things might have merged badly in there)
  • Navigated to \ogre_src_v1-9-0\Build\SampleBrowserNDK\
  • Ran ndk-build all
Is there some key step I've missed?
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

Bibdy wrote:Hi folks,

I'm getting a bunch of errors trying to run 'ndk-build all' on the SampleBrowserNDK project right now:

Code: Select all

D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CameraTrack
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CelShading
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Character
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Compositor
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_Lighting
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_BezierPatch
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_CubeMapping
D:/ExtractedSDKs/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lSample_DynTex
And so on...

I'm a CMAKE newbie at the moment, so I can't really fix this one on my own.

So far I've
  • Extracted the Ogre 1.9 SDK to a folder called \ogre_src_v1-9-0\
  • Extracted the 1.9 dependencies to a subfolder called .\AndroidDependencies\
  • Navigated to the .\AndroidDependencies\CMake\ folder with VS Command Prompt
  • Ran cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\android.toolchain.cmake DANDROID_ABI=armeabi ..
  • Ran nmake
  • Navigated to \ogre_src_v1-9-0\Build (created the folder)
  • Ran cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\toolchain\android.toolchain.cmake -DOGRE_DEPENDENCIES_DIR=..\AndroidDependencies -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=9 ..
  • Ran nmake (had to fix some broken #ifs and redefinitions of things in the GLES2 code, but it eventually compiled - it kinda looks like things might have merged badly in there)
  • Navigated to \ogre_src_v1-9-0\Build\SampleBrowserNDK\
  • Ran ndk-build all
Is there some key step I've missed?
The SDK has a little different folder structure from the normal branch (Isn't the SDK 1.8 anyhow?) it looks like it simply can't find a couple samples. I suggest you download the Ogre fresh from the mercurial repository. Furthermore, make sure you have all the dependencies as .a files present in the AndroidDependencies subfolders. That was a problem for me before.

Might also be a wrong order when calling "nmake all"
You can check whether those libraries are present somewhere in your build (sub-) folders and if not try calling "nmake SAMPLENAME" before calling "nmake all" again.

Godspeed, mate.
Bibdy
Gnoblar
Posts: 2
Joined: Fri Mar 01, 2013 6:02 pm

Re: Android build quick start guide

Post by Bibdy »

Thanks for the tips, Emerich. I haven't tried it, yet, as I've gone a different route for the moment (Blackberry's Gamplay3D framework) which will keep me occupied until GDC - just trying to get a simple C++ 3D game running on my phone & tablet :). I'll definitely return and try this again in a month or so.
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

So I tried compiling it against boost 1-45-0 and got this:

Code: Select all

Updated file C:\master\svn\ogre\ogre\androidbuild\SampleBrowserNDK\proguard-proj
ect.txt
"Compile++ thumb : OgreSampleBrowser <= SampleBrowser.cpp
"Compile thumb : android_native_app_glue <= android_native_app_glue.c
In file included from C:/master/svn/ogre/ogre/OgreMain/include/Threading/OgreThreadHeaders.h:30:0,
                 from C:/master/svn/ogre/ogre/OgreMain/include/OgreStdHeaders.h:124,
                 from C:/master/svn/ogre/ogre/OgreMain/include/OgrePrerequisites.h:328,
                 from C:/master/svn/ogre/ogre/OgreMain/include/OgreLogManager.h:32,
                 from C:/master/svn/ogre/ogre/androidbuild/Samples/include/SampleContext.h:32,
                 from C:/master/svn/ogre/ogre/androidbuild/Samples/include/SampleBrowser.h:31,
                 from C:/master/svn/ogre/ogre/Samples/Browser/src/SampleBrowser.cpp:30:
C:/master/svn/ogre/ogre/OgreMain/include/Threading/OgreThreadHeadersBoost.h:37:32: fatal error: boost/thread/tss.hpp: No such file or directory 
compilation terminated.
make: *** [obj/local/armeabi-v7a/objs/OgreSampleBrowser/SampleBrowser.o] Error 1

make: *** Waiting for unfinished jobs....
NMAKE : fatal error U1077: 'C:\android\ndk\ndk-build.CMD' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Do I need a higher version of boost to link Ogre with or does anyone else have a suggestion what might be wrong? Thanks in advance!
EDIT: That error happens when i do nmake SampleBrowserDummy, too.
EDIT2: For some reason whatsoever the whole boost stuff wasn't in the Android.mk -- venturing deeper underground
EDIT3: It works! Had to change the Android.mk to the following, basically adding boost includes and libraries in the correct order.

Code: Select all

LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_MODULE    := OgreSampleBrowser

    LOCAL_LDLIBS	:= -landroid -lc -lm -ldl -llog -lEGL -lGLESv2
    LOCAL_LDLIBS	+= -LC:/master/svn/ogre/ogre/androidbuild/lib -LC:/master/svn/boost/boost_1_45_0/libs -LC:/master/svn/boost/boost_1_45_0/libs/armeabi-v7a -LC:/master/svn/ogre/ogre/AndroidDependencies/lib/armeabi-v7a
	LOCAL_LDLIBS += -lSample_CameraTrack -lSample_CelShading -lSample_Character -lSample_Compositor -lSample_Lighting -lSample_BezierPatch -lSample_CubeMapping -lSample_DynTex
	LOCAL_LDLIBS += -lSample_FacialAnimation -lSample_Fresnel -lSample_Grass -lSample_ParticleFX -lSample_Lighting -lSample_MeshLod -lSample_SkyBox -lSample_SkyPlane -lSample_SkyDome -lSample_Smoke
    LOCAL_LDLIBS	+= -lPlugin_ParticleFXStatic -lPlugin_OctreeSceneManagerStatic -lRenderSystem_GLES2Static -lOgreRTShaderSystemStatic -lOgreOverlayStatic -lOgreMainStatic
    LOCAL_LDLIBS	+= -lzzip -lz -lFreeImage -lfreetype -lOIS 
	LOCAL_LDLIBS += -lboost_date_time -lboost_filesystem  -lboost_iostreams -lboost_program_options -lboost_regex -lboost_signals -lboost_system -lboost_thread	C:/master/svn/ogre/ogre/androidbuild/systemlibs/armeabi-v7a/libsupc++.a C:/master/svn/ogre/ogre/androidbuild/systemlibs/armeabi-v7a/libstdc++.a C:/master/svn/ogre/ogre/androidbuild/SampleBrowserNDK/obj/local/armeabi-v7a/libcpufeatures.a
    LOCAL_STATIC_LIBRARIES := android_native_app_glue cpufeatures
    
    LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES=1 -IC:/master/svn/boost/boost_1_45_0/ -IC:/master/svn/boost/boost_1_45_0/boost -IC:/master/svn/ogre/ogre/androidbuild/include -IC:/master/svn/ogre/ogre/OgreMain/include -IC:/master/svn/ogre/ogre/RenderSystems/GLES2/include -IC:/master/svn/ogre/ogre/RenderSystems/GLES2/include/EGL
    LOCAL_CFLAGS += -IC:/android/ndk/sources/cpufeatures -IC:/master/svn/ogre/ogre/Components/RTShaderSystem/include -IC:/master/svn/ogre/ogre/Components/Overlay/include 
    LOCAL_CFLAGS += -IC:/master/svn/ogre/ogre/PlugIns/ParticleFX/include -IC:/master/svn/ogre/ogre/PlugIns/OctreeSceneManager/include 
    LOCAL_CFLAGS += -IC:/master/svn/ogre/ogre/AndroidDependencies/include -IC:/master/svn/ogre/ogre/AndroidDependencies/include/OIS -IC:/master/svn/ogre/ogre/androidbuild/Samples/include
    LOCAL_CFLAGS += -fexceptions -frtti -x c++ -D___ANDROID___ -DANDROID -DZZIP_OMIT_CONFIG_H -DUSE_RTSHADER_SYSTEM=1 
    
	LOCAL_PATH := C:/master/svn/ogre/ogre/Samples/Browser/src
	LOCAL_SRC_FILES := SampleBrowser.cpp
        
    include $(BUILD_SHARED_LIBRARY) 
      
    $(call import-module,android/cpufeatures) 
    $(call import-module,android/native_app_glue) 
Needless to say, you have to put your folders in there.
Artem
Gnoblar
Posts: 3
Joined: Thu Mar 14, 2013 8:28 am

Ubuntu 12 Error!

Post by Artem »

Hi, I use Ogre v 1.9 and compile from Android in Ubuntu 12 and have this error:

Code: Select all

[ 81%] Building CXX object Components/RTShaderSystem/CMakeFiles/OgreRTShaderSystem.dir/src/OgreShaderHLSLProgramProcessor.cpp.o
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lOgreRTShaderSystemStatic
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lFreeImage
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::magicNumberToFileExt(char const*, unsigned int) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:590: error: undefined reference to 'FreeImage_OpenMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::magicNumberToFileExt(char const*, unsigned int) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:592: error: undefined reference to 'FreeImage_GetFileTypeFromMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::magicNumberToFileExt(char const*, unsigned int) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:593: error: undefined reference to 'FreeImage_CloseMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::magicNumberToFileExt(char const*, unsigned int) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:597: error: undefined reference to 'FreeImage_GetFormatFromFIF'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:263: error: undefined reference to 'FreeImage_FIFSupportsExportType'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:288: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:324: error: undefined reference to 'FreeImage_AllocateT'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:324: error: undefined reference to 'FreeImage_AllocateT'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:346: error: undefined reference to 'FreeImage_GetPitch'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:352: error: undefined reference to 'FreeImage_GetBits'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:341: error: undefined reference to 'FreeImage_ConvertToGreyscale'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:342: error: undefined reference to 'FreeImage_Unload'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:264: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:290: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:300: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::codeToFile(Ogre::SharedPtr<Ogre::MemoryDataStream>&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:402: error: undefined reference to 'FreeImage_Save'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::codeToFile(Ogre::SharedPtr<Ogre::MemoryDataStream>&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:403: error: undefined reference to 'FreeImage_Unload'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::code(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:374: error: undefined reference to 'FreeImage_OpenMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::code(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:376: error: undefined reference to 'FreeImage_SaveToMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::code(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:380: error: undefined reference to 'FreeImage_AcquireMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::code(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:388: error: undefined reference to 'FreeImage_CloseMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::code(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:390: error: undefined reference to 'FreeImage_Unload'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:412: error: undefined reference to 'FreeImage_OpenMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:415: error: undefined reference to 'FreeImage_LoadFromMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:428: error: undefined reference to 'FreeImage_GetWidth'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:429: error: undefined reference to 'FreeImage_GetHeight'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:435: error: undefined reference to 'FreeImage_GetImageType'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:436: error: undefined reference to 'FreeImage_GetColorType'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:437: error: undefined reference to 'FreeImage_GetBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:552: error: undefined reference to 'FreeImage_GetBits'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:553: error: undefined reference to 'FreeImage_GetPitch'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:571: error: undefined reference to 'FreeImage_Unload'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:572: error: undefined reference to 'FreeImage_CloseMemory'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:468: error: undefined reference to 'FreeImage_IsTransparent'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:477: error: undefined reference to 'FreeImage_ConvertTo24Bits'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:484: error: undefined reference to 'FreeImage_GetBPP'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:472: error: undefined reference to 'FreeImage_ConvertTo32Bits'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:496: error: undefined reference to 'FreeImage_GetGreenMask'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:457: error: undefined reference to 'FreeImage_ConvertToGreyscale'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageLoadErrorHandler(FREE_IMAGE_FORMAT, char const*):/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:61: error: undefined reference to 'FreeImage_GetFormatFromFIF'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:85: error: undefined reference to 'FreeImage_Initialise'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:89: error: undefined reference to 'FreeImage_GetVersion'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:92: error: undefined reference to 'FreeImage_GetCopyrightMessage'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:98: error: undefined reference to 'FreeImage_GetFIFCount'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:106: error: undefined reference to 'FreeImage_GetFIFExtensionList'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::startup():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:134: error: undefined reference to 'FreeImage_SetOutputMessage'
/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/artem/Android/ogre/build/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in function Ogre::FreeImageCodec::shutdown():/home/artem/Android/ogre/OgreMain/src/OgreFreeImageCodec.cpp:143: error: undefined reference to 'FreeImage_DeInitialise'
collect2: ld returned 1 exit status
make[3]: *** [obj/local/armeabi/libOgreJNI.so] Error 1
make[2]: *** [lib/libOgreJNIDummy.so] Ошибка 2
make[1]: *** [CMakeFiles/OgreJNIDummy.dir/all] Ошибка 2
make[1]: *** Ожидание завершения заданий...

Can anybody help? :D
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Ubuntu 12 Error!

Post by Emerich »

Artem wrote:

Code: Select all

/home/artem/Android/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lFreeImage
This means that it can'T find the FreeImage lib. Did you compile all the dependencies properly?
In your Ogre dir should be a folder called AndroidDependencies.
In it should be an include and a lib folder, then, depending on whether you compile for armeabi or armeabi-v7a, one of those and in them libFreeImage.a

The cmake script should actually tell you whether it found those dependencies.
Artem
Gnoblar
Posts: 3
Joined: Thu Mar 14, 2013 8:28 am

Re: Ubuntu 12 Error!

Post by Artem »

Thanks! I fixed one line in file ogre/CMake/Packages/FindFreeImage.cmake :
from:
set(FreeImage_LIBRARY_NAMES freeimage freeimageLib)
to:
set(FreeImage_LIBRARY_NAMES FreeImage FreeImageLib)
dertom
Gnoblar
Posts: 6
Joined: Mon Sep 10, 2012 8:38 pm
x 1

Re: Android build quick start guide

Post by dertom »

I also stumbled over a blackscreen recently. I tried to get hw-skinning to work using "GLSLES/skinningTwoWeightsVP.glsles". I got it
to run on my nexus7 as intended but got a blackscreen on my htc desire (qualcomm adreno 200), just saying the vertex-shader
got a problem but the compiler didn't give back any error-msg.

To make a long(!) story short, the problem was the loop. I enrolled it manually and it worked as intended. Just for info...
tek2222
Gnoblar
Posts: 1
Joined: Mon Mar 25, 2013 3:10 pm

Re: Android build quick start guide

Post by tek2222 »

I'm sorry if I have overseen it , but what is the reason that the Android Sample Browser does not include the BSP Sample ?
zZUBAa
Gnoblar
Posts: 8
Joined: Thu Mar 28, 2013 11:03 pm

Re: Android build quick start guide

Post by zZUBAa »

have same error here(branch 1.9, last revision)

Code: Select all

[ 51%] Built target OgreMain
[ 63%] Built target RenderSystem_GLES2
Scanning dependencies of target OgreJNIDummy
[ 63%] Building CXX object CMakeFiles/OgreJNIDummy.dir/dummyJNI.cpp.o
Linking CXX shared module lib\libOgreJNIDummy.so
Updated project.properties
Updated local.properties
Updated file D:\master\svn\ogre\ogre\androidbuild\OgreJNI\proguard-project.txt
"Compile++ thumb : OgreJNI <= OgreActivityJNI.cpp
"Compile thumb : android_native_app_glue <= android_native_app_glue.c
"Compile thumb : cpufeatures <= cpu-features.c
Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/
StaticLibrary  : libandroid_native_app_glue.a
StaticLibrary  : libcpufeatures.a
SharedLibrary  : libOgreJNI.so

d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lPlugin_ParticleFXStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lPlugin_OctreeSceneManagerStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lOgreRTShaderSystemStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: erro
r: cannot find -lOgreOverlayStatic
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./ob
j/local/armeabi/objs/OgreJNI/OgreActivityJNI.o: in function Java_org_ogre3d_andr
oid_OgreActivityJNI_create:D:/master/svn/ogre/ogre/OgreMain/src/Android/JNI/Ogre
ActivityJNI.cpp:86: error: undefined reference to 'Ogre::OctreePlugin::OctreePlu
gin()'
d:/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./ob
j/local/armeabi/objs/OgreJNI/OgreActivityJNI.o: in function Java_org_ogre3d_andr
oid_OgreActivityJNI_create:D:/master/svn/ogre/ogre/OgreMain/src/Android/JNI/Ogre
ActivityJNI.cpp:89: error: undefined reference to 'Ogre::ParticleFXPlugin::Parti
cleFXPlugin()'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libOgreJNI.so] Error 1
NMAKE : fatal error U1077: "D:\android\ndk\ndk-build.CMD": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""d:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""d:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
removed blank line in OgreJNI/Android.mk between LOCAL_LDLIBS after cmake and before nmake but
getting same error; Can you please help here?
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

zZUBAa wrote:have same error here(branch 1.9, last revision)

Code: Select all

 error: undefined reference to 'Ogre::ParticleFXPlugin::ParticleFXPlugin()'
Basically what this line tells you is: "I can't find that ParticleFXPlugin library!"

So you want to check whether that lib is actually even there =)

in the YOURBUILDFOLDER/lib
should be a file called
"libPlugin_ParticleFXStatic.a"

I assume that the old error with either some linebreaks in the mk file or the whole thing compiling in the wrong order

What I used to fix this was: instead of calling "nmake" after "cmake ....." you can call "nmake SampleBrowserDummy" that one seems to compile fine and actually gives you the SampleBrowser as output. The default in the new version seems to be the JNI and I'm not sure how far wolfman got with that.

EDIT: I added the nmake SampleBrowserDummy info to the wiki Quick Start Guide - hope you don't mind
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

Hi again,
Is there any way to get the whole thing to use the ndk8d but with the 4.6 toolchain?
When I have the 8d NDK installed and execute the cmake script it finds the 4.7 toolchain and uses that - that causes issues since boost for android so far only uses 4.6.

Thanks in advance.
Djoulihen
Gnoblar
Posts: 5
Joined: Wed Mar 27, 2013 4:28 pm

Re: Android build quick start guide

Post by Djoulihen »

Are you using the android-cmake project to build boost for android ? The cmake android toolchain in this project comes from the OpenCV repository (but is usually not as up-to-date as the opencv version).

In the one I got from the opencv repo your can specify the gcc toolchain version like this :

Code: Select all

cmake  -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.7 
I don' know if the current version of the cmake toolchain in the android-cmake project includes this yet. Anyway, I succesfully compiled boost for android using the 4.7 toolchain using this.
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am
x 12

Re: Android build quick start guide

Post by Emerich »

Djoulihen wrote:Are you using the android-cmake project to build boost for android ? The cmake android toolchain in this project comes from the OpenCV repository (but is usually not as up-to-date as the opencv version).

In the one I got from the opencv repo your can specify the gcc toolchain version like this :

Code: Select all

cmake  -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.7 
I don' know if the current version of the cmake toolchain in the android-cmake project includes this yet. Anyway, I succesfully compiled boost for android using the 4.7 toolchain using this.
Hey thanks mate. I'll try that right away. I'm using this boost for android repository
Post Reply