OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Building OSG for Android -- Windowing system issue


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build]
View previous topic :: View next topic  
Author Message
bwhaines
Newbie


Joined: 23 Apr 2017
Posts: 2

PostPosted: Sun Apr 23, 2017 2:01 am    Post subject:
Building OSG for Android -- Windowing system issue
Reply with quote

Hello all,

I'm trying to build OSG for Android, but I'm having some issues with it finding X11. From what I understand it's not supposed to be looking for X11 at all, but setting the windowing system to "None" results in "Windowing system not supported". Below is the Bash script I used, and the results of that build. My host system is Ubuntu 16.04, and I'm using Crystax for my Android NDK.

Bash script:
Code:

BASEDIR=$(pwd)
ANDROID_NDK=$BASEDIR/crystax-ndk

TOOLCHAIN=$BASEDIR/android14-toolchain
SYSROOT=$TOOLCHAIN/sysroot

CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
CXX=$TOOLCHAIN/bin/arm-linux-androideabi-g++

echo "Building OpenSceneGraph..."
cd $BASEDIR/osg
rm -r build
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$SYSROOT/usr \
      -DCMAKE_SYSTEM_NAME=Android \
      -DCMAKE_C_COMPILER=$CC \
      -DCMAKE_CXX_COMPILER=$CXX \     
      -DANDROID_STANDALONE_TOOLCHAIN=$TOOLCHAIN \
      -DOSG_BUILD_PLATFORM_ANDROID=ON \
      -DDYNAMIC_OPENTHREADS=OFF \
      -DDYNAMIC_OPENSCENEGRAPH=OFF \
      -DOSG_WINDOWING_SYSTEM="None" \
      -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
      -DOSG_GL_MATRICES_AVAILABLE=ON \
      -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON \
      -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON \
      -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON \
      -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF \
      -DOPENGL_PROFILE="GLES2" \
      -DBUILD_OSG_APPLICATIONS=OFF \
      -DBUILD_OSG_SAMPLES=OFF \
      -DBUILD_OSG_PLUGINS_BY_DEFAULT=0 \
      -DBUILD_OSG_PLUGIN_JPEG=1 \
      -DBUILD_OSG_PLUGIN_PNG=1 \
      -DBUILD_OSG_PLUGIN_BMP=1 \
      -DBUILD_OSG_PLUGIN_TGA=1 \
      -DBUILD_OSG_PLUGIN_DDS=1 \
      -DBUILD_OSG_PLUGIN_OSG=1 \
      -DBUILD_OSG_PLUGIN_SERIALIZERS_OSG=1 \
      -DFREETYPE_LIBRARY=$SYS_LIB/libfreetype.a \
      -DJPEG_LIBRARY=$SYS_LIB/libjpeg.a \
      -DJPEG_INCLUDE_DIR=$ANDROID_NDK/sources/libjpeg/9a/include \
      -DOPENGL_gl_LIBRARY=$SYS_LIB/libGLESv2.so \
      -DPNG_LIBRARY=$SYS_LIB/libpng.a \
      -DPNG_PNG_INCLUDE_DIR=$ANDROID_NDK/sources/libpng/1.6.19/include \
      -DSDL_LIBRARY=$SYS_LIB/libSDL2.so \
      -DSDL_INCLUDE_DIR=$SYS_INC/SDL2 \
      -DTIFF_LIBRARY=$SYS_LIB/libtiff.a \
      -DTIFF_INCLUDE_DIR=$ANDROID_NDK/sources/libtiff/4.0.6/include \
      -DZLIB_LIBRARY=$SYS_LIB/libz.so \
      ..
make
make install


Result:
Code:

