Difference between revisions of "Compiling ScummVM/RPI"

Jump to navigation Jump to search
Line 55: Line 55:
== Configuring ScummVM ==
== Configuring ScummVM ==


Now we configure scummvm buildsystem so it knows what backend we want and where is our raspberry pi local sysroot living, containing the Raspberry Pi headers and libs the cross-compiler and linker will need. In this example configuration, we disable additional libs, and debug symbols since it's intended for final users.
Now we can configure ScummVM buildsystem so it knows what backend we want and where our Raspberry Pi local sysroot is located, containing the Raspberry Pi headers and libraries the cross-compiler and linker will need. In this example configuration, we disable debug symbols since it's intended for final users.


  <nowiki>
  <nowiki>
PKG_CONFIG_SYSROOT_DIR=$RPI_ROOT PKG_CONFIG_LIBDIR=$RPI_ROOT/usr/lib/arm-linux-gnueabihf/pkgconfig ./configure --host=raspberrypi --with-sdl-prefix=$RPI_ROOT/usr --with-png-prefix=$RPI_ROOT/usr --disable-debug --enable-release</nowiki>
PKG_CONFIG_SYSROOT_DIR=$RPI_ROOT PKG_CONFIG_LIBDIR=$RPI_ROOT/usr/lib/arm-linux-gnueabihf/pkgconfig ./configure --host=raspberrypi --with-sdl-prefix=$RPI_ROOT/usr --with-png-prefix=$RPI_ROOT/usr --disable-debug --enable-release</nowiki>


Remember you should have exported the RPI_ROOT enviroment variable previously.
Remember you should have exported the ''RPI_ROOT'' environment variable previously.
On the Raspberry Pi, SDL2 will always be used since it provides graphics acceleration.
On the Raspberry Pi, ''SDL2'' will always be used, since it provides graphics acceleration.
 
Unfortunately, the official toolchain for cross-compiling for Pi is, as of yet, using an old ''gcc'' version (4.3.9) and hence, the configure script may fail to detect the ''FluidSynth'' library specifically. FluidSynth and MT-32 emulation are features that are very demanding on CPU processing power so it should be ok to skip them entirely. Alternatively, you could seek out a more up-to-date ''armhf'' toolchain for the cross-compilation, such as this [https://github.com/Pro/raspi-toolchain/releases Raspberry Pi toolchain by Stefan Profanter (Pro)] which, in its 1.0.1 version, uses ''gcc'' version 8.3.0.


'''Note:''' If you are building ScummVM directly on your Raspberry Pi itself, you might run out of memory during the final linking process of the build. If you use GNU ''ld'' for compiling, you could execute the following before running ''configure'':
'''Note:''' If you are building ScummVM directly on your Raspberry Pi itself, you might run out of memory during the final linking process of the build. If you use GNU ''ld'' for compiling, you could execute the following before running ''configure'':