porting a GLFW and OPENAL game?


slenkar

Member
Joined
Jan 15, 2012
Messages
64
Which toolchain/method would be the best for porting a game that uses GLFW and OpenAL  
 
You can use any toolchain you like. Maybe Yactfeau for ease of use or Ivanovics toolchain, that has a more recent compiler.


Openal is just a compile away. It is really easy and fast to compile without any issues.


Dn't know for GLFW though.


If it is not gles compilant, you will have to port it to gles first.


Have a look in the wiki on how to do so.
 
Last edited by a moderator:
I use sebt3's Yactfeau cross compiler. OpenAL it just compiles like mcobit says..

Generally what I do is run this command


setprj YOUR_PROJECT_DIR

Then I change directory to the openAL source and run the normal (pndconfig, make, make install) for openAL and it will install the library and header files for openAL in /mnt/utmp/YOUR_PROJECT_DIR . From there when you compile your project it will find the needed files automatically.
 
Last edited by a moderator:
You can also develop and compile directely on the Pandora.

OpenAL is easy

For GLFW, looks like it's a OpenGL only, will probably hard to port it to GLES (and software rendering will produce unusable programs)
 
What are your steps to compile?


If there is an autogen.sh or bootstrap file, run it first.
 
./configure is unable to run

When running Make it says no rule is found

When running Cmake it says..

cmake glfw-master/src
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
You have called ADD_LIBRARY for library glfw without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Error: Cannot determine link language for target "glfw".
CMake Error: CMake can not determine linker language for target:glfw
-- Generating done
-- Build files have been written to: /root

 

When running the pandora Cmake it says

/opt/pandora/sdk_utils/PandoraToolchain.cmake /src
/opt/pandora/sdk_utils/PandoraToolchain.cmake: line 2: syntax error near unexpected token `CMAKE_SYSTEM_NAME'
/opt/pandora/sdk_utils/PandoraToolchain.cmake: line 2: `SET(CMAKE_SYSTEM_NAME Linux)'
 
Last edited by a moderator:
./configure is unable to run

When running Make it says no rule is found

When running Cmake it says..
In the download file (2.7.7) and in svn, there is no configure Makefile nor CMakeFile.txt, so none of these will work.

Instead they are using a custom build system with a compile.sh. (yeah, once again a dev said himself : I know how to build better than a dedicated dev team working on a good build system for the last 20 years... And as usual he fail miserably when it come to cross-compiling)

This script wont work with any cross-compiling toolchain. it might work on pandora if it manage to detect that libGL linuxbosch is working on.

I would recommand you to create your own CMakeList.txt (or Makefile if ou prefer) and port it to GLES (as GLFW doesnt support it currently).

-- Build files have been written to: /root
I would recommand against building stuff as root...
 
thanks sebt,  I wondered what was going on

canseco, i was trying to compile glfw3, thats the one i downloaded
 
how do i make sure its using the .so files in the toolchain and not the host system

when i compile it doesnt give any good debug messages . it just says

'In file included from ../main.h:35:0,'

on line 35 it says include glfw.h which is there

(renamed from glfw3.h)

here is the verbose output

/opt/pandora/arm-2011.09/bin/arm-none-linux-gnueabi-g++ -I../glfw/include -I../glfw/lib -I../glfw/lib/x11 -I../openal/include -I../stb -I ../ -I../GL -Wall -v ../main.cpp -o main

Using built-in specs.

COLLECT_GCC=/opt/pandora/arm-2011.09/bin/arm-none-linux-gnueabi-g++

COLLECT_LTO_WRAPPER=/opt/pandora/arm-2011.09/bin/../libexec/gcc/arm-none-linux-gnueabi/4.6.1/lto-wrapper

Target: arm-none-linux-gnueabi

Configured with: /scratch/jwlemke/2011.09-arm-linux-eabi-lite/src/gcc-4.6-2011.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=70 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery CodeBench Lite 2011.09-70' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/obj/host-libs-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/jwlemke/2011.09-arm-linux-eabi-lite/install/arm-none-linux-gnueabi/bin

Thread model: posix

gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70)

COLLECT_GCC_OPTIONS='-I' '../glfw/include' '-I' '../glfw/lib' '-I' '../glfw/lib/x11' '-I' '../openal/include' '-I' '../stb' '-I' '../' '-I' '../GL' '-Wall' '-v' '-o' 'main' '-shared-libgcc' '-march=armv5te' '-mtls-dialect=gnu' '-funwind-tables' '-D' '__CS_SOURCERYGXX_MAJ__=2011' '-D' '__CS_SOURCERYGXX_MIN__=9' '-D' '__CS_SOURCERYGXX_REV__=70'

/opt/pandora/arm-2011.09/bin/../libexec/gcc/arm-none-linux-gnueabi/4.6.1/cc1plus -quiet -v -I ../glfw/include -I ../glfw/lib -I ../glfw/lib/x11 -I ../openal/include -I ../stb -I ../ -I ../GL -iprefix /opt/pandora/arm-2011.09/bin/../lib/gcc/arm-none-linux-gnueabi/4.6.1/ -isysroot /opt/pandora/arm-2011.09/bin/../arm-none-linux-gnueabi/libc -D_GNU_SOURCE -D __CS_SOURCERYGXX_MAJ__=2011 -D __CS_SOURCERYGXX_MIN__=9 -D __CS_SOURCERYGXX_REV__=70 ../main.cpp -quiet -dumpbase main.cpp -march=armv5te -mtls-dialect=gnu -auxbase main -Wall -version -funwind-tables -o /tmp/ccke2BQK.s

GNU C++ (Sourcery CodeBench Lite 2011.09-70) version 4.6.1 (arm-none-linux-gnueabi)

compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version 3.0.1-p4, MPC version 0.9

GGC heuristics: --param ggc-min-expand=81 --param ggc-min-heapsize=96541

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/include/c++/4.6.1"

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/include/c++/4.6.1/arm-none-linux-gnueabi"

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/include/c++/4.6.1/backward"

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/include"

ignoring nonexistent directory "/opt/pandora/arm-2011.09/bin/../arm-none-linux-gnueabi/libc/usr/local/include"

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/include-fixed"

ignoring duplicate directory "/opt/pandora/arm-2011.09/bin/../lib/gcc/../../lib/gcc/arm-none-linux-gnueabi/4.6.1/../../../../arm-none-linux-gnueabi/include"

#include "..." search starts here:

#include <...> search starts here:

../glfw/include

../glfw/lib

../glfw/lib/x11

../openal/include

../stb

../

../GL

Done.
 
Last edited by a moderator:
Back
Top