Building OpenSceneGraph...
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE 
-- Found OpenGL: /libGLESv2.so 
-- Performing Test GL_HEADER_HAS_GLINT64
-- Performing Test GL_HEADER_HAS_GLINT64 - Failed
-- Performing Test GL_HEADER_HAS_GLUINT64
-- Performing Test GL_HEADER_HAS_GLUINT64 - Failed
-- Found Freetype: /libfreetype.a (found version "2.6.1")
-- Found JPEG: /libjpeg.a 
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES) (found version "1.900.1")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3")
-- Found ZLIB: /libz.so (found version "1.2.8")
-- Found GDAL: /usr/lib/libgdal.so 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gta'
--   No package 'gta' found
-- Could NOT find CURL (missing:  CURL_LIBRARY) (found version "7.47.0")
-- Could NOT find GStreamer (missing:  GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES)
-- Found GLIB: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include (found version "2.48.2")
-- Found SDL2: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/sysroot/usr/lib/libSDL2.so 
-- Found SDL: /libSDL2.so 
-- Checking for module 'cairo'
--   Found cairo, version 1.14.6
-- Checking for module 'poppler-glib'
--   No package 'poppler-glib' found
-- Checking for module 'librsvg-2.0>=2.35'
-- 
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.30
-- Checking for module 'gtkglext-x11-1.0'
--   Found gtkglext-x11-1.0, version 1.2.0
-- Found unsuitable Qt version "5.5.1" from /usr/bin/qmake
-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR)
-- Found PNG: /libpng.a (found version "1.6.19")
-- Found TIFF: /libtiff.a (found version "4.0.6")
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE (advanced)
For details see /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/TryRunResults.cmake
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for pthread_setconcurrency
-- Looking for pthread_setconcurrency - not found
-- Looking for pthread_getconcurrencyBuilding OpenSceneGraph...
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE 
-- Found OpenGL: /libGLESv2.so 
-- Performing Test GL_HEADER_HAS_GLINT64
-- Performing Test GL_HEADER_HAS_GLINT64 - Failed
-- Performing Test GL_HEADER_HAS_GLUINT64
-- Performing Test GL_HEADER_HAS_GLUINT64 - Failed
-- Found Freetype: /libfreetype.a (found version "2.6.1")
-- Found JPEG: /libjpeg.a 
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES) (found version "1.900.1")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3")
-- Found ZLIB: /libz.so (found version "1.2.8")
-- Found GDAL: /usr/lib/libgdal.so 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gta'
--   No package 'gta' found
-- Could NOT find CURL (missing:  CURL_LIBRARY) (found version "7.47.0")
-- Could NOT find GStreamer (missing:  GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES)
-- Found GLIB: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include (found version "2.48.2")
-- Found SDL2: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/sysroot/usr/lib/libSDL2.so 
-- Found SDL: /libSDL2.so 
-- Checking for module 'cairo'
--   Found cairo, version 1.14.6
-- Checking for module 'poppler-glib'
--   No package 'poppler-glib' found
-- Checking for module 'librsvg-2.0>=2.35'
-- 
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.30
-- Checking for module 'gtkglext-x11-1.0'
--   Found gtkglext-x11-1.0, version 1.2.0
-- Found unsuitable Qt version "5.5.1" from /usr/bin/qmake
-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR)
-- Found PNG: /libpng.a (found version "1.6.19")
-- Found TIFF: /libtiff.a (found version "4.0.6")
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE (advanced)
For details see /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/TryRunResults.cmake
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for pthread_setconcurrency
-- Looking for pthread_setconcurrency - not found
-- Looking for pthread_getconcurrency
-- Looking for pthread_getconcurrency - not found
-- Looking for pthread_setaffinity_np
-- Looking for pthread_setaffinity_np - not found
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY - Failed
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY - Failed
-- Checking for module 'xrandr'
--   Found xrandr, version 1.5.0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_X11_LIB (ADVANCED)Building OpenSceneGraph...
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc
-- Check for working C compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++
-- Check for working CXX compiler: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/bin/arm-linux-androideabi-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE 
-- Found OpenGL: /libGLESv2.so 
-- Performing Test GL_HEADER_HAS_GLINT64
-- Performing Test GL_HEADER_HAS_GLINT64 - Failed
-- Performing Test GL_HEADER_HAS_GLUINT64
-- Performing Test GL_HEADER_HAS_GLUINT64 - Failed
-- Found Freetype: /libfreetype.a (found version "2.6.1")
-- Found JPEG: /libjpeg.a 
-- Could NOT find Jasper (missing:  JASPER_LIBRARIES) (found version "1.900.1")
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.3")
-- Found ZLIB: /libz.so (found version "1.2.8")
-- Found GDAL: /usr/lib/libgdal.so 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gta'
--   No package 'gta' found
-- Could NOT find CURL (missing:  CURL_LIBRARY) (found version "7.47.0")
-- Could NOT find GStreamer (missing:  GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES)
-- Found GLIB: /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include (found version "2.48.2")
-- Found SDL2: /home/bwhaines/AndroidStudioProjects/android-port/deps/android14-toolchain/sysroot/usr/lib/libSDL2.so 
-- Found SDL: /libSDL2.so 
-- Checking for module 'cairo'
--   Found cairo, version 1.14.6
-- Checking for module 'poppler-glib'
--   No package 'poppler-glib' found
-- Checking for module 'librsvg-2.0>=2.35'
-- 
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.30
-- Checking for module 'gtkglext-x11-1.0'
--   Found gtkglext-x11-1.0, version 1.2.0
-- Found unsuitable Qt version "5.5.1" from /usr/bin/qmake
-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR)
-- Found PNG: /libpng.a (found version "1.6.19")
-- Found TIFF: /libtiff.a (found version "4.0.6")
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
   _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE (advanced)
