Re: [osg-users] Building on Android
On Tue, Oct 9, 2012 at 7:01 AM, Eduardo Poyart poy...@gmail.com wrote: The error happens with the default order. I tried changing it, with no success. In case you want to look into this further, you may want to refer to my version that successfully builds with the latest SDK and NDK and with dynamic runtime: https://github.com/Eduardop/osg/tree/osg-android Eduardo That's odd - I have managed to build OSG with the r8b release of NDK, just by making sure that gnustl_static is used. I have seen similar problem before, typically either updating the NDK or adding explicit -lgnustl_static to the linker flags fixed it. Unfortunately Google's NDK is a rather non-deterministic fragile mess that often breaks in random ways. Add an absolute lack of any documentation for it and it is really a pleasure to use it :( Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building on Android
The error happens with the default order. I tried changing it, with no success. In case you want to look into this further, you may want to refer to my version that successfully builds with the latest SDK and NDK and with dynamic runtime: https://github.com/Eduardop/osg/tree/osg-android Eduardo On Sun, Oct 7, 2012 at 7:05 AM, Jorge Izquierdo Ciges jori...@gmail.com wrote: It could be possible that the gnustl_static was included in the wrong order, it has happened a few times (depending NDK/Linux version) to me. 2012/10/7 Eduardo Poyart poy...@gmail.com Finally, I was able to build by using the shared runtime (libgnustl_shared). I could not make it work with libgnustl_static. Eduardo On Fri, Oct 5, 2012 at 11:39 AM, Eduardo Poyart poy...@gmail.com wrote: Hello, I'm having a problem building for Android. I can build OSG, but when I try to build the GLES1 example I have these linker errors: /home/eduardo/src/osg/osg-android/obj/local/armeabi-v7a/libosgdb_osg.a(ReaderWri terOSG.o): In function `OSGReaderWriter::setPrecision(osgDB::Output, osgDB::Opt ions const*) const': /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:295: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::basic_istringstream(std::basic_stringchar, std::char_tr aitschar, std::allocatorchar const, std::_Ios_Openmode)' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' There are several other errors related to basic_istringstream, basic_stringbuf, type_info and others. It seems like there is a STL incompatibility. I checked, but both osg and the example seem to be being built with the correct STL include path. The linker command is: /usr/local/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x 86/bin/arm-linux-androideabi-g++ -Wl,-soname,libosgNativeLib.so -shared --sysroo t=/usr/local/android-ndk-r8b/platforms/android-5/arch-arm ./obj/local/armeabi-v7 a/objs/osgNativeLib/osgNativeLib.o ./obj/local/armeabi-v7a/objs/osgNativeLib/Osg MainApp.o ./obj/local/armeabi-v7a/objs/osgNativeLib/OsgAndroidNotifyHandler.o ./ obj/local/armeabi-v7a/libgnustl_static.a -Wl,--fix-cortex-a8 -L /home/eduardo/s rc/osg/osg-android/obj/local/armeabi-v7a -losgdb_tga -losgdb_osg -losgdb_depreca ted_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext -losgdb_de precated_osgterrain -losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow -losg db_deprecated_osgparticle -losgdb_deprecated_osgfx -losgdb_deprecated_osganimati on -losgdb_deprecated_osg -losgdb_serializers_osgvolume -losgdb_serializers_osgt ext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim -losgdb_serializer s_osgshadow -losgdb_serializers_osgparticle -losgdb_serializers_osgmanipulator - losgdb_serializers_osgfx -losgdb_serializers_osganimation -losgdb_serializers_os g -losgViewer -losgVolume -losgText -losgSim -losgManipulator -losgGA -losgFX -l osgDB -losgUtil -losg -lOpenThreads -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z ,relro -Wl,-z,now -L/usr/local/android-ndk-r8b/platforms/android-5/arch-arm/usr/ lib -llog -lGLESv1_CM -ldl -lz -lc -lm -o obj/local/armeabi-v7a/libosgNativeLib. so I have the latest OSG SVN version and the latest SDK and NDK. I'm following the instructions in both http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android and http://www.openscenegraph.com/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2. I had to change a few false to NULL in osgNativeLib.cpp to stop gcc from complaining. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building on Android
It could be possible that the gnustl_static was included in the wrong order, it has happened a few times (depending NDK/Linux version) to me. 2012/10/7 Eduardo Poyart poy...@gmail.com Finally, I was able to build by using the shared runtime (libgnustl_shared). I could not make it work with libgnustl_static. Eduardo On Fri, Oct 5, 2012 at 11:39 AM, Eduardo Poyart poy...@gmail.com wrote: Hello, I'm having a problem building for Android. I can build OSG, but when I try to build the GLES1 example I have these linker errors: /home/eduardo/src/osg/osg-android/obj/local/armeabi-v7a/libosgdb_osg.a(ReaderWri terOSG.o): In function `OSGReaderWriter::setPrecision(osgDB::Output, osgDB::Opt ions const*) const': /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:295: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::basic_istringstream(std::basic_stringchar, std::char_tr aitschar, std::allocatorchar const, std::_Ios_Openmode)' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' There are several other errors related to basic_istringstream, basic_stringbuf, type_info and others. It seems like there is a STL incompatibility. I checked, but both osg and the example seem to be being built with the correct STL include path. The linker command is: /usr/local/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x 86/bin/arm-linux-androideabi-g++ -Wl,-soname,libosgNativeLib.so -shared --sysroo t=/usr/local/android-ndk-r8b/platforms/android-5/arch-arm ./obj/local/armeabi-v7 a/objs/osgNativeLib/osgNativeLib.o ./obj/local/armeabi-v7a/objs/osgNativeLib/Osg MainApp.o ./obj/local/armeabi-v7a/objs/osgNativeLib/OsgAndroidNotifyHandler.o ./ obj/local/armeabi-v7a/libgnustl_static.a -Wl,--fix-cortex-a8 -L /home/eduardo/s rc/osg/osg-android/obj/local/armeabi-v7a -losgdb_tga -losgdb_osg -losgdb_depreca ted_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext -losgdb_de precated_osgterrain -losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow -losg db_deprecated_osgparticle -losgdb_deprecated_osgfx -losgdb_deprecated_osganimati on -losgdb_deprecated_osg -losgdb_serializers_osgvolume -losgdb_serializers_osgt ext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim -losgdb_serializer s_osgshadow -losgdb_serializers_osgparticle -losgdb_serializers_osgmanipulator - losgdb_serializers_osgfx -losgdb_serializers_osganimation -losgdb_serializers_os g -losgViewer -losgVolume -losgText -losgSim -losgManipulator -losgGA -losgFX -l osgDB -losgUtil -losg -lOpenThreads -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z ,relro -Wl,-z,now -L/usr/local/android-ndk-r8b/platforms/android-5/arch-arm/usr/ lib -llog -lGLESv1_CM -ldl -lz -lc -lm -o obj/local/armeabi-v7a/libosgNativeLib. so I have the latest OSG SVN version and the latest SDK and NDK. I'm following the instructions in both http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android and http://www.openscenegraph.com/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2 . I had to change a few false to NULL in osgNativeLib.cpp to stop gcc from complaining. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building on Android
Finally, I was able to build by using the shared runtime (libgnustl_shared). I could not make it work with libgnustl_static. Eduardo On Fri, Oct 5, 2012 at 11:39 AM, Eduardo Poyart poy...@gmail.com wrote: Hello, I'm having a problem building for Android. I can build OSG, but when I try to build the GLES1 example I have these linker errors: /home/eduardo/src/osg/osg-android/obj/local/armeabi-v7a/libosgdb_osg.a(ReaderWri terOSG.o): In function `OSGReaderWriter::setPrecision(osgDB::Output, osgDB::Opt ions const*) const': /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:295: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::basic_istringstream(std::basic_stringchar, std::char_tr aitschar, std::allocatorchar const, std::_Ios_Openmode)' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' There are several other errors related to basic_istringstream, basic_stringbuf, type_info and others. It seems like there is a STL incompatibility. I checked, but both osg and the example seem to be being built with the correct STL include path. The linker command is: /usr/local/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x 86/bin/arm-linux-androideabi-g++ -Wl,-soname,libosgNativeLib.so -shared --sysroo t=/usr/local/android-ndk-r8b/platforms/android-5/arch-arm ./obj/local/armeabi-v7 a/objs/osgNativeLib/osgNativeLib.o ./obj/local/armeabi-v7a/objs/osgNativeLib/Osg MainApp.o ./obj/local/armeabi-v7a/objs/osgNativeLib/OsgAndroidNotifyHandler.o ./ obj/local/armeabi-v7a/libgnustl_static.a -Wl,--fix-cortex-a8 -L /home/eduardo/s rc/osg/osg-android/obj/local/armeabi-v7a -losgdb_tga -losgdb_osg -losgdb_depreca ted_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext -losgdb_de precated_osgterrain -losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow -losg db_deprecated_osgparticle -losgdb_deprecated_osgfx -losgdb_deprecated_osganimati on -losgdb_deprecated_osg -losgdb_serializers_osgvolume -losgdb_serializers_osgt ext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim -losgdb_serializer s_osgshadow -losgdb_serializers_osgparticle -losgdb_serializers_osgmanipulator - losgdb_serializers_osgfx -losgdb_serializers_osganimation -losgdb_serializers_os g -losgViewer -losgVolume -losgText -losgSim -losgManipulator -losgGA -losgFX -l osgDB -losgUtil -losg -lOpenThreads -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z ,relro -Wl,-z,now -L/usr/local/android-ndk-r8b/platforms/android-5/arch-arm/usr/ lib -llog -lGLESv1_CM -ldl -lz -lc -lm -o obj/local/armeabi-v7a/libosgNativeLib. so I have the latest OSG SVN version and the latest SDK and NDK. I'm following the instructions in both http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android and http://www.openscenegraph.com/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2. I had to change a few false to NULL in osgNativeLib.cpp to stop gcc from complaining. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Building on Android
Hello, I'm having a problem building for Android. I can build OSG, but when I try to build the GLES1 example I have these linker errors: /home/eduardo/src/osg/osg-android/obj/local/armeabi-v7a/libosgdb_osg.a(ReaderWri terOSG.o): In function `OSGReaderWriter::setPrecision(osgDB::Output, osgDB::Opt ions const*) const': /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:295: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::basic_istringstream(std::basic_stringchar, std::char_tr aitschar, std::allocatorchar const, std::_Ios_Openmode)' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313: undefined reference to `std::basic_istringstreamchar, std::char_traitschar, std::allocatorchar ::~basic_istringstream()' There are several other errors related to basic_istringstream, basic_stringbuf, type_info and others. It seems like there is a STL incompatibility. I checked, but both osg and the example seem to be being built with the correct STL include path. The linker command is: /usr/local/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x 86/bin/arm-linux-androideabi-g++ -Wl,-soname,libosgNativeLib.so -shared --sysroo t=/usr/local/android-ndk-r8b/platforms/android-5/arch-arm ./obj/local/armeabi-v7 a/objs/osgNativeLib/osgNativeLib.o ./obj/local/armeabi-v7a/objs/osgNativeLib/Osg MainApp.o ./obj/local/armeabi-v7a/objs/osgNativeLib/OsgAndroidNotifyHandler.o ./ obj/local/armeabi-v7a/libgnustl_static.a -Wl,--fix-cortex-a8 -L /home/eduardo/s rc/osg/osg-android/obj/local/armeabi-v7a -losgdb_tga -losgdb_osg -losgdb_depreca ted_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext -losgdb_de precated_osgterrain -losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow -losg db_deprecated_osgparticle -losgdb_deprecated_osgfx -losgdb_deprecated_osganimati on -losgdb_deprecated_osg -losgdb_serializers_osgvolume -losgdb_serializers_osgt ext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim -losgdb_serializer s_osgshadow -losgdb_serializers_osgparticle -losgdb_serializers_osgmanipulator - losgdb_serializers_osgfx -losgdb_serializers_osganimation -losgdb_serializers_os g -losgViewer -losgVolume -losgText -losgSim -losgManipulator -losgGA -losgFX -l osgDB -losgUtil -losg -lOpenThreads -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z ,relro -Wl,-z,now -L/usr/local/android-ndk-r8b/platforms/android-5/arch-arm/usr/ lib -llog -lGLESv1_CM -ldl -lz -lc -lm -o obj/local/armeabi-v7a/libosgNativeLib. so I have the latest OSG SVN version and the latest SDK and NDK. I'm following the instructions in both http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android and http://www.openscenegraph.com/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2. I had to change a few false to NULL in osgNativeLib.cpp to stop gcc from complaining. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org