Hi, Yes indeed is related to the STL. Recent versions of the NDK should have better support but I always find problems with that.
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. Could you try add this to the Application.mk? APP_CFLAGS += -fexceptions APP_STL := gnustl_static And remove the -lgnustl_static from the list of static libraries? If still does not work then I recommend copy the library manually and continue with the current Android.mk. 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! :). Regards, Rafa. 2015-04-26 18:48 GMT+02:00 Christian Kehl <[email protected]>: > Hi, > > 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). > > leaving the following errors: > christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$ > ${ANDROID_NDK}/ndk-build > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgViewer.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosg.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgDB.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgUtil.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgGA.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIUtils.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= MultiViewNode.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= GLES2ShaderGenVisitor.cpp > [armeabi] SharedLibrary : libjniosg-gles1.so > /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 > /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' > /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 > /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' > /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' > /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' > /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' > /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*)' > /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()' > /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*)' > /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*)' > /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*)' > /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*)' > /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*)' > /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*)' > /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&)' > /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&)' > /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&)' > /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*)' > /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&)' > /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()' > /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()' > /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()' > /home/christian/android-install/lib/libosgText.a(Glyph.cpp.o):Glyph.cpp:function > osgText::GlyphTexture::apply(osg::State&) const: error: undefined reference > to 'glGenerateMipmap' > /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' > /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' > /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' > /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' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::fileType(std::string const&): error: undefined reference to 'stat64' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::makeDirectory(std::string const&): error: undefined reference to > 'stat64' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::makeDirectory(std::string const&): error: undefined reference to > 'stat64' > /home/christian/android-install/lib/libosg.a(Shader.cpp.o):Shader.cpp:function > osg::Shader::PerContextShader::compileShader(osg::State&): error: undefined > reference to 'glShaderBinary' > /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*' > collect2: error: ld returned 1 exit status > make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1 > > 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 ? > > Thank you! > > Cheers, > Christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=63535#63535 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