For details see /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/TryRunResults.cmake
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
-- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed
-- Looking for pthread_yield
-- Looking for pthread_yield - not found
-- Looking for sched_yield
-- Looking for sched_yield - found
-- Looking for pthread_setconcurrency
-- Looking for pthread_setconcurrency - not found
-- Looking for pthread_getconcurrency
-- Looking for pthread_getconcurrency - not found
-- Looking for pthread_setaffinity_np
-- Looking for pthread_setaffinity_np - not found
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY - Failed
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY - Failed
-- Checking for module 'xrandr'
--   Found xrandr, version 1.5.0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_X11_LIB (ADVANCED)
    linked by target "osgViewer" in directory /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/src/osgViewer
 
-- Configuring incomplete, errors occurred!
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeOutput.log".
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
    linked by target "osgViewer" in directory /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/src/osgViewer
 
-- Configuring incomplete, errors occurred!
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeOutput.log".
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
-- Looking for pthread_getconcurrency - not found
-- Looking for pthread_setaffinity_np
-- Looking for pthread_setaffinity_np - not found
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY - Failed
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY
-- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY - Failed
-- Checking for module 'xrandr'
--   Found xrandr, version 1.5.0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_X11_LIB (ADVANCED)
    linked by target "osgViewer" in directory /home/bwhaines/AndroidStudioProjects/android-port/deps/osg/src/osgViewer
 
-- Configuring incomplete, errors occurred!
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeOutput.log".
See also "/home/bwhaines/AndroidStudioProjects/android-port/deps/osg/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.


Any tips about what I'm doing wrong would be greatly appreciated.

Thank you!

Brett


Last edited by bwhaines on Sun Apr 23, 2017 9:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 155

PostPosted: Sun Apr 23, 2017 12:39 pm    Post subject:
Building OSG for Android -- Windowing system issue
Reply with quote

Hi.


I'm currently working on a set of tutorials for OSG: https://github.com/OGStudio/openscenegraph-cross-platform-guide

I've just finished re-doing Android support for sample application: https://github.com/OGStudio/openscenegraph-cross-platform-guide-application



The tutorial for Android is in the process, but if you're interested to do it yourself, here's the Android-only part for the sample application: https://bitbucket.org/kornerr/android-osg-tutorial (You can open it in AndroidStudio)

Its CMakeLists.txt builds OpenSceneGraph as a static library. It also builds android-static-lib, but you can safely remove it, since this was just a test.


The crucial CMake OSG options are in build.gradle file: https://bitbucket.org/kornerr/android-osg-tutorial/src/tip/app/build.gradle?at=default&fileviewer=file-view-default


I plan to finish the tutorial in a week or two, so you may want to revisit the guide later for a complete Android tutorial.










2017-04-23 9:01 GMT+07:00 Brett Haines < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hello all,

I'm trying to build OSG for Android, but I'm having some issues with it finding X11.  From what I understand it's not supposed to be looking for X11 at all, but setting the windowing system to "None" results in "Windowing system not supported".  Below are pastebins of the Bash script I used, and the results of that build.  My host system is Ubuntu 16.04, and I'm using Crystax for my Android NDK.

pastebin dot com Z8CAs1v3

pastebin dot com QRvhSvpn

Any tips about what I'm doing wrong would be greatly appreciated.

