<div dir="ltr">Hi,<div><br></div><div>Yes indeed is related to the STL. Recent versions of the NDK should have better support but I always find problems with that.</div><div><br></div><div>In the end I always copy the gnustl_static library from the android ndk to the OSG_SDK, but the android ndk should support it without that kind of workarounds.</div><div><br></div><div>Could you try add this to the Application.mk?</div><div><br></div>APP_CFLAGS += -fexceptions<br>APP_STL := gnustl_static<div><br></div><div>And remove the -lgnustl_static from the list of static libraries?</div><div><br></div><div>If still does not work then I recommend copy the library manually and continue with the current Android.mk.</div><div><br></div><div>Once I have more time I'll try a couple of solutions I found doing a quick search, but if you find the solution I'll be more than happy to apply the changes! :).</div><div><br></div><div>Regards,</div><div>Rafa.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-26 18:48 GMT+02:00 Christian Kehl <span dir="ltr"><<a href="mailto:christian-kehl@web.de" target="_blank">christian-kehl@web.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I had a closer look to the errors and the Android.mk file. osgdb_serializers_osgpresentation doesn't exist in my build (perhaps missing in general - it wasn't in the 3.0.2 Android.mk file either, so that's new things that is added and missing in the build).<br>
<br>
leaving the following errors:<br>
<span class="">christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$ ${ANDROID_NDK}/ndk-build<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgViewer.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosg.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgDB.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgUtil.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgGA.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIUtils.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= MultiViewNode.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= GLES2ShaderGenVisitor.cpp<br>
[armeabi] SharedLibrary  : libjniosg-gles1.so<br>
</span>/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lgnustl_static<br>
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_ive.a(DataOutputStream.cpp.o):DataOutputStream.cpp:typeinfo for osg::Node const*: error: undefined reference to 'vtable for __cxxabiv1::__pointer_type_info'<br>
<span class="">/home/christian/Downloads/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function<br>
</span>/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function osgParticle::range<float>::get_random() const: error: undefined reference to 'rand'<br>
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function osgParticle::RadialShooter::shoot(osgParticle::Particle*) const: error: undefined reference to 'rand'<br>
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(RandomRateCounter.cpp.o):RandomRateCounter.cpp:function osgParticle::RandomRateCounter::numParticlesToCreate(double) const: error: undefined reference to 'rand'<br>
/home/christian/android-install/lib/osgPlugins-3.3.7/libosgdb_serializers_osgparticle.a(SectorPlacer.cpp.o):SectorPlacer.cpp:function osgParticle::SectorPlacer::place(osgParticle::Particle*) const: error: undefined reference to 'rand'<br>
/home/christian/android-install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgWidget.a(Input.cpp.o):Input.cpp:function osgWidget::Input::_calculateCursorOffsets(): error: undefined reference to 'std::__detail::_List_node_base::_M_unhook()'<br>
/home/christian/android-install/lib/libosgWidget.a(Widget.cpp.o):Widget.cpp:function osgWidget::Widget::Widget(osgWidget::Widget const&, osg::CopyOp const&): error: undefined reference to 'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function osgWidget::Window::getParentList(std::list<osg::observer_ptr<osgWidget::Window>, std::allocator<osg::observer_ptr<osgWidget::Window> > >&) const: error: undefined reference to 'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgWidget.a(Window.cpp.o):Window.cpp:function osgWidget::Window::getEmbeddedList(std::list<osg::observer_ptr<osgWidget::Window>, std::allocator<osg::observer_ptr<osgWidget::Window> > >&) const: error: undefined reference to 'std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::merge<SortEvents>(std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >&, SortEvents): error: undefined reference to 'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::merge<SortEvents>(std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >&, SortEvents): error: undefined reference to 'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::sort<SortEvents>(SortEvents): error: undefined reference to 'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::sort<SortEvents>(SortEvents): error: undefined reference to 'std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::sort<SortEvents>(SortEvents): error: undefined reference to 'std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function void std::list<osg::ref_ptr<osgGA::Event>, std::allocator<osg::ref_ptr<osgGA::Event> > >::sort<SortEvents>(SortEvents): error: undefined reference to 'std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)'<br>
/home/christian/android-install/lib/libosgViewer.a(CompositeViewer.cpp.o):CompositeViewer.cpp:function osgViewer::CompositeViewer::eventTraversal(): error: undefined reference to 'std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)'<br>
/home/christian/android-install/lib/libosgViewer.a(GraphicsWindow.cpp.o):GraphicsWindow.cpp:function std::list<osgViewer::View*, std::allocator<osgViewer::View*> >::sort(): error: undefined reference to 'std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)'<br>
/home/christian/android-install/lib/libosgViewer.a(GraphicsWindow.cpp.o):GraphicsWindow.cpp:function osgViewer::GraphicsWindow::getViews(std::list<osgViewer::View*, std::allocator<osgViewer::View*> >&): error: undefined reference to 'std::__detail::_List_node_base::_M_unhook()'<br>
/home/christian/android-install/lib/libosgViewer.a(View.cpp.o):View.cpp:function osgViewer::View::removeEventHandler(osgGA::EventHandler*): error: undefined reference to 'std::__detail::_List_node_base::_M_unhook()'<br>
/home/christian/android-install/lib/libosgViewer.a(View.cpp.o):View.cpp:function std::list<osg::ref_ptr<osg::Camera>, std::allocator<osg::ref_ptr<osg::Camera> > >::operator=(std::list<osg::ref_ptr<osg::Camera>, std::allocator<osg::ref_ptr<osg::Camera> > > const&): error: undefined reference to 'std::__detail::_List_node_base::_M_unhook()'<br>
/home/christian/android-install/lib/libosgText.a(Glyph.cpp.o):Glyph.cpp:function osgText::GlyphTexture::apply(osg::State&) const: error: undefined reference to 'glGenerateMipmap'<br>
/home/christian/android-install/lib/libosgFX.a(AnisotropicLighting.cpp.o):AnisotropicLighting.cpp:function (anonymous namespace)::ViewMatrixExtractor::compare(osg::StateAttribute const&) const: error: undefined reference to 'std::type_info::before(std::type_info const&) const'<br>
/home/christian/android-install/lib/libosgFX.a(BumpMapping.cpp.o):BumpMapping.cpp:function (anonymous namespace)::ViewMatrixExtractor::compare(osg::StateAttribute const&) const: error: undefined reference to 'std::type_info::before(std::type_info const&) const'<br>
/home/christian/android-install/lib/libosgFX.a(SpecularHighlights.cpp.o):SpecularHighlights.cpp:function (anonymous namespace)::AutoTextureMatrix::compare(osg::StateAttribute const&) const: error: undefined reference to 'std::type_info::before(std::type_info const&) const'<br>
/home/christian/android-install/lib/libosgFX.a(Validator.cpp.o):Validator.cpp:function osgFX::Validator::compare(osg::StateAttribute const&) const: error: undefined reference to 'std::type_info::before(std::type_info const&) const'<br>
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::fileType(std::string const&): error: undefined reference to 'stat64'<br>
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::makeDirectory(std::string const&): error: undefined reference to 'stat64'<br>
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::makeDirectory(std::string const&): error: undefined reference to 'stat64'<br>
/home/christian/android-install/lib/libosg.a(Shader.cpp.o):Shader.cpp:function osg::Shader::PerContextShader::compileShader(osg::State&): error: undefined reference to 'glShaderBinary'<br>
/home/christian/android-install/lib/libosg.a(Texture.cpp.o):Texture.cpp:function osg::Texture::TextureObjectManager::checkConsistency() const: error: undefined reference to 'typeinfo for char const*'<br>
<span class="">collect2: error: ld returned 1 exit status<br>
make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1<br>
<br>
</span>most of them, if not all, can be tracked back to the very first error line: "cannot find -lgnustl_static". I tried a lot to add that path hardcoded - in the Android.mk file to the LOCAL_LDFLAGS (did not work) and to my commandline LD_LIBRARY_PATH - both did not work. Any idea how to circumvent this error ?<br>
<span class=""><br>
Thank you!<br>
<br>
Cheers,<br>
Christian<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=63535#63535" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=63535#63535</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Rafael Gaitán Linares<br>CTO at Mirage Technologies S.L - <a href="http://www.mirage-tech.com" target="_blank">http://www.mirage-tech.com</a><br></div></div>
</div>