Building Tux Junior, Newer GCC < 4.6 barfs ... (Ubuntu 14.4 Build Notes)

Tux Arcade

Update 4/18/17 - These instructions were older, Tux Junior has been tested to built on Ubuntu 16.4 with newer GCC.

tux@tux-VirtualBox:~/arcade/tuxjunior$  gcc --version

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
 

Check which GCC is installed. Tux Junior should build with GCC/G++ at 4.6. Newer gcc gets hung up with older squirrel pieces.

@BOX:~/boombox/supratux/tuxjunior$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4

@BOX:~/boombox/supratux/tuxjunior$ jam
...patience...
...found 1274 target(s)...
...updating 225 target(s)...
C++ ./build/i686-pc-linux-gnu/optimize/src/squirrel/squirrel/sqdebug.o
In file included from src/squirrel/squirrel/sqobject.h:5:0,
                 from src/squirrel/squirrel/sqpcheader.h:16,
                 from src/squirrel/squirrel/sqdebug.cpp:4:
src/squirrel/squirrel/squtils.h: In instantiation of ‘sqvector<T>::~sqvector() [with T = int]’:

If needed, use apt-get to install gcc4.6 and g++-4.6. 

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10

sudo update-alternatives --config g++
There is only one alternative in link group g++ (providing /usr/bin/g++): /usr/bin/g++-4.6
Nothing to configure.

@BOX:~/boombox/supratux/tuxjunior$ gcc --version
gcc (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4

 

Creative Commons: 
Attribution 4.0 International