Thank you!

Brett

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70814#70814





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
bwhaines
Newbie


Joined: 23 Apr 2017
Posts: 2

PostPosted: Wed Apr 26, 2017 9:43 pm    Post subject:
Reply with quote

Thank you for the links Kornerr -- I'll definitely be keeping an eye on that.

I did figure out that my issue was not using the toolchain file in the OpenSceneGraph repo. Adding the following option to CMake got it going:

Code:

  -D CMAKE_TOOLCHAIN_FILE=$BASEDIR/openscenegraph/PlatformSpecifics/Android/android.toolchain.cmake


I also had to remove the lines that specified my C and C++ compilers. For whatever reason, setting those manually caused CMake to not find them.

Cheers,
Brett
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 155

PostPosted: Fri Apr 28, 2017 3:58 am    Post subject:
Building OSG for Android -- Windowing system issue
Reply with quote

Hi.

I tried to use android.toolchain.cmake, too, but that requires configuration and building outside AndroidStudio. I ended up simply including OSG as 'add_subdirectory' into native-lib's CMakeLists.txt that AndroidStudio creates. That way, OSG is built as a dependency whenever native-lib is built. Such approach removes the need for doing anything outside AndroidStudio, referencing external toolchain file, and you get OSG built for those ABIs that you specified in 'abiFilters'.

I plan to publish Android tutorial with the mentioned approach next week.



2017-04-27 4:43 GMT+07:00 Brett Haines < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Thank you for the links Kornerr -- I'll definitely be keeping an eye on that.

I did figure out that my issue was not using the toolchain file in the OpenSceneGraph repo.  Adding the following option to CMake got it going:


Code:

  -D CMAKE_TOOLCHAIN_FILE=$BASEDIR/openscenegraph/PlatformSpecifics/Android/android.toolchain.cmake




I also had to remove the lines that specified my C and C++ compilers.  For whatever reason, setting those manually caused CMake to not find them.

Cheers,
Brett

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70844#70844





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
kornerr
Appreciator


Joined: 01 Oct 2013
Posts: 155

PostPosted: Thu May 04, 2017 5:27 pm    Post subject:
Building OSG for Android -- Windowing system issue
Reply with quote

Hi.


I've just published Android tutorial: https://github.com/OGStudio/openscenegraph-cross-platform-guide/tree/master/1.8.SampleUnderAndroid


If you have any questions or ideas, I'd be glad to hear from you.


2017-04-28 10:54 GMT+07:00 michael kapelko < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Hi.

I tried to use android.toolchain.cmake, too, but that requires configuration and building outside AndroidStudio. I ended up simply including OSG as 'add_subdirectory' into native-lib's CMakeLists.txt that AndroidStudio creates. That way, OSG is built as a dependency whenever native-lib is built. Such approach removes the need for doing anything outside AndroidStudio, referencing external toolchain file, and you get OSG built for those ABIs that you specified in 'abiFilters'.

I plan to publish Android tutorial with the mentioned approach next week.



2017-04-27 4:43 GMT+07:00 Brett Haines < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>:
Quote:
Thank you for the links Kornerr -- I'll definitely be keeping an eye on that.

I did figure out that my issue was not using the toolchain file in the OpenSceneGraph repo.  Adding the following option to CMake got it going:


Code:

  -D CMAKE_TOOLCHAIN_FILE=$BASEDIR/openscenegraph/PlatformSpecifics/Android/android.toolchain.cmake




I also had to remove the lines that specified my C and C++ compilers.  For whatever reason, setting those manually caused CMake to not find them.

Cheers,
Brett

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70844#70844





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org









------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Build system [build] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Multi-pass rendering segfault issue qiaokun General 0 Mon May 15, 2017 10:36 am View latest post
No new posts osg Coordinate system shayne.tueller General 5 Fri Apr 28, 2017 11:54 am View latest post
No new posts Having an issue with OSG plugins error. Brigham Keys, Esq. General 2 Wed Apr 12, 2017 5:24 am View latest post
No new posts OSG + Qt on Android Treazy General [3rdparty] 2 Fri Mar 31, 2017 10:44 pm View latest post
No new posts Fix FBX conversion to OpenGL coordina... Farshid Lashkari Submission 1 Wed Mar 15, 2017 6:34 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP