Simple way to compile Supertux-GIT on Ubuntu

Simple way to compile Supertux-GIT on Ubuntu

Postby OzemirElion » 10 Nov 2014, 18:20

After many attempts, I managed to compile the supertux-GIT on Ubuntu 14:04 (Trusty Tahr). I made a tutorial teaching the way I used to compile, it worked.
I used the latest sources "supertux.googlecode.com" to compile and manually downloaded some libs for everything to work correctly.
The process is very simple!
Enjoy it!


- Configuring the Ubuntu Sources

Open the "Software & Updates" and "Ubuntu Software" tab select "Main Server" in the "Download from"; in the "Other Software" tab check the two "Independent" boxes. Click "Close" and then "Reload". Wait for the update process to finish.

- Downloading dependencies supertux

Open the Terminal and use the "sudo apt-get build-dep supertux" command and after use "s" to confirm.
Use the following commands, one after the other, and wait to download them:

sudo apt-get install libsdl2-2.0-0
sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-image-2.0-0
sudo apt-get install libsdl2-image-dev

Using Mozilla Firefox or the browser you prefer, download this file:

http://ftp.gnu.org/gnu/libiconv/libiconv-1.12.tar.gz

...and unzip it in the Home folder. In Terminal, use the following commands:

cd /home/user/libiconv-1.12 (replace the user name of your account user)
./configure --prefix=/usr
sudo make
sudo make install

- Downloading the source code and compiling supertux

Now we download the Source Code supertux:

https://code.google.com/p/supertux/source/browse/

open this link and click on "Download .zip". After downloading, unzip the downloaded file to the Home folder and rename it to "supertux".
In Terminal, use these commands:

cd/home/user/supertux (replace the user name of your account User)
mkdir build
cd build
cmake -DDEBUG=ON ..
sudo make (this is a long process)
sudo make install

Just go in supertux folder you will find the game compiled and ready to run.
Attachments
Screenshot from 2014-10-30 16_28_27.jpg
Screenshot of a level of SuperTux World Halloween.
OzemirElion
 
Posts: 1
Joined: 10 Nov 2014, 18:01

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby spider » 03 Dec 2014, 13:14

I have OS Russian Fedora:
cmake .. -DCMAKE_INSTALL_PREFIX=/home/DIR/ -DDEBUG=ON
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Boost version: 1.54.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- checking for one of the modules 'sdl2>=2.0.1'
-- checking for one of the modules 'SDL2_image>=2.0.0'
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so
-- Found OpenAL: /usr/lib64/libopenal.so
-- Looking for vorbis_bitrate_addblock in vorbis
-- Looking for vorbis_bitrate_addblock in vorbis - found
-- Found OggVorbis: /usr/lib64/libvorbisfile.so;/usr/lib64/libvorbis.so;/usr/lib64/libogg.so
-- Found PhysFS: /usr/lib64/libphysfs.so
-- Found CURL: /usr/lib64/libcurl.so (found version "7.32.0")
-- Performing Test HAVE_ICONV_CONST
-- Performing Test HAVE_ICONV_CONST - Failed
-- Check size of void*
-- Check size of void* - done
-- Size of void* is 8
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

DEBUG


-- Build files have been written to: /home/DIR/supertux-e802acf2e6b5/build
[****** build]$ make
Scanning dependencies of target gitversion
[ 0%] Updating /home/DIR/supertux-e802acf2e6b5/build/version.h...
fatal: Not a git repository (or any of the parent directories): .git
make[2]: *** [CMakeFiles/gitversion] Ошибка 128
make[1]: *** [CMakeFiles/gitversion.dir/all] Ошибка 2
make: *** [all] Ошибка 2
Ошибка=Error in Russian

I also install:
libiconv-devel-1.14-3.fc20.R.x86_64
libiconv-1.14-3.fc20.R.x86_64
libiconv-utils-1.14-3.fc20.R.x86_64
libiconv-static-1.14-3.fc20.R.x86_64

With version 0.3.4 I have not any error, please help
spider
 
Posts: 13
Joined: 02 Dec 2014, 23:33

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby Akien » 03 Dec 2014, 15:21

You need to clone the git repository, the version.h file expects its folder to be part of a git repo (and thus to have a .git folder), most likely so that it can extract the commit hash to put it into the version string.

You probably downloaded a tarball of the repo which only contains the source files, but not the git metadata.
You should clone the repo with:
{l Code}: {l Select All Code}
 git clone https://code.google.com/p/supertux/
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby spider » 03 Dec 2014, 18:22

Akien, thank you very much! All good;)
spider
 
Posts: 13
Joined: 02 Dec 2014, 23:33

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby Tobbi » 04 Dec 2014, 00:25

This should probably not fail if Git couldn't be found. Not sure if I can do anything about it, but I'll try.

EDIT:

Oh, It's repository layout that couldn't be found. Let's see!
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby Tobbi » 16 Dec 2014, 02:43

I have fixed the issue that was reported in commit f9e9003e34a219442ac3633cfc10c0f888a47be9.

If anyone could try this out, I'd be happy (with the .git directory removed, of course).
SuperTux developer.
User avatar
Tobbi
SuperTux Moderator
 
Posts: 353
Joined: 12 Oct 2013, 13:08

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby brmbrmcar » 25 Oct 2015, 12:40

It doesn't work.
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Re: Simple way to compile Supertux-GIT on Ubuntu

Postby brmbrmcar » 11 Nov 2016, 23:08

I am trying to compile the supertux-coop mode on 0.3.3 in 16.04. I can get through the cmake, but when I run make or sudo make I get the following messages:
Scanning dependencies of target svnversion
[ 1%] Updating /home/brmbrmcar/supertux-0.3.3/build/version.h...
[ 1%] Built target svnversion
Scanning dependencies of target squirrel
[ 1%] Building CXX object external/squirrel/CMakeFiles/squirrel.dir/squirrel/sqdebug.cpp.o
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp: In member function ‘SQString* SQVM::PrintObjVal(const SQObject&)’:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp:77:64: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘SQInteger {aka long int}’ [-Wformat=]
scsprintf(_sp(rsl(NUMBER_MAX_CHAR+1)), _SC("%d"), _integer(o));
^
In file included from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqobject.h:5:0,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqpcheader.h:16,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp:4:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h: In instantiation of ‘sqvector<T>::~sqvector() [with T = long int]’:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqclosure.h:83:52: required from here
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:8:41: error: ‘sq_vm_free’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
#define SQ_FREE(__ptr,__size) sq_vm_free((__ptr),(__size));
^
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:38:4: note: in expansion of macro ‘SQ_FREE’
SQ_FREE(_vals, (_allocated * sizeof(T)));
^
In file included from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqpcheader.h:17:0,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp:4:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqstate.h:142:6: note: ‘void sq_vm_free(void*, SQUnsignedInteger)’ declared here, later in the translation unit
void sq_vm_free(void *p,SQUnsignedInteger size);
^
In file included from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqobject.h:5:0,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqpcheader.h:16,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp:4:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h: In instantiation of ‘void sqvector<T>::_realloc(SQUnsignedInteger) [with T = long int; SQUnsignedInteger = long unsigned int]’:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:45:12: required from ‘void sqvector<T>::resize(SQUnsignedInteger, const T&) [with T = long int; SQUnsignedInteger = long unsigned int]’
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:27:9: required from ‘void sqvector<T>::copy(const sqvector<T>&) [with T = long int]’
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqclosure.h:97:34: required from here
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:9:57: error: ‘sq_vm_realloc’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
#define SQ_REALLOC(__ptr,__oldsize,__size) sq_vm_realloc((__ptr),(__oldsize),(__size));
^
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/squtils.h:97:15: note: in expansion of macro ‘SQ_REALLOC’
_vals = (T*)SQ_REALLOC(_vals, _allocated * sizeof(T), newsize * sizeof(T));
^
In file included from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqpcheader.h:17:0,
from /home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqdebug.cpp:4:
/home/brmbrmcar/supertux-0.3.3/external/squirrel/squirrel/sqstate.h:141:7: note: ‘void* sq_vm_realloc(void*, SQUnsignedInteger, SQUnsignedInteger)’ declared here, later in the translation unit
void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
^
external/squirrel/CMakeFiles/squirrel.dir/build.make:62: recipe for target 'external/squirrel/CMakeFiles/squirrel.dir/squirrel/sqdebug.cpp.o' failed
make[2]: *** [external/squirrel/CMakeFiles/squirrel.dir/squirrel/sqdebug.cpp.o] Error 1
CMakeFiles/Makefile2:160: recipe for target 'external/squirrel/CMakeFiles/squirrel.dir/all' failed
make[1]: *** [external/squirrel/CMakeFiles/squirrel.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
brmbrmbrmbrmbrmbrmcar
User avatar
brmbrmcar
 
Posts: 357
Joined: 24 Oct 2015, 14:46

Who is online

Users browsing this forum: No registered users and 1 guest

cron